Commit e349fa35 authored by Vikas Chaudhary's avatar Vikas Chaudhary Committed by James Bottomley

[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: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: default avatarRavi Anand <ravi.anand@qlogic.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent ab2a9ba1
......@@ -1487,7 +1487,10 @@ int qla4xxx_process_ddb_changed(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
ddb_entry->fw_ddb_device_state, state, fw_ddb_index));
if (old_fw_ddb_device_state == state &&
state == DDB_DS_SESSION_ACTIVE) {
/* Do nothing, state not changed. */
if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE) {
atomic_set(&ddb_entry->state, DDB_STATE_ONLINE);
iscsi_unblock_session(ddb_entry->sess);
}
return QLA_SUCCESS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment