Skip to contentSkip to conversation

ARM: imx6: Fix non-working MSI interrupts if PCIe switch is attached

PATCH New David Müller 3 participants 4 messages Jun 18, 2015 – Jul 14, 2015

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

PATCH 1/1 ARM: imx6: Fix non-working MSI interrupts if PCIe switch is attached

This problem has already been reported as
https://bugzilla.kernel.org/show_bug.cgi?id=100051

---
 drivers/pci/host/pci-imx6.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/host/pci-imx6.c +3 -3
index c63691c..53f8dea 100644
@@ -433,9 +433,6 @@ static void imx6_pcie_host_init(struct pcie_port *pp)
 	dw_pcie_setup_rc(pp);
 
 	imx6_pcie_start_link(pp);
-
-	if (IS_ENABLED(CONFIG_PCI_MSI))
-		dw_pcie_msi_init(pp);
 }
 
 static void imx6_pcie_reset_phy(struct pcie_port *pp)
@@ -550,6 +547,9 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp,
 		return ret;
 	}
 
+	if (IS_ENABLED(CONFIG_PCI_MSI))
+		dw_pcie_msi_init(pp);
+
 	return 0;
 }
 
Signature · 1 line
1.8.4
#1 lore raw

PATCH 1/1 ARM: imx6: Fix non-working MSI interrupts if PCIe switch is attached

Am Donnerstag, den 18.06.2015, 09:59 +0200 schrieb David M?ller:

Quoted 3 lines

This problem has already been reported as
https://bugzilla.kernel.org/show_bug.cgi?id=100051

I need more explanation for this one. MSI interrupts were certainly working fine even with a PCIe switchin between some time back. I think I personally tested things with 3.19.

In the bug report you mention that the MSI_ADDR registers are overwritten. Where does the write come from and why is it done?

Regards,
Lucas

Quoted 29 lines
---
 drivers/pci/host/pci-imx6.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/host/pci-imx6.c +3 -3
index c63691c..53f8dea 100644
@@ -433,9 +433,6 @@ static void imx6_pcie_host_init(struct pcie_port *pp)
 	dw_pcie_setup_rc(pp);
 
 	imx6_pcie_start_link(pp);
-
-	if (IS_ENABLED(CONFIG_PCI_MSI))
-		dw_pcie_msi_init(pp);
 }
 
 static void imx6_pcie_reset_phy(struct pcie_port *pp)
@@ -550,6 +547,9 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp,
 		return ret;
 	}
 
+	if (IS_ENABLED(CONFIG_PCI_MSI))
+		dw_pcie_msi_init(pp);
+
 	return 0;
 }
 
Signature · 2 lines
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |
#2 lore raw

PATCH 1/1 ARM: imx6: Fix non-working MSI interrupts if PCIe switch is attached

Quoted 6 lines · Lucas Stach

I need more explanation for this one. MSI interrupts were certainly working fine even with a PCIe switchin between some time back. I think I personally tested things with 3.19.

In the bug report you mention that the MSI_ADDR registers are overwritten. Where does the write come from and why is it done?

I don't know. I just instrumented the driver with code to dump the MSI_ADDR registers and noticed that they were programmed with the correct value once, but at a later point in time, the value is gone.

Perhaps it's a some kind of partial HW reset of the PCIe host?

I'm working with a rev 1.2 silicon of the i.MX6Q.

maintainer
#3 lore raw

PATCH 1/1 ARM: imx6: Fix non-working MSI interrupts if PCIe switch is attached

In reply to David Müller
Quoted 4 lines · David M?ller

This problem has already been reported as
https://bugzilla.kernel.org/show_bug.cgi?id=100051

Dropping for now, hoping for a repost with more info.

Quoted 35 lines
---
 drivers/pci/host/pci-imx6.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/host/pci-imx6.c +3 -3
index c63691c..53f8dea 100644
@@ -433,9 +433,6 @@ static void imx6_pcie_host_init(struct pcie_port *pp)
 	dw_pcie_setup_rc(pp);
 
 	imx6_pcie_start_link(pp);
-
-	if (IS_ENABLED(CONFIG_PCI_MSI))
-		dw_pcie_msi_init(pp);
 }
 
 static void imx6_pcie_reset_phy(struct pcie_port *pp)
@@ -550,6 +547,9 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp,
 		return ret;
 	}
 
+	if (IS_ENABLED(CONFIG_PCI_MSI))
+		dw_pcie_msi_init(pp);
+
 	return 0;
 }
 
Signature · 6 lines
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html