From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
To: lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org,
bhelgaas@google.com
Cc: will@kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, robh@kernel.org,
linux-arm-msm@vger.kernel.org, zhangsenchuan@eswincomputing.com,
vincent.guittot@linaro.org,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Subject: [PATCH v2 0/3] PCI: dwc: Check for device presence in suspend and resume
Date: Fri, 7 Nov 2025 10:13:16 +0530 [thread overview]
Message-ID: <20251107044319.8356-1-manivannan.sadhasivam@oss.qualcomm.com> (raw)
Hi,
This series aims to fix the usage of dw_pcie_link_up() API to check for Link up
during system suspend. The motivation for this series comes from recent
discussions [1] [2], where developers wanted to skip PME_Turn_Off broadcast in
dw_pcie_suspend_noirq() API when devices are not attached to the bus. They ended
up using dw_pcie_link_up() to check for the device presence due to the bad
example in the pcie-qcom driver which does the same. The usage of
dw_pcie_link_up() API here would be racy as the link can go down at any time
after the check.
So to properly check for the device presence, this series introduces an API,
pci_root_ports_have_device(), that accepts the Root bus pointer and checks for
the presence of a device under any of the Root Ports. This API is used to
replace the dw_pcie_link_up() check in suspend path of pcie-qcom driver and also
used to skip the PME_Turn_Off brodcast message in dwc_pcie_suspend_noirq() API
and to skip waiting for the link up in dwc_pcie_resume_noirq() API.
Testing
=======
This series is tested on Qualcomm Lenovo Thinkpad T14s and observed no
functional change during the system suspend path.
- Mani
[1] https://lore.kernel.org/linux-pci/CAKfTPtCtHquxtK=Zx2WSNm15MmqeUXO8XXi8FkS4EpuP80PP7g@mail.gmail.com/
[2] https://lore.kernel.org/linux-pci/27516921.17f2.1997bb2a498.Coremail.zhangsenchuan@eswincomputing.com/
Changes in v2:
* Skipped waiting for link up in dwc_pcie_resume_noirq() if there was no device
before suspend.
* Fixed the kdoc for pci_root_ports_have_device()
Manivannan Sadhasivam (3):
PCI: host-common: Add an API to check for any device under the Root
Ports
PCI: qcom: Check for the presence of a device instead of Link up
during suspend
PCI: dwc: Check for the device presence during suspend and resume
.../pci/controller/dwc/pcie-designware-host.c | 13 ++++++++++++
drivers/pci/controller/dwc/pcie-qcom.c | 6 ++++--
drivers/pci/controller/pci-host-common.c | 21 +++++++++++++++++++
drivers/pci/controller/pci-host-common.h | 2 ++
4 files changed, 40 insertions(+), 2 deletions(-)
--
2.48.1
next reply other threads:[~2025-11-07 4:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 4:43 Manivannan Sadhasivam [this message]
2025-11-07 4:43 ` [PATCH v2 1/3] PCI: host-common: Add an API to check for any device under the Root Ports Manivannan Sadhasivam
2025-11-10 16:36 ` Frank Li
2025-11-07 4:43 ` [PATCH v2 2/3] PCI: qcom: Check for the presence of a device instead of Link up during suspend Manivannan Sadhasivam
2025-11-13 16:41 ` Bjorn Helgaas
2025-11-13 16:54 ` Manivannan Sadhasivam
2025-11-13 17:22 ` Bjorn Helgaas
2025-11-17 17:37 ` Manivannan Sadhasivam
2025-11-19 8:03 ` zhangsenchuan
2025-11-19 16:15 ` Manivannan Sadhasivam
2025-11-07 4:43 ` [PATCH v2 3/3] PCI: dwc: Check for the device presence during suspend and resume Manivannan Sadhasivam
2025-11-10 16:26 ` Frank Li
2025-11-13 16:56 ` Manivannan Sadhasivam
2025-11-13 16:40 ` Bjorn Helgaas
2025-11-13 17:01 ` Manivannan Sadhasivam
2025-11-14 2:03 ` zhangsenchuan
2025-11-08 10:24 ` [PATCH v2 0/3] PCI: dwc: Check for device presence in " Manivannan Sadhasivam
2025-11-10 10:48 ` Vincent Guittot
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=20251107044319.8356-1-manivannan.sadhasivam@oss.qualcomm.com \
--to=manivannan.sadhasivam@oss.qualcomm.com \
--cc=bhelgaas@google.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 \
--cc=vincent.guittot@linaro.org \
--cc=will@kernel.org \
--cc=zhangsenchuan@eswincomputing.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).