diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libiscsi.c | 8 |
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 | ||
1272 | fault: | 1270 | fault: |
1273 | spin_unlock(&session->lock); | 1271 | spin_unlock(&session->lock); |