Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: qcom: Skip ASPM enablement walk on resume
@ 2026-11-26  5:44 Krishna Chaitanya Chundru
  2026-11-26  5:51 ` sashiko-bot
  2026-11-26 13:07 ` Konrad Dybcio
  0 siblings, 2 replies; 3+ messages in thread
From: Krishna Chaitanya Chundru @ 2026-11-26  5:44 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas
  Cc: linux-arm-msm, linux-pci, linux-kernel, Krishna Chaitanya Chundru

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@oss.qualcomm.com>
---
 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@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-26 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  5:44 [PATCH] PCI: qcom: Skip ASPM enablement walk on resume Krishna Chaitanya Chundru
2026-11-26  5:51 ` sashiko-bot
2026-11-26 13:07 ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox