[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>

authored by James Smart and committed by James Bottomley 0c411222 164cecd1

+10 -1
+1
drivers/scsi/lpfc/lpfc.h
··· 708 uint32_t cfg_multi_ring_type; 709 uint32_t cfg_poll; 710 uint32_t cfg_poll_tmo; 711 uint32_t cfg_use_msi; 712 uint32_t cfg_fcp_imax; 713 uint32_t cfg_fcp_cpu_map;
··· 708 uint32_t cfg_multi_ring_type; 709 uint32_t cfg_poll; 710 uint32_t cfg_poll_tmo; 711 + uint32_t cfg_task_mgmt_tmo; 712 uint32_t cfg_use_msi; 713 uint32_t cfg_fcp_imax; 714 uint32_t cfg_fcp_cpu_map;
+8
drivers/scsi/lpfc/lpfc_attr.c
··· 4115 "Milliseconds driver will wait between polling FCP ring"); 4116 4117 /* 4118 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that 4119 # support this feature 4120 # 0 = MSI disabled ··· 4306 &dev_attr_issue_reset, 4307 &dev_attr_lpfc_poll, 4308 &dev_attr_lpfc_poll_tmo, 4309 &dev_attr_lpfc_use_msi, 4310 &dev_attr_lpfc_fcp_imax, 4311 &dev_attr_lpfc_fcp_cpu_map, ··· 5286 lpfc_topology_init(phba, lpfc_topology); 5287 lpfc_link_speed_init(phba, lpfc_link_speed); 5288 lpfc_poll_tmo_init(phba, lpfc_poll_tmo); 5289 lpfc_enable_npiv_init(phba, lpfc_enable_npiv); 5290 lpfc_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy); 5291 lpfc_enable_rrq_init(phba, lpfc_enable_rrq);
··· 4115 "Milliseconds driver will wait between polling FCP ring"); 4116 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 + /* 4124 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that 4125 # support this feature 4126 # 0 = MSI disabled ··· 4300 &dev_attr_issue_reset, 4301 &dev_attr_lpfc_poll, 4302 &dev_attr_lpfc_poll_tmo, 4303 + &dev_attr_lpfc_task_mgmt_tmo, 4304 &dev_attr_lpfc_use_msi, 4305 &dev_attr_lpfc_fcp_imax, 4306 &dev_attr_lpfc_fcp_cpu_map, ··· 5279 lpfc_topology_init(phba, lpfc_topology); 5280 lpfc_link_speed_init(phba, lpfc_link_speed); 5281 lpfc_poll_tmo_init(phba, lpfc_poll_tmo); 5282 + lpfc_task_mgmt_tmo_init(phba, lpfc_task_mgmt_tmo); 5283 lpfc_enable_npiv_init(phba, lpfc_enable_npiv); 5284 lpfc_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy); 5285 lpfc_enable_rrq_init(phba, lpfc_enable_rrq);
+1 -1
drivers/scsi/lpfc/lpfc_scsi.c
··· 5015 lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode); 5016 if (lpfc_cmd == NULL) 5017 return FAILED; 5018 - lpfc_cmd->timeout = 60; 5019 lpfc_cmd->rdata = rdata; 5020 5021 status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,
··· 5015 lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode); 5016 if (lpfc_cmd == NULL) 5017 return FAILED; 5018 + lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo; 5019 lpfc_cmd->rdata = rdata; 5020 5021 status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,