提交 0c411222 编写于 作者: J James Smart 提交者: James Bottomley

[SCSI] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout

Signed-off-by: NJames Smart <james.smart@emulex.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 164cecd1
...@@ -708,6 +708,7 @@ struct lpfc_hba { ...@@ -708,6 +708,7 @@ struct lpfc_hba {
uint32_t cfg_multi_ring_type; uint32_t cfg_multi_ring_type;
uint32_t cfg_poll; uint32_t cfg_poll;
uint32_t cfg_poll_tmo; uint32_t cfg_poll_tmo;
uint32_t cfg_task_mgmt_tmo;
uint32_t cfg_use_msi; uint32_t cfg_use_msi;
uint32_t cfg_fcp_imax; uint32_t cfg_fcp_imax;
uint32_t cfg_fcp_cpu_map; uint32_t cfg_fcp_cpu_map;
......
...@@ -4115,6 +4115,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255, ...@@ -4115,6 +4115,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
"Milliseconds driver will wait between polling FCP ring"); "Milliseconds driver will wait between polling FCP ring");
/* /*
# lpfc_task_mgmt_tmo: Maximum time to wait for task management commands
# to complete in seconds. Value range is [5,180], default value is 60.
*/
LPFC_ATTR_RW(task_mgmt_tmo, 60, 5, 180,
"Maximum time to wait for task management commands to complete");
/*
# lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
# support this feature # support this feature
# 0 = MSI disabled # 0 = MSI disabled
...@@ -4300,6 +4306,7 @@ struct device_attribute *lpfc_hba_attrs[] = { ...@@ -4300,6 +4306,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
&dev_attr_issue_reset, &dev_attr_issue_reset,
&dev_attr_lpfc_poll, &dev_attr_lpfc_poll,
&dev_attr_lpfc_poll_tmo, &dev_attr_lpfc_poll_tmo,
&dev_attr_lpfc_task_mgmt_tmo,
&dev_attr_lpfc_use_msi, &dev_attr_lpfc_use_msi,
&dev_attr_lpfc_fcp_imax, &dev_attr_lpfc_fcp_imax,
&dev_attr_lpfc_fcp_cpu_map, &dev_attr_lpfc_fcp_cpu_map,
...@@ -5279,6 +5286,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) ...@@ -5279,6 +5286,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
lpfc_topology_init(phba, lpfc_topology); lpfc_topology_init(phba, lpfc_topology);
lpfc_link_speed_init(phba, lpfc_link_speed); lpfc_link_speed_init(phba, lpfc_link_speed);
lpfc_poll_tmo_init(phba, lpfc_poll_tmo); lpfc_poll_tmo_init(phba, lpfc_poll_tmo);
lpfc_task_mgmt_tmo_init(phba, lpfc_task_mgmt_tmo);
lpfc_enable_npiv_init(phba, lpfc_enable_npiv); lpfc_enable_npiv_init(phba, lpfc_enable_npiv);
lpfc_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy); lpfc_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy);
lpfc_enable_rrq_init(phba, lpfc_enable_rrq); lpfc_enable_rrq_init(phba, lpfc_enable_rrq);
......
...@@ -5015,7 +5015,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, ...@@ -5015,7 +5015,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata,
lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode); lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode);
if (lpfc_cmd == NULL) if (lpfc_cmd == NULL)
return FAILED; return FAILED;
lpfc_cmd->timeout = 60; lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo;
lpfc_cmd->rdata = rdata; lpfc_cmd->rdata = rdata;
status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id, status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册