While testing the aic7xxx error recovery handler under 2.2.18, I experienced
repeated panics complaining that host_failed was not zero after error
recovery completed. Since my driver does release the io_request_lock
during recover, it is possible for a command, that has passed the check
in the top level drivers just prior to the first timeout occurring to
become queued after the error handler thread has been woken up (or,
in fact, mostly completing its work). Having the SCSI_BLOCK macro
test to see if we are in recovery just before adding the transaction
to the queue, while under the protection of the io_request_lock removes
this race. The code has changed in the 2.4 line, but a similar fix
is likely required there as well.
--
Justin
diff -u -r -N linux-2.2.18.virgin/drivers/scsi/scsi.c linux-2.2.18/drivers/scsi/scsi.c
--- linux-2.2.18.virgin/drivers/scsi/scsi.c Sun Dec 10 17:49:43 2000
+++ linux-2.2.18/drivers/scsi/scsi.c Fri Feb 9 14:39:15 2001
@@ -209,6 +209,7 @@
#define SCSI_BLOCK(DEVICE, HOST) \
((HOST->block && host_active && HOST != host_active) \
|| ((HOST)->can_queue && HOST->host_busy >= HOST->can_queue) \
+ || ((HOST)->in_recovery) \
|| ((HOST)->host_blocked) \
|| ((DEVICE) != NULL && (DEVICE)->device_blocked) )
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]