aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/advansys.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-08-05 22:45:40 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-08-08 10:55:39 -0400
commitb21a41385118f9a6af3cd96ce71090c5ada52eb5 (patch)
tree4eb9124ae72e1a905094c259465718793698e603 /drivers/scsi/advansys.c
parentf03a567054fea4f9d43c50ec91338266c0bd588d (diff)
[SCSI] add global timeout to the scsi mid-layer
There are certain rogue devices (and the aic7xxx driver) that return BUSY or QUEUE_FULL forever. This code will apply a global timeout (of the total number of retries times the per command timer) to a given command. If it is exceeded, the command is completed regardless of its state. The patch also removes the unused field in the command: timeout and timeout_total. This solves the problem of detecting an endless loop in the mid-layer because of BUSY/QUEUE_FULL bouncing, but will not recover the device. In the aic7xxx case, the driver can be recovered by sending a bus reset, so possibly this should be tied into the error handler? Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/advansys.c')
-rw-r--r--drivers/scsi/advansys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 0fb93363eb22..37ec5411e325 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -9200,8 +9200,8 @@ asc_prt_scsi_cmnd(struct scsi_cmnd *s)
9200 (unsigned) s->serial_number, s->retries, s->allowed); 9200 (unsigned) s->serial_number, s->retries, s->allowed);
9201 9201
9202 printk( 9202 printk(
9203" timeout_per_command %d, timeout_total %d, timeout %d\n", 9203" timeout_per_command %d\n",
9204 s->timeout_per_command, s->timeout_total, s->timeout); 9204 s->timeout_per_command);
9205 9205
9206 printk( 9206 printk(
9207" scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n", 9207" scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n",