aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorManish Rangankar <manish.rangankar@qlogic.com>2011-10-07 19:55:47 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:10:27 -0400
commit98270ab45c0a5e533f253f04e0b617c98b5a6259 (patch)
tree30843b0c7a04c4a0d4000cffa957a152f08b31d4 /drivers
parent736cf369c9a514a9ed596e97375c49ef1fdf920a (diff)
[SCSI] qla4xxx: Fixed session destroy issue on link up-down.
During link down, iscsid tries to do re-login to failed session. In case of link down-up-down, LLD was sending connection login failed event to iscsid, which is destroying the session, instead we have to continue re-login by sending connection err event. JIRA Key: UPSISCSI-134 Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla4xxx/ql4_init.c16
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c6
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index ca155bb9fd0a..cc10bacd1e18 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -931,6 +931,22 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
931 break; 931 break;
932 } 932 }
933 break; 933 break;
934 case DDB_DS_SESSION_FAILED:
935 switch (state) {
936 case DDB_DS_SESSION_ACTIVE:
937 case DDB_DS_DISCOVERY:
938 iscsi_conn_login_event(ddb_entry->conn,
939 ISCSI_CONN_STATE_LOGGED_IN);
940 qla4xxx_update_session_conn_param(ha, ddb_entry);
941 status = QLA_SUCCESS;
942 break;
943 case DDB_DS_SESSION_FAILED:
944 iscsi_session_failure(ddb_entry->sess->dd_data,
945 ISCSI_ERR_CONN_FAILED);
946 status = QLA_SUCCESS;
947 break;
948 }
949 break;
934 default: 950 default:
935 DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Unknown Event\n", 951 DEBUG2(ql4_printk(KERN_INFO, ha, "%s: Unknown Event\n",
936 __func__)); 952 __func__));
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index bea78a7f6bc1..af83e6f3fe6f 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1158,7 +1158,11 @@ static int qla4xxx_conn_start(struct iscsi_cls_conn *cls_conn)
1158 goto exit_conn_start; 1158 goto exit_conn_start;
1159 } 1159 }
1160 1160
1161 ddb_entry->fw_ddb_device_state = DDB_DS_LOGIN_IN_PROCESS; 1161 if (ddb_entry->fw_ddb_device_state == DDB_DS_NO_CONNECTION_ACTIVE)
1162 ddb_entry->fw_ddb_device_state = DDB_DS_LOGIN_IN_PROCESS;
1163
1164 DEBUG2(printk(KERN_INFO "%s: DDB state [%d]\n", __func__,
1165 ddb_entry->fw_ddb_device_state));
1162 1166
1163exit_set_param: 1167exit_set_param:
1164 iscsi_conn_start(cls_conn); 1168 iscsi_conn_start(cls_conn);