RE: [PATCH 1/2] PCI: Add pci_set_vpd_timeout() to set VPD access timeout
From: Stephen Hemminger <hidden>
Date: 2016-11-22 17:17:13
I had old Marvell Sky2 hardware that had slow flash. -----Original Message----- From: Andrew Donnellan [mailto:andrew.donnellan@au1.ibm.com]=20 Sent: Monday, November 21, 2016 4:16 PM To: Bjorn Helgaas <helgaas@kernel.org>; Matthew R. Ochs <mrochs@linux.vnet.= ibm.com> Cc: linux-pci@vger.kernel.org; Frederic Barrat <redacted>= ; Uma Krishnan [off-list ref]; Ian Munsie <imunsie@au1.ibm.co= m>; Bjorn Helgaas [off-list ref]; linuxppc-dev@lists.ozlabs.org; Ste= phen Hemminger [off-list ref] Subject: Re: [PATCH 1/2] PCI: Add pci_set_vpd_timeout() to set VPD access t= imeout On 22/11/16 09:05, Bjorn Helgaas wrote:
Hi Matthew, On Mon, Nov 21, 2016 at 03:09:49PM -0600, Matthew R. Ochs wrote:quoted
The PCI core uses a fixed 50ms timeout when waiting for VPD accesses=20 to complete. When an access does not complete within this period, a=20 warning is logged and an error returned to the caller. While this default timeout is valid for most hardware, some devices=20 can experience longer access delays under certain circumstances. For=20 example, one of the IBM CXL Flash devices can take up to ~120ms in a=20 worst-case scenario. These types of devices can benefit from an=20 extended timeout that is specific to their hardware constraints. To support per-device VPD access timeouts, pci_set_vpd_timeout() is=20 added as an exported service. PCI devices will continue to default=20 with the 50ms timeout and use a per-device timeout when a driver calls t=
his new service.
Can you include a pointer to something in the spec that's behind the=20 default 50ms timeout, or did somebody just pull that number out of the=20 air?
It looks like Stephen Hemminger added the 50ms timeout in 1120f8b8169f, whi= ch seems to indicate that 50ms was chosen because it's longer than the 13ms= per word that was measured on one device. --=20 Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited