* [PATCH] scsi: fix scsi_host_queue_ready
@ 2018-06-30 1:27 Ming Lei
2018-06-30 1:40 ` Guenter Roeck
2018-07-02 20:24 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Ming Lei @ 2018-06-30 1:27 UTC (permalink / raw)
To: linux-scsi
Cc: Jens Axboe, linux-block, Ming Lei, Omar Sandoval,
Martin K. Petersen, James Bottomley, Christoph Hellwig, Don Brace,
Kashyap Desai, Mike Snitzer, Hannes Reinecke, Laurence Oberman,
Bart Van Assche, Guenter Roeck
328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy
for scsi_mq") adds one extra check on scsi_host_busy(shost) in
scsi_host_queue_ready(), which is wrong and not necessary, can causes
booting stall on LSI53c895A.
So remove the check.
Cc: Omar Sandoval <osandov@fb.com>,
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Cc: James Bottomley <james.bottomley@hansenpartnership.com>,
Cc: Christoph Hellwig <hch@lst.de>,
Cc: Don Brace <don.brace@microsemi.com>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy for scsi_mq")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
drivers/scsi/scsi_lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1c79c86184b1..cc97818cb29c 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1561,7 +1561,7 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
else
busy = 0;
if (atomic_read(&shost->host_blocked) > 0) {
- if (busy || scsi_host_busy(shost))
+ if (busy)
goto starved;
/*
--
2.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: fix scsi_host_queue_ready
2018-06-30 1:27 [PATCH] scsi: fix scsi_host_queue_ready Ming Lei
@ 2018-06-30 1:40 ` Guenter Roeck
2018-07-02 20:24 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2018-06-30 1:40 UTC (permalink / raw)
To: Ming Lei
Cc: linux-scsi, Jens Axboe, linux-block, Omar Sandoval,
Martin K. Petersen, James Bottomley, Christoph Hellwig, Don Brace,
Kashyap Desai, Mike Snitzer, Hannes Reinecke, Laurence Oberman,
Bart Van Assche
On Sat, Jun 30, 2018 at 09:27:24AM +0800, Ming Lei wrote:
> 328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy
> for scsi_mq") adds one extra check on scsi_host_busy(shost) in
> scsi_host_queue_ready(), which is wrong and not necessary, can causes
> booting stall on LSI53c895A.
>
> So remove the check.
>
> Cc: Omar Sandoval <osandov@fb.com>,
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
> Cc: James Bottomley <james.bottomley@hansenpartnership.com>,
> Cc: Christoph Hellwig <hch@lst.de>,
> Cc: Don Brace <don.brace@microsemi.com>
> Cc: Kashyap Desai <kashyap.desai@broadcom.com>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Laurence Oberman <loberman@redhat.com>
> Cc: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: 328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy for scsi_mq")
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/scsi/scsi_lib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 1c79c86184b1..cc97818cb29c 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1561,7 +1561,7 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
> else
> busy = 0;
> if (atomic_read(&shost->host_blocked) > 0) {
> - if (busy || scsi_host_busy(shost))
> + if (busy)
> goto starved;
>
> /*
> --
> 2.9.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: fix scsi_host_queue_ready
2018-06-30 1:27 [PATCH] scsi: fix scsi_host_queue_ready Ming Lei
2018-06-30 1:40 ` Guenter Roeck
@ 2018-07-02 20:24 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-07-02 20:24 UTC (permalink / raw)
To: Ming Lei
Cc: linux-scsi, Jens Axboe, linux-block, Omar Sandoval,
Martin K. Petersen, James Bottomley, Christoph Hellwig, Don Brace,
Kashyap Desai, Mike Snitzer, Hannes Reinecke, Laurence Oberman,
Bart Van Assche, Guenter Roeck
Ming,
> 328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy
> for scsi_mq") adds one extra check on scsi_host_busy(shost) in
> scsi_host_queue_ready(), which is wrong and not necessary, can causes
> booting stall on LSI53c895A.
Applied to 4.19/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-02 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-30 1:27 [PATCH] scsi: fix scsi_host_queue_ready Ming Lei
2018-06-30 1:40 ` Guenter Roeck
2018-07-02 20:24 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox