[PATCH] PCI: qcom: Skip ASPM enablement walk on resume
From: Krishna Chaitanya Chundru
Date: Thu Nov 26 2026 - 00:44:44 EST
qcom_pcie_host_post_init_2_7_0() walks the bus and calls
pci_set_power_state(D0) and pci_enable_link_state() on every downstream
device. It runs from pp->ops->post_init(), which dw_pcie_resume_noirq()
invokes on the resume path in addition to the initial host init.
On resume, the PCI core has not yet restored the downstream devices
saved config space, so the config accesses performed by the walk fail.
With a PCIe switch in the topology this is easily hit, producing errors
such as:
pcieport 0000:02:01.0: Unable to change power state from D3hot to D0, device inaccessible
ath12k_wifi7_pci 0000:03:00.0: Unable to change power state from D3hot to D0, device inaccessible
pcieport 0000:02:02.0: Unable to change power state from D3hot to D0, device inaccessible
pci 0000:05:00.0: Unable to change power state from unknown to D0, device inaccessible
The walk is also redundant on resume: the ASPM link state is restored by
the PCI core as part of the config space save/restore. Skip the walk when
the controller is resuming, which is the case while pci->suspended is
still set at post_init() time.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@xxxxxxxxxxxxxxxx>
---
drivers/pci/controller/dwc/pcie-qcom.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index a6a0e3ecd921..bd1ffbf5c21a 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1174,6 +1174,9 @@ static void qcom_pcie_host_post_init_2_7_0(struct qcom_pcie *pcie)
{
struct dw_pcie_rp *pp = &pcie->pci->pp;
+ if (pcie->pci->suspended)
+ return;
+
pci_walk_bus(pp->bridge->bus, qcom_pcie_enable_aspm, NULL);
}
---
base-commit: 647e1e846730c6aad27e9b858df292f5d4377f63
change-id: 20261126-qcom-aspm-resume-881010149a0a
Best regards,
--
Krishna Chaitanya Chundru <krishna.chundru@xxxxxxxxxxxxxxxx>