Skip to contentSkip to conversation

scsi: fix scsi_host_queue_ready

PATCH Applied Ming Lei 3 participants 3 messages Jun 30, 2018 – Jul 2, 2018

Subsystems (2)
lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 scsi: fix scsi_host_queue_ready

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 <[email protected]>,
Cc "Martin K. Petersen" <[email protected]>,
Cc James Bottomley <[email protected]>,
Cc Christoph Hellwig <[email protected]>,
Cc Don Brace <[email protected]>
Cc Kashyap Desai <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Laurence Oberman <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy for scsi_mq")
---
 drivers/scsi/scsi_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_lib.c +1 -1
index 1c79c86184b1..cc97818cb29c 100644
@@ -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;
 
 		/*
Signature · 1 line
2.9.5
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ming Lei

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.

Quoted 14 lines
Cc Omar Sandoval <[email protected]>,
Cc "Martin K. Petersen" <[email protected]>,
Cc James Bottomley <[email protected]>,
Cc Christoph Hellwig <[email protected]>,
Cc Don Brace <[email protected]>
Cc Kashyap Desai <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Laurence Oberman <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 328728630d9f2bf1 ("scsi: avoid to hold host-wide counter of host_busy for scsi_mq")
Quoted 20 lines
---
 drivers/scsi/scsi_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_lib.c +1 -1
index 1c79c86184b1..cc97818cb29c 100644
@@ -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;
 
 		/*
Signature · 1 line
2.9.5
#2 lore raw
In reply to Ming Lei

Ming,

Quoted 4 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering