]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] add global timeout to the scsi mid-layer
authorJames Bottomley <James.Bottomley@steeleye.com>
Sat, 6 Aug 2005 02:45:40 +0000 (21:45 -0500)
committerJames Bottomley <jejb@mulgrave.(none)>
Mon, 8 Aug 2005 14:55:39 +0000 (09:55 -0500)
commitaceadf3ceddfc0d44d4533ba1bbd0833b160813c
tree4eb9124ae72e1a905094c259465718793698e603
parent48e1b954cc78d3e2aa00cc92c83941da8b272502
[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>
drivers/scsi/advansys.c
drivers/scsi/scsi.c
include/scsi/scsi_cmnd.h