Commit 0c4112223cc947992186f13837747c3b259bd31d
Committed by
James Bottomley
1 parent
164cecd1b9
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
[SCSI] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Showing 3 changed files with 10 additions and 1 deletions Side-by-side Diff
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
... | ... | @@ -4115,6 +4115,12 @@ |
4115 | 4115 | "Milliseconds driver will wait between polling FCP ring"); |
4116 | 4116 | |
4117 | 4117 | /* |
4118 | +# lpfc_task_mgmt_tmo: Maximum time to wait for task management commands | |
4119 | +# to complete in seconds. Value range is [5,180], default value is 60. | |
4120 | +*/ | |
4121 | +LPFC_ATTR_RW(task_mgmt_tmo, 60, 5, 180, | |
4122 | + "Maximum time to wait for task management commands to complete"); | |
4123 | +/* | |
4118 | 4124 | # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that |
4119 | 4125 | # support this feature |
4120 | 4126 | # 0 = MSI disabled |
... | ... | @@ -4300,6 +4306,7 @@ |
4300 | 4306 | &dev_attr_issue_reset, |
4301 | 4307 | &dev_attr_lpfc_poll, |
4302 | 4308 | &dev_attr_lpfc_poll_tmo, |
4309 | + &dev_attr_lpfc_task_mgmt_tmo, | |
4303 | 4310 | &dev_attr_lpfc_use_msi, |
4304 | 4311 | &dev_attr_lpfc_fcp_imax, |
4305 | 4312 | &dev_attr_lpfc_fcp_cpu_map, |
... | ... | @@ -5279,6 +5286,7 @@ |
5279 | 5286 | lpfc_topology_init(phba, lpfc_topology); |
5280 | 5287 | lpfc_link_speed_init(phba, lpfc_link_speed); |
5281 | 5288 | lpfc_poll_tmo_init(phba, lpfc_poll_tmo); |
5289 | + lpfc_task_mgmt_tmo_init(phba, lpfc_task_mgmt_tmo); | |
5282 | 5290 | lpfc_enable_npiv_init(phba, lpfc_enable_npiv); |
5283 | 5291 | lpfc_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy); |
5284 | 5292 | lpfc_enable_rrq_init(phba, lpfc_enable_rrq); |
drivers/scsi/lpfc/lpfc_scsi.c
... | ... | @@ -5015,7 +5015,7 @@ |
5015 | 5015 | lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode); |
5016 | 5016 | if (lpfc_cmd == NULL) |
5017 | 5017 | return FAILED; |
5018 | - lpfc_cmd->timeout = 60; | |
5018 | + lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo; | |
5019 | 5019 | lpfc_cmd->rdata = rdata; |
5020 | 5020 | |
5021 | 5021 | status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id, |