diff options
author | Manish Rangankar <manish.rangankar@qlogic.com> | 2011-10-07 16:55:46 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-16 11:10:06 -0500 |
commit | 736cf369c9a514a9ed596e97375c49ef1fdf920a (patch) | |
tree | 1b5a9bd343152f315982125edd36a33f2c1b3fde /drivers/scsi/qla4xxx/ql4_init.c | |
parent | 166dd20d794e7885b23c8d5fc533949ed82cc337 (diff) |
[SCSI] qla4xxx: Clear DDB map index on the basis of AEN.
Unable to login to session if login-logout issued consecutively for
multiple sessions. Solution is to clear idx in DDB map on the basis
of no-active connection asynchronous event (AEN).
JIRA Key: UPSISCSI-135
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/scsi/qla4xxx/ql4_init.c')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_init.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index 064a3a311e7..ca155bb9fd0 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c @@ -880,6 +880,10 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, if (ddb_entry == NULL) { ql4_printk(KERN_ERR, ha, "%s: No ddb_entry at FW index [%d]\n", __func__, fw_ddb_index); + + if (state == DDB_DS_NO_CONNECTION_ACTIVE) + clear_bit(fw_ddb_index, ha->ddb_idx_map); + goto exit_ddb_event; } @@ -910,7 +914,8 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, } break; case DDB_DS_SESSION_ACTIVE: - if (state == DDB_DS_SESSION_FAILED) { + switch (state) { + case DDB_DS_SESSION_FAILED: /* * iscsi_session failure will cause userspace to * stop the connection which in turn would block the @@ -919,6 +924,11 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index, iscsi_session_failure(ddb_entry->sess->dd_data, ISCSI_ERR_CONN_FAILED); status = QLA_SUCCESS; + break; + case DDB_DS_NO_CONNECTION_ACTIVE: + clear_bit(fw_ddb_index, ha->ddb_idx_map); + status = QLA_SUCCESS; + break; } break; default: |