Skip to contentSkip to conversation

PCI: dwc: Fix MSI not work after resume

PATCH In review Jisheng Zhang 2 participants 2 messages Dec 29, 2020 – Dec 31, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 PCI: dwc: Fix MSI not work after resume

After we move dw_pcie_msi_init() into core -- dw_pcie_host_init(), the MSI stops working after resume. Because dw_pcie_host_init() is only called once during probe. To fix this issue, we move dw_pcie_msi_init() to dw_pcie_setup_rc().

Fixes 59fbab1ae40e ("PCI: dwc: Move dw_pcie_msi_init() into core")

---

Since v1:
- rebased on 5.11-rc1
- add Fixes tag

 drivers/pci/controller/dwc/pcie-designware-host.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware-host.c +2 -1
index 8a84c005f32b..5240b5f0973d 100644
@@ -423,7 +423,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
 	}
 
 	dw_pcie_setup_rc(pp);
-	dw_pcie_msi_init(pp);
 
 	if (!dw_pcie_link_up(pci) && pci->ops->start_link) {
 		ret = pci->ops->start_link(pci);
@@ -574,6 +573,8 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
 		}
 	}
 
+	dw_pcie_msi_init(pp);
+
 	/* Setup RC BARs */
 	dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, 0x00000004);
 	dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_1, 0x00000000);
Signature · 1 line
2.30.0.rc2
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Jisheng Zhang

After we move dw_pcie_msi_init() into core -- dw_pcie_host_init(), the MSI stops working after resume. Because dw_pcie_host_init() is only called once during probe. To fix this issue, we move dw_pcie_msi_init() to dw_pcie_setup_rc().

Fixes 59fbab1ae40e ("PCI: dwc: Move dw_pcie_msi_init() into core")
Quoted 8 lines

---

Since v1:
- rebased on 5.11-rc1
- add Fixes tag

 drivers/pci/controller/dwc/pcie-designware-host.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Bjorn, please pick up for 5.11.

Rob