提交 981c982c 编写于 作者: L Lalit Chandivade 提交者: James Bottomley

[SCSI] qla4xxx: Fix un-necessary delay on invalid DDB

Fix the un-necessary wait for completion of a sendtarget on an
invalid DDB entry. The state of an invalid DDB entry is 0 (unassigned)

This will also avoid the delays during system boot.
Signed-off-by: NLalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 45857216
...@@ -661,6 +661,8 @@ int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, ...@@ -661,6 +661,8 @@ int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha,
} }
memset(&mbox_cmd, 0, sizeof(mbox_cmd)); memset(&mbox_cmd, 0, sizeof(mbox_cmd));
memset(&mbox_sts, 0, sizeof(mbox_sts)); memset(&mbox_sts, 0, sizeof(mbox_sts));
if (fw_ddb_entry)
memset(fw_ddb_entry, 0, sizeof(struct dev_db_entry));
mbox_cmd[0] = MBOX_CMD_GET_DATABASE_ENTRY; mbox_cmd[0] = MBOX_CMD_GET_DATABASE_ENTRY;
mbox_cmd[1] = (uint32_t) fw_ddb_index; mbox_cmd[1] = (uint32_t) fw_ddb_index;
......
...@@ -4090,6 +4090,10 @@ static void qla4xxx_build_st_list(struct scsi_qla_host *ha, ...@@ -4090,6 +4090,10 @@ static void qla4xxx_build_st_list(struct scsi_qla_host *ha,
if (ret == QLA_ERROR) if (ret == QLA_ERROR)
break; break;
/* Ignore DDB if invalid state (unassigned) */
if (state == DDB_DS_UNASSIGNED)
goto continue_next_st;
/* Check if ST, add to the list_st */ /* Check if ST, add to the list_st */
if (strlen((char *) fw_ddb_entry->iscsi_name) != 0) if (strlen((char *) fw_ddb_entry->iscsi_name) != 0)
goto continue_next_st; goto continue_next_st;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册