From: Niklas Cassel <cassel@kernel.org>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: "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>,
"Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Manivannan Sadhasivam" <manivannan.sadhasivam@oss.qualcomm.com>
Subject: Re: [PATCH] PCI: qcom: Ignore -ENODEV after Root Port reset
Date: Wed, 16 Sep 2026 17:53:51 +0200 [thread overview]
Message-ID: <aqq7j9L76coy65lC@ryzen> (raw)
In-Reply-To: <20260916-topic-pcie_portrec_enodev-v1-1-5dc7bde39552@oss.qualcomm.com>
Hello Konrad,
On Wed, Sep 16, 2026 at 02:37:49PM +0200, Konrad Dybcio wrote:
> Root Port recovery may race with a device hot-unplug. In that case,
> dw_pcie_wait_for_link() returns -ENODEV because no device is detected
> after the controller has been successfully reset.
>
> This is a valid outcome and should not cause Root Port recovery to
> fail. Ignore -ENODEV while continuing to propagate other link-training
> errors.
>
> Assisted-by: LLM
> Fixes: 4d88cb82a6d9 ("PCI: qcom: Implement .reset_root_port() and use for link down")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@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 ee63a6ec99de4d07c16b8d6cb68df0d92f822cd8..3d3be9bf798b7c247d69969d6570385b8648123f 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1880,6 +1880,9 @@ static int qcom_pcie_reset_root_port(struct pci_host_bridge *bridge,
> qcom_pcie_start_link(pci);
>
> ret = dw_pcie_wait_for_link(pci);
> + /* This linkdown might have been a hot-unplug */
> + if (ret == -ENODEV)
> + ret = 0;
> if (ret)
> return ret;
I did not know that pcie-qcom supported hotplug.
Last when I was discussing this with Mani, I'm quite sure that he said that
it doesn't, see:
https://lore.kernel.org/all/20251222064207.3246632-8-cassel@kernel.org/
If that is the case, perhaps the commit message and code comment should be
clarified, so it is more clear what it actually means.
Kind regards,
Niklas
next prev parent reply other threads:[~2026-09-16 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 12:37 Konrad Dybcio
2026-09-16 13:37 ` Krishna Chaitanya Chundru
2026-09-16 15:53 ` Niklas Cassel [this message]
2026-09-16 16:13 ` Konrad Dybcio
2026-09-16 16:24 ` Niklas Cassel
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=aqq7j9L76coy65lC@ryzen \
--to=cassel@kernel.org \
--cc=bhelgaas@google.com \
--cc=konrad.dybcio@oss.qualcomm.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=manivannan.sadhasivam@oss.qualcomm.com \
--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®