aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2008-11-04 20:47:19 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-11-05 12:48:23 -0500
commit939c2288c35132fe340b2694c7d02cacf7593723 (patch)
tree17eb0c6c2a9fba59283e27e154819cdbc22deb7a /drivers/scsi
parentd94ce6c6e99252ab2ba340b0398c8651713a9f05 (diff)
[SCSI] scsi_error regression: Fix idempotent command handling
Drivers want to be able to return DID_TRANSPORT_DISRUPTED and have it do the right thing for commands like tape and passthrouh as far as retries go. The LLDs previously used DID_BUS_BUSY or DID_ERROR which followed the cmd->retries limit, but DID_TRANSPORT_DISRUPTED was skipping that check so it could have caused a problem with tape commands. This patch has DID_TRANSPORT_DISRUPTED check the cmd->retries/cmd->allowed. Signed-off-by: Mike Christie <mchristi@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_error.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 94ed262bdf0c..386361778ebb 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1340,9 +1340,10 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
1340 * LLD/transport was disrupted during processing of the IO. 1340 * LLD/transport was disrupted during processing of the IO.
1341 * The transport class is now blocked/blocking, 1341 * The transport class is now blocked/blocking,
1342 * and the transport will decide what to do with the IO 1342 * and the transport will decide what to do with the IO
1343 * based on its timers and recovery capablilities. 1343 * based on its timers and recovery capablilities if
1344 * there are enough retries.
1344 */ 1345 */
1345 return ADD_TO_MLQUEUE; 1346 goto maybe_retry;
1346 case DID_TRANSPORT_FAILFAST: 1347 case DID_TRANSPORT_FAILFAST:
1347 /* 1348 /*
1348 * The transport decided to failfast the IO (most likely 1349 * The transport decided to failfast the IO (most likely