Skip to contentSkip to conversation

make scsi_eh_try_stu use block timeout

PATCH In review James Bottomley 2 participants 2 messages Nov 30, 2008 SCSI

lore
Share & tools
lore

James Bottomley

author maintainer
#0 lore raw

PATCH 4/7 make scsi_eh_try_stu use block timeout

scsi_eh_try_stu() was still using the timeout parameter in the device which is now not set (i.e. zero filled) meaning that it waited no time at all for the start unit command to complete (leading the routine to conclude failure every time). This lead to a 2.6.27 regression:

http://bugzilla.kernel.org/show_bug.cgi?id=12120

Where firewire devices that were non spec compliant wouldn't spin up.

Fix this by using the block queue timeout value instead.

---

drivers/scsi/scsi_error.c +1 -2
index d07bb3e..381838e 100644
@@ -933,8 +933,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)
 		int i, rtn = NEEDS_RETRY;
 
 		for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
-			rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
-						scmd->device->timeout, 0);
+			rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);
 
 		if (rtn == SUCCESS)
 			return 0;
#1 lore raw

drivers/scsi/scsi_error.c static int scsi_eh_try_stu(struct scsi_cmnd *scmd) · line 939

Quoted 12 lines · James Bottomley
drivers/scsi/scsi_error.c +1 -2
@@ -933,8 +933,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)
 		int i, rtn = NEEDS_RETRY;
 
 		for (i = 0; rtn == NEEDS_RETRY && i < 2; i++)
-			rtn = scsi_send_eh_cmnd(scmd, stu_command, 6,
-						scmd->device->timeout, 0);
+			rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, scmd->device->request_queue->rq_timeout, 0);
 
 		if (rtn == SUCCESS)
 			return 0;

Tested, works. Thanks,

Signature · 3 lines
Stefan Richter
-=====-==--- =-== ====-
http://arcgraph.de/sr/