aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-08-17 16:24:43 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:47 -0400
commitd6d13ee19da6d291c99f980dcb76f6b7dc676804 (patch)
tree93598458b723bae052d5954feff4f6d78ea4af76 /drivers/scsi
parent7b594131c4f38edeb13d8c6c0147949173c47013 (diff)
[SCSI] libiscsi: Use SCSI_MLQUEUE_TARGET_BUSY
For the conditions below we do not want the queuecommand function to call us right back, so return SCSI_MLQUEUE_TARGET_BUSY. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libiscsi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index da7b67d30d9a..521dbf7e521d 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1194,12 +1194,10 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
1194 switch (session->state) { 1194 switch (session->state) {
1195 case ISCSI_STATE_IN_RECOVERY: 1195 case ISCSI_STATE_IN_RECOVERY:
1196 reason = FAILURE_SESSION_IN_RECOVERY; 1196 reason = FAILURE_SESSION_IN_RECOVERY;
1197 sc->result = DID_IMM_RETRY << 16; 1197 goto reject;
1198 break;
1199 case ISCSI_STATE_LOGGING_OUT: 1198 case ISCSI_STATE_LOGGING_OUT:
1200 reason = FAILURE_SESSION_LOGGING_OUT; 1199 reason = FAILURE_SESSION_LOGGING_OUT;
1201 sc->result = DID_IMM_RETRY << 16; 1200 goto reject;
1202 break;
1203 case ISCSI_STATE_RECOVERY_FAILED: 1201 case ISCSI_STATE_RECOVERY_FAILED:
1204 reason = FAILURE_SESSION_RECOVERY_TIMEOUT; 1202 reason = FAILURE_SESSION_RECOVERY_TIMEOUT;
1205 sc->result = DID_NO_CONNECT << 16; 1203 sc->result = DID_NO_CONNECT << 16;
@@ -1267,7 +1265,7 @@ reject:
1267 spin_unlock(&session->lock); 1265 spin_unlock(&session->lock);
1268 debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason); 1266 debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason);
1269 spin_lock(host->host_lock); 1267 spin_lock(host->host_lock);
1270 return SCSI_MLQUEUE_HOST_BUSY; 1268 return SCSI_MLQUEUE_TARGET_BUSY;
1271 1269
1272fault: 1270fault:
1273 spin_unlock(&session->lock); 1271 spin_unlock(&session->lock);