[PATCH v2 2/2] PCI: qcom: Reinitialize MSI on resume for firmware-managed controllers
From: Mrinmay Sarkar
Date: Fri Nov 27 2026 - 09:44:16 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.
Reinitialize the DesignWare MSI configuration during resume for
firmware-managed controllers to restore MSI functionality after
the controller is power-cycled.
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 fe86b8fbc895..51299dfd574c 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -2325,6 +2325,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
bridge->msi_domain = true;
if (IS_ENABLED(CONFIG_PM_SLEEP))
bridge->reset_root_port = qcom_pcie_fw_reset_root_port;
+ dev_set_drvdata(dev, cfg);
ret = pci_host_probe(bridge);
if (ret)
@@ -2552,8 +2553,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