[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251106061326.8241-1-manivannan.sadhasivam@oss.qualcomm.com>
Date: Thu, 6 Nov 2025 11:43:23 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
To: lpieralisi@...nel.org, kwilczynski@...nel.org, mani@...nel.org,
bhelgaas@...gle.com
Cc: will@...nel.org, linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
robh@...nel.org, linux-arm-msm@...r.kernel.org,
zhangsenchuan@...incomputing.com,
Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
Subject: [PATCH 0/3] PCI: dwc: Replace Link up check with device presence in suspend path
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.
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/
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: Skip PME_Turn_Off and L2/L3 transition if no device is
available
.../pci/controller/dwc/pcie-designware-host.c | 5 +++++
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, 32 insertions(+), 2 deletions(-)
--
2.48.1
Powered by blists - more mailing lists