Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: qcom-ep: Clear runtime PM error after pm_runtime_resume_and_get() fails
@ 2026-09-25 10:15 Mrinmay Sarkar
  2026-09-25 10:32 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Mrinmay Sarkar @ 2026-09-25 10:15 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: linux-arm-msm, linux-pci, linux-kernel, Mrinmay Sarkar,
	Rama Krishna, Nitesh Gupta, Ayiluri Naga Rashmi,
	Krishna Chaitanya Chundru

pm_runtime_resume_and_get() sets dev->power.runtime_error when a runtime
resume fails. As a result, subsequent runtime PM resume requests fail
immediately until the error state is cleared.

In qcom_pcie_perst_deassert(), a failed resume during PERST# deassertion
leaves the endpoint controller stuck in runtime_error state. Any subsequent
PERST# deassert event that attempts to resume the controller will also fail.

Call pm_runtime_set_suspended() on the error path to clear the runtime
PM error state and allow future resume attempts.

Signed-off-by: Mrinmay Sarkar <mrinmay.sarkar@oss.qualcomm.com>
---
This patch fixes a runtime PM recovery issue in the Qualcomm PCIe
endpoint driver.

A failed pm_runtime_resume_and_get() call during PERST# deassert leaves
the device in runtime_error state, causing subsequent resume attempts
to fail. Reset the runtime PM state on the error path to allow future
resume attempts.

Thanks,
Mrinmay
---
 drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
index 8364696a1b98..5a3dfea702ce 100644
--- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
+++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
@@ -404,6 +404,7 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
 	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0) {
 		dev_err(dev, "Failed to enable device: %d\n", ret);
+		pm_runtime_set_suspended(dev);
 		return ret;
 	}
 

---
base-commit: 4c253ac4b29b8c6cc6fdef8f92d4facde62e63b9
change-id: 20260925-pcie-ep-rpm-fix-b288a0b36464

Best regards,
--  
Mrinmay Sarkar <mrinmay.sarkar@oss.qualcomm.com>


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

end of thread, other threads:[~2026-09-25 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 10:15 [PATCH] PCI: qcom-ep: Clear runtime PM error after pm_runtime_resume_and_get() fails Mrinmay Sarkar
2026-09-25 10:32 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox