aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2010-07-10 05:18:36 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:04:32 -0400
commite349fa35363fa96f11addecb67e0f8a6edfb0e3a (patch)
tree505ac1df3835072255ef51acf1515205f458405a
parentab2a9ba189e889b3e8990e52e90d2cd9606b2aa1 (diff)
[SCSI] qla4xxx: set driver ddb state correctly in process_ddb_changed
If fw ddb state is ACTIVE mark driver ddb stat as ONLINE and unblock iscsi session. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/qla4xxx/ql4_init.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 5510df8a7fa6..8947743e54d7 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -1487,7 +1487,10 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
1487 ddb_entry->fw_ddb_device_state, state, fw_ddb_index)); 1487 ddb_entry->fw_ddb_device_state, state, fw_ddb_index));
1488 if (old_fw_ddb_device_state == state && 1488 if (old_fw_ddb_device_state == state &&
1489 state == DDB_DS_SESSION_ACTIVE) { 1489 state == DDB_DS_SESSION_ACTIVE) {
1490 /* Do nothing, state not changed. */ 1490 if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE) {
1491 atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
1492 iscsi_unblock_session(ddb_entry->sess);
1493 }
1491 return QLA_SUCCESS; 1494 return QLA_SUCCESS;
1492 } 1495 }
1493 1496