linux-stable/drivers/pci
Lukas Wunner 189f856e76 PCI/DPC: Await readiness of secondary bus after reset
commit 53b54ad074 upstream.

pci_bridge_wait_for_secondary_bus() is called after a Secondary Bus
Reset, but not after a DPC-induced Hot Reset.

As a result, the delays prescribed by PCIe r6.0 sec 6.6.1 are not
observed and devices on the secondary bus may be accessed before
they're ready.

One affected device is Intel's Ponte Vecchio HPC GPU.  It comprises a
PCIe switch whose upstream port is not immediately ready after reset.
Because its config space is restored too early, it remains in
D0uninitialized, its subordinate devices remain inaccessible and DPC
recovery fails with messages such as:

  i915 0000:8c:00.0: can't change power state from D3cold to D0 (config space inaccessible)
  intel_vsec 0000:8e:00.1: can't change power state from D3cold to D0 (config space inaccessible)
  pcieport 0000:89:02.0: AER: device recovery failed

Fix it.

Link: https://lore.kernel.org/r/9f5ff00e1593d8d9a4b452398b98aa14d23fca11.1673769517.git.lukas@wunner.de
Tested-by: Ravi Kishore Koppuravuri <ravi.kishore.koppuravuri@intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-10 09:34:31 +01:00
..
controller PCI: qcom: Fix host-init error handling 2023-03-10 09:33:38 +01:00
endpoint PCI: endpoint: pci-epf-vntb: Add epf_ntb_mw_bar_clear() num_mws kernel-doc 2023-03-10 09:33:31 +01:00
hotplug
msi PCI/MSI: Correct 'can_mask' test in msi_add_msi_desc() 2022-08-26 10:47:54 -05:00
pcie PCI/DPC: Await readiness of secondary bus after reset 2023-03-10 09:34:31 +01:00
switch PCI: switchtec: Return -EFAULT for copy_to_user() errors 2023-03-10 09:33:31 +01:00
access.c
ats.c
bus.c
doe.c PCI/DOE: Fix maximum data object length miscalculation 2023-01-07 11:11:46 +01:00
ecam.c
host-bridge.c
iov.c PCI/IOV: Enlarge virtfn sysfs name buffer 2023-03-10 09:33:31 +01:00
irq.c PCI: Check for alloc failure in pci_request_irq() 2022-12-31 13:32:33 +01:00
Kconfig cxl for 6.0 2022-08-10 11:07:26 -07:00
Makefile PCI/DOE: Add DOE mailbox support functions 2022-07-19 15:38:04 -07:00
mmap.c PCI: Remove pci_mmap_page_range() wrapper 2022-07-29 12:08:44 -05:00
of.c IOMMU Updates for Linux v5.19 2022-05-31 09:56:54 -07:00
p2pdma.c PCI/P2PDMA: Use for_each_pci_dev() helper 2022-09-19 13:44:38 -05:00
pci-acpi.c PCI/ACPI: Update link to PCI firmware specification 2022-07-22 14:38:38 -05:00
pci-bridge-emul.c PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-bridge-emul.h PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-driver.c PCI: Unify delay handling for reset and resume 2023-03-10 09:34:30 +01:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Fix double free in error path 2023-01-07 11:11:53 +01:00
pci.c PCI/DPC: Await readiness of secondary bus after reset 2023-03-10 09:34:31 +01:00
pci.h PCI/DPC: Await readiness of secondary bus after reset 2023-03-10 09:34:31 +01:00
probe.c PCI: Fix dropping valid root bus resources with .end = zero 2023-03-10 09:33:38 +01:00
proc.c PCI: Remove pci_mmap_page_range() wrapper 2022-07-29 12:08:44 -05:00
quirks.c PCI: Avoid FLR for AMD FCH AHCI adapters 2023-03-10 09:34:31 +01:00
remove.c
rom.c
search.c
setup-bus.c Revert "PCI: Distribute available resources for root buses, too" 2022-10-14 14:27:58 -05:00
setup-irq.c
setup-res.c PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2022-09-21 17:52:47 -05:00
slot.c
syscall.c
vc.c
vgaarb.c
vpd.c
xen-pcifront.c xen/pcifront: move xenstore config scanning into sub-function 2022-10-07 07:36:44 +02:00