Skip to content

Commit

Permalink
[SCSI] qla4xxx: set driver ddb state correctly in process_ddb_changed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vikas Chaudhary authored and James Bottomley committed Jul 27, 2010
1 parent ab2a9ba commit e349fa3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/scsi/qla4xxx/ql4_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e349fa3

Please sign in to comment.