diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libiscsi.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 96883614ba08..b17081bed128 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -917,7 +917,7 @@ check_mgmt: | |||
917 | conn->ctask = list_entry(conn->xmitqueue.next, | 917 | conn->ctask = list_entry(conn->xmitqueue.next, |
918 | struct iscsi_cmd_task, running); | 918 | struct iscsi_cmd_task, running); |
919 | if (conn->session->state == ISCSI_STATE_LOGGING_OUT) { | 919 | if (conn->session->state == ISCSI_STATE_LOGGING_OUT) { |
920 | fail_command(conn, conn->ctask, DID_NO_CONNECT << 16); | 920 | fail_command(conn, conn->ctask, DID_IMM_RETRY << 16); |
921 | continue; | 921 | continue; |
922 | } | 922 | } |
923 | if (iscsi_prep_scsi_cmd_pdu(conn->ctask)) { | 923 | if (iscsi_prep_scsi_cmd_pdu(conn->ctask)) { |
@@ -1024,21 +1024,19 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
1024 | * be entering our queuecommand while a block is starting | 1024 | * be entering our queuecommand while a block is starting |
1025 | * up because the block code is not locked) | 1025 | * up because the block code is not locked) |
1026 | */ | 1026 | */ |
1027 | if (session->state == ISCSI_STATE_IN_RECOVERY) { | 1027 | switch (session->state) { |
1028 | case ISCSI_STATE_IN_RECOVERY: | ||
1028 | reason = FAILURE_SESSION_IN_RECOVERY; | 1029 | reason = FAILURE_SESSION_IN_RECOVERY; |
1029 | goto reject; | 1030 | goto reject; |
1030 | } | 1031 | case ISCSI_STATE_LOGGING_OUT: |
1031 | 1032 | reason = FAILURE_SESSION_LOGGING_OUT; | |
1032 | switch (session->state) { | 1033 | goto reject; |
1033 | case ISCSI_STATE_RECOVERY_FAILED: | 1034 | case ISCSI_STATE_RECOVERY_FAILED: |
1034 | reason = FAILURE_SESSION_RECOVERY_TIMEOUT; | 1035 | reason = FAILURE_SESSION_RECOVERY_TIMEOUT; |
1035 | break; | 1036 | break; |
1036 | case ISCSI_STATE_TERMINATE: | 1037 | case ISCSI_STATE_TERMINATE: |
1037 | reason = FAILURE_SESSION_TERMINATE; | 1038 | reason = FAILURE_SESSION_TERMINATE; |
1038 | break; | 1039 | break; |
1039 | case ISCSI_STATE_LOGGING_OUT: | ||
1040 | reason = FAILURE_SESSION_LOGGING_OUT; | ||
1041 | break; | ||
1042 | default: | 1040 | default: |
1043 | reason = FAILURE_SESSION_FREED; | 1041 | reason = FAILURE_SESSION_FREED; |
1044 | } | 1042 | } |