提交 4f69bd16 编写于 作者: M Matthew R. Ochs 提交者: Bjorn Helgaas

PCI: Increase VPD access timeout to 125ms

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.
Tested-by: NUma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: NMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
上级 7ce7d89f
......@@ -367,7 +367,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册