android_kernel_xiaomi_sm8450/drivers/pci/pcie
Lukas Wunner d0292124bb PCI/DPC: Await readiness of secondary bus after reset
commit 53b54ad074de1896f8b021615f65b27f557ce874 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-22 13:30:06 +01:00
..
aer_inject.c PCI: Replace http:// links with https:// 2020-06-30 13:05:09 -05:00
aer.c PCI/AER: Iterate over error counters instead of error strings 2022-08-21 15:16:19 +02:00
aspm.c PCI/ASPM: Remove struct pcie_link_state.l1ss 2020-10-16 11:21:19 -05:00
dpc.c PCI/DPC: Await readiness of secondary bus after reset 2023-03-22 13:30:06 +01:00
edr.c PCI/EDR: Log only ACPI_NOTIFY_DISCONNECT_RECOVER events 2020-04-24 18:33:29 -05:00
err.c PCI/ERR: Retain status from error notification 2022-08-25 11:38:23 +02:00
Kconfig PCI/LINK: Remove bandwidth notification 2021-03-17 17:06:24 +01:00
Makefile PCI/LINK: Remove bandwidth notification 2021-03-17 17:06:24 +01:00
pme.c PCI/PME: Fix kernel-doc of pcie_pme_resume() and pcie_pme_remove() 2020-05-21 15:04:45 -05:00
portdrv_core.c Revert "PCI/portdrv: Don't disable AER reporting in get_port_device_capability()" 2022-09-05 10:28:55 +02:00
portdrv_pci.c PCI/ERR: Simplify by computing pci_pcie_type() once 2022-08-21 15:16:18 +02:00
portdrv.h PCI/LINK: Remove bandwidth notification 2021-03-17 17:06:24 +01:00
ptm.c PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port 2020-05-21 15:53:07 -05:00