* Re: [PATCH] PCI: Increase VPD access timeout
2016-11-29 18:00 [PATCH] PCI: Increase VPD access timeout Matthew R. Ochs
@ 2016-11-29 23:25 ` Gavin Shan
2016-12-02 18:43 ` Uma Krishnan
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gavin Shan @ 2016-11-29 23:25 UTC (permalink / raw)
To: Matthew R. Ochs; +Cc: Bjorn Helgaas, linux-pci, Uma Krishnan
On Tue, Nov 29, 2016 at 12:00:40PM -0600, Matthew R. Ochs wrote:
>The PCI core uses a fixed 50ms timeout when waiting for VPD accesses to
>complete. When an access does not complete within this period, a warning
>is logged and an error returned to the caller.
>
>While this default timeout is valid for most hardware, some devices can
>experience longer access delays under certain circumstances. For example,
>one of the IBM CXL Flash devices can take up to ~120ms in a worst-case
>scenario. These types of devices can benefit from an extended timeout.
>
>To support devices with a longer access delay, increase the timeout in
>pci_vpd_wait() to 125ms. The PCI specification is silent with respect to
>VPD delays, therefore there is no concern for violating a threshold.
>
>Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>---
> drivers/pci/access.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/pci/access.c b/drivers/pci/access.c
>index d11cdbb..61b5a6b 100644
>--- a/drivers/pci/access.c
>+++ b/drivers/pci/access.c
>@@ -355,7 +355,7 @@ static size_t pci_vpd_size(struct pci_dev *dev, size_t old_size)
> static int pci_vpd_wait(struct pci_dev *dev)
> {
> struct pci_vpd *vpd = dev->vpd;
>- unsigned long timeout = jiffies + msecs_to_jiffies(50);
>+ unsigned long timeout = jiffies + msecs_to_jiffies(125);
> unsigned long max_sleep = 16;
> u16 status;
> int ret;
>--
>2.1.0
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] PCI: Increase VPD access timeout
2016-11-29 18:00 [PATCH] PCI: Increase VPD access timeout Matthew R. Ochs
2016-11-29 23:25 ` Gavin Shan
@ 2016-12-02 18:43 ` Uma Krishnan
2017-01-04 21:05 ` Matthew R. Ochs
2017-02-03 17:18 ` Bjorn Helgaas
3 siblings, 0 replies; 5+ messages in thread
From: Uma Krishnan @ 2016-12-02 18:43 UTC (permalink / raw)
To: Matthew R. Ochs, Bjorn Helgaas, linux-pci
> The PCI core uses a fixed 50ms timeout when waiting for VPD accesses to
> complete. When an access does not complete within this period, a warning
> is logged and an error returned to the caller.
>
> While this default timeout is valid for most hardware, some devices can
> experience longer access delays under certain circumstances. For example,
> one of the IBM CXL Flash devices can take up to ~120ms in a worst-case
> scenario. These types of devices can benefit from an extended timeout.
>
> To support devices with a longer access delay, increase the timeout in
> pci_vpd_wait() to 125ms. The PCI specification is silent with respect to
> VPD delays, therefore there is no concern for violating a threshold.
>
> Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Tested-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: Increase VPD access timeout
2016-11-29 18:00 [PATCH] PCI: Increase VPD access timeout Matthew R. Ochs
2016-11-29 23:25 ` Gavin Shan
2016-12-02 18:43 ` Uma Krishnan
@ 2017-01-04 21:05 ` Matthew R. Ochs
2017-02-03 17:18 ` Bjorn Helgaas
3 siblings, 0 replies; 5+ messages in thread
From: Matthew R. Ochs @ 2017-01-04 21:05 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci; +Cc: Uma Krishnan
> On Nov 29, 2016, at 12:00 PM, Matthew R. Ochs <mrochs@linux.vnet.ibm.com> wrote:
>
> The PCI core uses a fixed 50ms timeout when waiting for VPD accesses to
> complete. When an access does not complete within this period, a warning
> is logged and an error returned to the caller.
>
> While this default timeout is valid for most hardware, some devices can
> experience longer access delays under certain circumstances. For example,
> one of the IBM CXL Flash devices can take up to ~120ms in a worst-case
> scenario. These types of devices can benefit from an extended timeout.
>
> To support devices with a longer access delay, increase the timeout in
> pci_vpd_wait() to 125ms. The PCI specification is silent with respect to
> VPD delays, therefore there is no concern for violating a threshold.
Hi Bjorn,
It's been about a month since I originally sent this, and I wanted to know
if you've had a chance to look it over. Would like to get this queued up for
4.11 if possible.
-matt
>
> Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
> ---
> drivers/pci/access.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/access.c b/drivers/pci/access.c
> index d11cdbb..61b5a6b 100644
> --- a/drivers/pci/access.c
> +++ b/drivers/pci/access.c
> @@ -355,7 +355,7 @@ static size_t pci_vpd_size(struct pci_dev *dev, size_t old_size)
> static int pci_vpd_wait(struct pci_dev *dev)
> {
> struct pci_vpd *vpd = dev->vpd;
> - unsigned long timeout = jiffies + msecs_to_jiffies(50);
> + unsigned long timeout = jiffies + msecs_to_jiffies(125);
> unsigned long max_sleep = 16;
> u16 status;
> int ret;
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] PCI: Increase VPD access timeout
2016-11-29 18:00 [PATCH] PCI: Increase VPD access timeout Matthew R. Ochs
` (2 preceding siblings ...)
2017-01-04 21:05 ` Matthew R. Ochs
@ 2017-02-03 17:18 ` Bjorn Helgaas
3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2017-02-03 17:18 UTC (permalink / raw)
To: Matthew R. Ochs; +Cc: Bjorn Helgaas, linux-pci, Uma Krishnan
On Tue, Nov 29, 2016 at 12:00:40PM -0600, Matthew R. Ochs wrote:
> The PCI core uses a fixed 50ms timeout when waiting for VPD accesses to
> complete. When an access does not complete within this period, a warning
> is logged and an error returned to the caller.
>
> While this default timeout is valid for most hardware, some devices can
> experience longer access delays under certain circumstances. For example,
> one of the IBM CXL Flash devices can take up to ~120ms in a worst-case
> scenario. These types of devices can benefit from an extended timeout.
>
> To support devices with a longer access delay, increase the timeout in
> pci_vpd_wait() to 125ms. The PCI specification is silent with respect to
> VPD delays, therefore there is no concern for violating a threshold.
>
> Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Applied to pci/vpd for v4.11, with Tested-by Uma and Reviewed-by Gavin,
thanks!
> ---
> drivers/pci/access.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/access.c b/drivers/pci/access.c
> index d11cdbb..61b5a6b 100644
> --- a/drivers/pci/access.c
> +++ b/drivers/pci/access.c
> @@ -355,7 +355,7 @@ static size_t pci_vpd_size(struct pci_dev *dev, size_t old_size)
> static int pci_vpd_wait(struct pci_dev *dev)
> {
> struct pci_vpd *vpd = dev->vpd;
> - unsigned long timeout = jiffies + msecs_to_jiffies(50);
> + unsigned long timeout = jiffies + msecs_to_jiffies(125);
> unsigned long max_sleep = 16;
> u16 status;
> int ret;
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread