diff mbox

[v2] mptsas: fix depth param in scsi_track_queue_full

Message ID 1433345822-14113-1-git-send-email-thenzl@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomas Henzl June 3, 2015, 3:37 p.m. UTC
v2: use debug log level to silence the unsurprising information

v1: A user of scsi_track_queue_full should pass to the function
a constant value untill the queue-depth changes, otherwise the
internal logic in scsi_track_queue_full rejects the change.
Other users of this function use a 'sdev->queue_depth - 1'
as depth parameter, let's do the same.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/message/fusion/mptsas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Sreekanth Reddy June 4, 2015, 8:53 a.m. UTC | #1
James,

This patch looks good, please consider this patch as Acked-by:
"Sreekanth Reddy" <Sreekanth.reddy@avagotech.com>.

Regards,
Sreekanth

On Wed, Jun 3, 2015 at 9:07 PM, Tomas Henzl <thenzl@redhat.com> wrote:
> v2: use debug log level to silence the unsurprising information
>
> v1: A user of scsi_track_queue_full should pass to the function
> a constant value untill the queue-depth changes, otherwise the
> internal logic in scsi_track_queue_full rejects the change.
> Other users of this function use a 'sdev->queue_depth - 1'
> as depth parameter, let's do the same.
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
>  drivers/message/fusion/mptsas.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 551262e4b9..fe8f277567 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -4096,7 +4096,7 @@ mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
>                                         continue;
>                                 }
>                                 depth = scsi_track_queue_full(sdev,
> -                                   current_depth - 1);
> +                                       sdev->queue_depth - 1);
>                                 if (depth > 0)
>                                         sdev_printk(KERN_INFO, sdev,
>                                         "Queue depth reduced to (%d)\n",
> @@ -4106,7 +4106,7 @@ mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
>                                         "Tagged Command Queueing is being "
>                                         "disabled\n");
>                                 else if (depth == 0)
> -                                       sdev_printk(KERN_INFO, sdev,
> +                                       sdev_printk(KERN_DEBUG, sdev,
>                                         "Queue depth not changed yet\n");
>                         }
>                 }
> --
> 1.9.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 551262e4b9..fe8f277567 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -4096,7 +4096,7 @@  mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
 					continue;
 				}
 				depth = scsi_track_queue_full(sdev,
-				    current_depth - 1);
+					sdev->queue_depth - 1);
 				if (depth > 0)
 					sdev_printk(KERN_INFO, sdev,
 					"Queue depth reduced to (%d)\n",
@@ -4106,7 +4106,7 @@  mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
 					"Tagged Command Queueing is being "
 					"disabled\n");
 				else if (depth == 0)
-					sdev_printk(KERN_INFO, sdev,
+					sdev_printk(KERN_DEBUG, sdev,
 					"Queue depth not changed yet\n");
 			}
 		}