From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>
Cc: linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: qcom: Skip ASPM enablement walk on resume
Date: Thu, 26 Nov 2026 14:07:22 +0100 [thread overview]
Message-ID: <b4aa73a1-ccdb-4ea7-a800-3c4ef20024dd@oss.qualcomm.com> (raw)
In-Reply-To: <20261126-qcom-aspm-resume-v1-1-a34625656e92@oss.qualcomm.com>
On 11/26/26 6:44 AM, Krishna Chaitanya Chundru wrote:
> 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;
Is this going to regress hotplugged devices?
Or do we need this bus walk anyway now that we have
eacf92a29af9 ("PCI/ASPM: Mask ASPM states based on Devicetree properties")
?
Konrad
prev parent reply other threads:[~2026-11-26 13:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 5:44 Krishna Chaitanya Chundru
2026-11-26 13:07 ` Konrad Dybcio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4aa73a1-ccdb-4ea7-a800-3c4ef20024dd@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=bhelgaas@google.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®