[PATCH 2/2] PCI: qcom: Reinitialize MSI on resume for firmware-managed controllers
From: Mrinmay Sarkar
Date: Fri Oct 16 2026 - 09:03:34 EST
On firmware-managed PCIe controllers, hardware context is lost across
system suspend. While firmware reinitializes the controller through the
power domain framework during resume, the DesignWare MSI registers are
not preserved across the power cycle and must be reprogrammed by the
driver.
Retrieve the DesignWare PCIe context and reinitialize MSI state during
the resume path for firmware-managed controllers to restore MSI
functionality after resume.
Signed-off-by: Mrinmay Sarkar <mrinmay.sarkar@xxxxxxxxxxxxxxxx>
---
drivers/pci/controller/dwc/pcie-qcom.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 744455ae90d4..116622843d2a 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -2324,6 +2324,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
bridge->ops = (struct pci_ops *)&pci_qcom_ecam_ops.pci_ops;
bridge->msi_domain = true;
bridge->reset_root_port = qcom_pcie_fw_reset_root_port;
+ dev_set_drvdata(dev, cfg);
ret = pci_host_probe(bridge);
if (ret)
@@ -2551,8 +2552,14 @@ static int qcom_pcie_resume_noirq(struct device *dev)
int ret;
const struct qcom_pcie_cfg *pcie_cfg = of_device_get_match_data(dev);
- if (pcie_cfg && pcie_cfg->firmware_managed)
+ if (pcie_cfg && pcie_cfg->firmware_managed) {
+ struct pci_config_window *cfg = dev_get_drvdata(dev);
+
+ if (cfg && cfg->priv)
+ dw_pcie_msi_init(cfg->priv);
+
return 0;
+ }
pcie = dev_get_drvdata(dev);
if (!pcie)
--
2.43.0