diff options
-rw-r--r-- | drivers/scsi/libiscsi.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index a9d7e520e551..57eb3af40e96 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1390,13 +1390,7 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
1390 | goto fault; | 1390 | goto fault; |
1391 | } | 1391 | } |
1392 | 1392 | ||
1393 | /* | 1393 | if (session->state != ISCSI_STATE_LOGGED_IN) { |
1394 | * ISCSI_STATE_FAILED is a temp. state. The recovery | ||
1395 | * code will decide what is best to do with command queued | ||
1396 | * during this time | ||
1397 | */ | ||
1398 | if (session->state != ISCSI_STATE_LOGGED_IN && | ||
1399 | session->state != ISCSI_STATE_FAILED) { | ||
1400 | /* | 1394 | /* |
1401 | * to handle the race between when we set the recovery state | 1395 | * to handle the race between when we set the recovery state |
1402 | * and block the session we requeue here (commands could | 1396 | * and block the session we requeue here (commands could |
@@ -1404,12 +1398,15 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
1404 | * up because the block code is not locked) | 1398 | * up because the block code is not locked) |
1405 | */ | 1399 | */ |
1406 | switch (session->state) { | 1400 | switch (session->state) { |
1401 | case ISCSI_STATE_FAILED: | ||
1407 | case ISCSI_STATE_IN_RECOVERY: | 1402 | case ISCSI_STATE_IN_RECOVERY: |
1408 | reason = FAILURE_SESSION_IN_RECOVERY; | 1403 | reason = FAILURE_SESSION_IN_RECOVERY; |
1409 | goto reject; | 1404 | sc->result = DID_IMM_RETRY << 16; |
1405 | break; | ||
1410 | case ISCSI_STATE_LOGGING_OUT: | 1406 | case ISCSI_STATE_LOGGING_OUT: |
1411 | reason = FAILURE_SESSION_LOGGING_OUT; | 1407 | reason = FAILURE_SESSION_LOGGING_OUT; |
1412 | goto reject; | 1408 | sc->result = DID_IMM_RETRY << 16; |
1409 | break; | ||
1413 | case ISCSI_STATE_RECOVERY_FAILED: | 1410 | case ISCSI_STATE_RECOVERY_FAILED: |
1414 | reason = FAILURE_SESSION_RECOVERY_TIMEOUT; | 1411 | reason = FAILURE_SESSION_RECOVERY_TIMEOUT; |
1415 | sc->result = DID_TRANSPORT_FAILFAST << 16; | 1412 | sc->result = DID_TRANSPORT_FAILFAST << 16; |