* [PATCH 17/18] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
@ 2013-09-06 16:22 James Smart
2013-09-06 18:38 ` Jeremy Linton
0 siblings, 1 reply; 4+ messages in thread
From: James Smart @ 2013-09-06 16:22 UTC (permalink / raw)
To: linux-scsi
Fixed issue of task management commands having a fixed timeout
Signed-off-by: James Smart <james.smart@emulex.com>
---
lpfc.h | 1 +
lpfc_attr.c | 8 ++++++++
lpfc_scsi.c | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
diff -upNr a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
--- a/drivers/scsi/lpfc/lpfc_attr.c 2013-09-06 10:04:23.068058739 -0400
+++ b/drivers/scsi/lpfc/lpfc_attr.c 2013-09-06 10:04:34.728059004 -0400
@@ -4115,6 +4115,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
"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
# support this feature
# 0 = MSI disabled
@@ -4300,6 +4306,7 @@ struct device_attribute *lpfc_hba_attrs[
&dev_attr_issue_reset,
&dev_attr_lpfc_poll,
&dev_attr_lpfc_poll_tmo,
+ &dev_attr_lpfc_task_mgmt_tmo,
&dev_attr_lpfc_use_msi,
&dev_attr_lpfc_fcp_imax,
&dev_attr_lpfc_fcp_cpu_map,
@@ -5279,6 +5286,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
lpfc_topology_init(phba, lpfc_topology);
lpfc_link_speed_init(phba, lpfc_link_speed);
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_fcf_failover_policy_init(phba, lpfc_fcf_failover_policy);
lpfc_enable_rrq_init(phba, lpfc_enable_rrq);
diff -upNr a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
--- a/drivers/scsi/lpfc/lpfc.h 2013-09-04 13:18:04.000000000 -0400
+++ b/drivers/scsi/lpfc/lpfc.h 2013-09-06 10:04:34.731059004 -0400
@@ -708,6 +708,7 @@ struct lpfc_hba {
uint32_t cfg_multi_ring_type;
uint32_t cfg_poll;
uint32_t cfg_poll_tmo;
+ uint32_t cfg_task_mgmt_tmo;
uint32_t cfg_use_msi;
uint32_t cfg_fcp_imax;
uint32_t cfg_fcp_cpu_map;
diff -upNr a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
--- a/drivers/scsi/lpfc/lpfc_scsi.c 2013-09-06 10:04:32.486058953 -0400
+++ b/drivers/scsi/lpfc/lpfc_scsi.c 2013-09-06 10:04:34.787059006 -0400
@@ -5015,7 +5015,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vp
lpfc_cmd = lpfc_get_scsi_buf(phba, rdata->pnode);
if (lpfc_cmd == NULL)
return FAILED;
- lpfc_cmd->timeout = 60;
+ lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo;
lpfc_cmd->rdata = rdata;
status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 17/18] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
2013-09-06 16:22 [PATCH 17/18] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout James Smart
@ 2013-09-06 18:38 ` Jeremy Linton
2013-09-08 13:59 ` James Smart
0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Linton @ 2013-09-06 18:38 UTC (permalink / raw)
To: james.smart@emulex.com; +Cc: linux-scsi@vger.kernel.org
On 9/6/2013 11:22 AM, James Smart wrote:
> Fixed issue of task management commands having a fixed timeout
I'm surprised about this change, since it appears a number of issues in the
send_taskmgmt() still exist that keep it from handling task management
failures correctly. It also continues to have a number of smaller issues like
for example dead code of the form
if (status != IOCB_STATUS)
else if (status == IOCB_BUSY)
else
See patch:
"lpfc should check return status for task mgmt IOCB"
http://marc.info/?l=linux-scsi&m=136242124409687
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 17/18] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
2013-09-06 18:38 ` Jeremy Linton
@ 2013-09-08 13:59 ` James Smart
2013-09-09 14:43 ` Jeremy Linton
0 siblings, 1 reply; 4+ messages in thread
From: James Smart @ 2013-09-08 13:59 UTC (permalink / raw)
To: Jeremy Linton; +Cc: linux-scsi@vger.kernel.org
Jeremy,
Different issues....
The patch addresses only 1 topic - making an attribute to change the
timeout for the TMF. This was a request by the distros to post a hack
that was used on older releases to work around all the serialization and
delay problems in the midlayer error recovery path - which allowed
shortening delays from 10-12 minutes to 1-2 minutes. These are the same
issues we discussed at the last storage forum and which Hannes has been
working to correct upstream. The desire is to continue with a like
tuning option in the driver for those customers that have used it in the
past.
The other issue - we seem to have missed your prior post. I'll look into
it shortly.
The two patches work on the same code, but are independent topics.
-- james
On 9/6/2013 2:38 PM, Jeremy Linton wrote:
> On 9/6/2013 11:22 AM, James Smart wrote:
>> Fixed issue of task management commands having a fixed timeout
> I'm surprised about this change, since it appears a number of issues in the
> send_taskmgmt() still exist that keep it from handling task management
> failures correctly. It also continues to have a number of smaller issues like
> for example dead code of the form
>
> if (status != IOCB_STATUS)
> else if (status == IOCB_BUSY)
> else
>
>
> See patch:
>
> "lpfc should check return status for task mgmt IOCB"
>
> http://marc.info/?l=linux-scsi&m=136242124409687
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-09 14:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-06 16:22 [PATCH 17/18] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout James Smart
2013-09-06 18:38 ` Jeremy Linton
2013-09-08 13:59 ` James Smart
2013-09-09 14:43 ` Jeremy Linton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).