Thread (10 messages) flat view 10 messages, 5 authors, 2016-11-22

Re: [PATCH 1/2] PCI: Add pci_set_vpd_timeout() to set VPD access timeout

From: Bjorn Helgaas <helgaas@kernel.org>
Date: 2016-11-21 22:05:28
Also in: linux-pci

Hi Matthew,

On Mon, Nov 21, 2016 at 03:09:49PM -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 that
is specific to their hardware constraints.

To support per-device VPD access timeouts, pci_set_vpd_timeout() is added
as an exported service. PCI devices will continue to default with the 50ms
timeout and use a per-device timeout when a driver calls this new service.
Can you include a pointer to something in the spec that's behind the
default 50ms timeout, or did somebody just pull that number out of the
air?

I'm wondering how we know 50ms or 120ms or 250ms or whatever is the
right number.  What bad things would happen if we just increased the
timeout from 50 to 125ms for *all* devices?

I don't really want to end up with a bunch of device-specific quirks
here.  If we have a quirk to work around one defective device, that's
one thing.  If the spec allows a huge variation in VPD access time,
that might be something we want to handle 

Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help