mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/6] PCI: dwc: Rework the error handling of dw_pcie_wait_for_link() API
@ 2026-01-07  8:11 Manivannan Sadhasivam via B4 Relay
  2026-01-07  8:11 ` [PATCH v4 1/6] PCI: dwc: Return -ENODEV from dw_pcie_wait_for_link() if device is not found Manivannan Sadhasivam via B4 Relay
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-01-07  8:11 UTC (permalink / raw)
  To: Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas
  Cc: linux-pci, linux-kernel, vincent.guittot, zhangsenchuan,
	Shawn Lin, Richard Zhu, Manivannan Sadhasivam, Frank Li

Hi,

This series reworks the dw_pcie_wait_for_link() API to allow the callers to
detect the absence of the device on the bus and skip the failure.

Compared to v2, I've reworked the patch 2 to improve the API further and
dropped the patch 1 that got applied (hence changed the subject). I've also
modified the error code based on the feedback in v2 to return -ENODEV if device
is not detected on the bus and -ETIMEDOUT otherwise. This allows the callers to
skip the failure if device is not detected and handle error for other failure.

Testing
=======

Tested this series on Rb3Gen2 board without powering on the PCIe switch. Now the
dw_pcie_wait_for_link() API prints:

	qcom-pcie 1c08000.pcie: Device not found

Instead of the previous log:

	qcom-pcie 1c08000.pcie: Phy link never came up

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
Changes in v4:
- Skipped returning failure during resume as well if no device is found
- Link to v3: https://lore.kernel.org/r/20251230-pci-dwc-suspend-rework-v3-0-40cd485714f5@oss.qualcomm.com

Changes in v3:
- Dropped patch 1 that got appplied
- Reworked the error handling of dw_pcie_wait_for_link() API further
- Link to v2: https://lore.kernel.org/r/20251218-pci-dwc-suspend-rework-v2-0-5a7778c6094a@oss.qualcomm.com

Changes in v2:
- Changed the logic to check for Detect.Quiet/Active states
- Collected tags and rebased on top of v6.19-rc1
- Link to v1: https://lore.kernel.org/r/20251119-pci-dwc-suspend-rework-v1-0-aad104828562@oss.qualcomm.com

---
Manivannan Sadhasivam (6):
      PCI: dwc: Return -ENODEV from dw_pcie_wait_for_link() if device is not found
      PCI: dwc: Rename and move ltssm_status_string() to pcie-designware.c
      PCI: dwc: Rework the error print of dw_pcie_wait_for_link()
      PCI: dwc: Only skip the dw_pcie_wait_for_link() failure if it returns -ENODEV
      PCI: host-common: Add an API to check for any device under the Root Ports
      PCI: dwc: Skip failure during dw_pcie_resume_noirq() if no device is available

 .../pci/controller/dwc/pcie-designware-debugfs.c   | 54 +---------------
 drivers/pci/controller/dwc/pcie-designware-host.c  | 23 +++++--
 drivers/pci/controller/dwc/pcie-designware.c       | 75 +++++++++++++++++++++-
 drivers/pci/controller/dwc/pcie-designware.h       |  2 +
 drivers/pci/controller/pci-host-common.c           | 21 ++++++
 drivers/pci/controller/pci-host-common.h           |  2 +
 6 files changed, 115 insertions(+), 62 deletions(-)
---
base-commit: 68ac85fb42cfeb081cf029acdd8aace55ed375a2
change-id: 20251119-pci-dwc-suspend-rework-8b0515a38679

Best regards,
-- 
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>



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

end of thread, other threads:[~2026-10-13  9:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-07  8:11 [PATCH v4 0/6] PCI: dwc: Rework the error handling of dw_pcie_wait_for_link() API Manivannan Sadhasivam via B4 Relay
2026-01-07  8:11 ` [PATCH v4 1/6] PCI: dwc: Return -ENODEV from dw_pcie_wait_for_link() if device is not found Manivannan Sadhasivam via B4 Relay
2026-01-07  8:34   ` Shawn Lin
2026-01-07  8:11 ` [PATCH v4 2/6] PCI: dwc: Rename and move ltssm_status_string() to pcie-designware.c Manivannan Sadhasivam via B4 Relay
2026-01-07  8:35   ` Shawn Lin
2026-01-07  8:11 ` [PATCH v4 3/6] PCI: dwc: Rework the error print of dw_pcie_wait_for_link() Manivannan Sadhasivam via B4 Relay
2026-01-07  8:38   ` Shawn Lin
2026-01-07  9:09     ` Manivannan Sadhasivam
2026-01-07  9:28       ` Shawn Lin
2026-01-07  8:11 ` [PATCH v4 4/6] PCI: dwc: Only skip the dw_pcie_wait_for_link() failure if it returns -ENODEV Manivannan Sadhasivam via B4 Relay
2026-01-07  8:38   ` Shawn Lin
2026-01-07  8:11 ` [PATCH v4 5/6] PCI: host-common: Add an API to check for any device under the Root Ports Manivannan Sadhasivam via B4 Relay
2026-01-07  8:39   ` Shawn Lin
2026-01-07  8:11 ` [PATCH v4 6/6] PCI: dwc: Skip failure during dw_pcie_resume_noirq() if no device is available Manivannan Sadhasivam via B4 Relay
2026-01-07  8:41   ` Shawn Lin
2026-01-13 17:53 ` [PATCH v4 0/6] PCI: dwc: Rework the error handling of dw_pcie_wait_for_link() API Vincent Guittot
2026-01-16  1:36 ` Hongxing Zhu
2026-10-13  9:15 ` Franz Schnyder

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®