linux-stable/drivers/pci
Lukas Wunner ecc8943672 PCI: Lengthen reset delay for VideoPropulsion Torrent QN16e card
[ Upstream commit c9260693aa ]

Commit ac91e69805 ("PCI: Unify delay handling for reset and resume")
shortened an unconditional 1 sec delay after a Secondary Bus Reset to 100
msec for PCIe (per PCIe r6.1 sec 6.6.1).  The 1 sec delay is only required
for Conventional PCI.

But it turns out that there are PCIe devices which require a longer delay
than prescribed before first config space access after reset recovery or
resume from D3cold:

Chad reports that a "VideoPropulsion Torrent QN16e" MPEG QAM Modulator
"raises a PCI system error (PERR), as reported by the IPMI event log, and
the hardware itself would suffer a catastrophic event, cycling the server"
unless the longer delay is observed.

The card is specified to conform to PCIe r1.0 and indeed only supports Gen1
speed (2.5 GT/s) according to lspci.  PCIe r1.0 sec 7.6 prescribes the same
100 msec delay as PCIe r6.1 sec 6.6.1:

  To allow components to perform internal initialization, system software
  must wait for at least 100 ms from the end of a reset (cold/warm/hot)
  before it is permitted to issue Configuration Requests

The behavior of the Torrent QN16e card thus appears to be a quirk.  Treat
it as such and lengthen the reset delay for this specific device.

Fixes: ac91e69805 ("PCI: Unify delay handling for reset and resume")
Link: https://lore.kernel.org/r/47727e792c7f0282dc144e3ec8ce8eb6e713394e.1695304512.git.lukas@wunner.de
Reported-by: Chad Schroeder <CSchroeder@sonifi.com>
Closes: https://lore.kernel.org/linux-pci/DM6PR16MB2844903E34CAB910082DF019B1FAA@DM6PR16MB2844.namprd16.prod.outlook.com/
Tested-by: Chad Schroeder <CSchroeder@sonifi.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:15:09 +00:00
..
controller PCI: qcom-ep: Add dedicated callback for writing to DBI2 registers 2023-11-28 17:15:09 +00:00
endpoint PCI: endpoint: Fix double free in __pci_epc_create() 2023-11-20 11:57:11 +01:00
hotplug PCI: pciehp: Use RMW accessors for changing LNKCTL 2023-09-13 09:53:30 +02:00
msi PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries() 2023-04-16 14:11:51 +02:00
pcie PCI/ASPM: Fix L1 substate handling in aspm_attr_store_common() 2023-11-28 17:15:04 +00:00
switch driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
Kconfig scatterlist: add dedicated config for DMA flags 2023-06-19 16:19:22 -07:00
Makefile
access.c PCI: Add locking to RMW PCI Express Capability Register accessors 2023-09-13 09:53:30 +02:00
ats.c PCI: Enable PASID only when ACS RR & UF enabled on upstream path 2022-11-03 15:47:47 +01:00
bus.c PCI: move OF status = "disabled" detection to dev->match_driver 2023-08-09 09:18:30 +01:00
doe.c PCI/DOE: Fix destroy_work_on_stack() race 2023-09-13 09:53:28 +02:00
ecam.c
host-bridge.c
iov.c PCI/IOV: Enlarge virtfn sysfs name buffer 2023-01-18 10:54:41 -06:00
irq.c PCI: Check for alloc failure in pci_request_irq() 2022-11-21 16:55:18 -06:00
mmap.c
of.c PCI: move OF status = "disabled" detection to dev->match_driver 2023-08-09 09:18:30 +01:00
p2pdma.c PCI/P2PDMA: Fix pci_p2pmem_find_many() kernel-doc 2023-04-06 16:37:51 -05:00
pci-acpi.c PCI/sysfs: Protect driver's D3cold preference from user space 2023-11-28 17:15:00 +00:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI/PM: Mark devices disconnected if upstream PCIe link is down on resume 2023-10-10 22:02:57 +02:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Protect driver's D3cold preference from user space 2023-11-28 17:15:00 +00:00
pci.c PCI: Use FIELD_GET() in Sapphire RX 5600 XT Pulse quirk 2023-11-28 17:14:48 +00:00
pci.h Merge branch 'pci/pm' 2023-06-26 12:59:56 -05:00
probe.c PCI: Do error check on own line to split long "if" conditions 2023-11-28 17:14:48 +00:00
proc.c
quirks.c PCI: Lengthen reset delay for VideoPropulsion Torrent QN16e card 2023-11-28 17:15:09 +00:00
remove.c cxl for v6.4 2023-04-30 11:51:51 -07:00
rom.c
search.c
setup-bus.c PCI: Make pci_bus_for_each_resource() index optional 2023-04-05 15:10:09 -05:00
setup-irq.c
setup-res.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
slot.c PCI/sysfs: Constify struct kobj_type pci_slot_ktype 2023-02-16 12:00:25 -06:00
syscall.c
vc.c
vgaarb.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
vpd.c
xen-pcifront.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00