PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr()
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Fri, 5 Jul 2019 09:56:56 +0000 (17:56 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 8 Jul 2019 11:39:09 +0000 (12:39 +0100)
The current INTx handling function clears all interrupts after
handling the first pending; this can potentially cause missing INTx
detection. Fix the code to clear only the handled INTx IRQ.

Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Minghuan Lian <Minghuan.Lian@nxp.com>
Reviewed-by: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
Acked-by: Karthikeyan Mitran <m.karthikeyan@mobiveil.co.in>
Tested-by: Karthikeyan Mitran <m.karthikeyan@mobiveil.co.in>
drivers/pci/controller/pcie-mobiveil.c

index b3ff6555e9aa94e3e6d2c36cc3d703d7a7f97d07..672e633601c7821e96b42142662d28a5efbe7f80 100644 (file)
@@ -371,9 +371,8 @@ static void mobiveil_pcie_isr(struct irq_desc *desc)
                                        dev_err_ratelimited(dev, "unexpected IRQ, INT%d\n",
                                                            bit);
 
-                               /* clear interrupt */
-                               csr_writel(pcie,
-                                          shifted_status << PAB_INTX_START,
+                               /* clear interrupt handled */
+                               csr_writel(pcie, 1 << (PAB_INTX_START + bit),
                                           PAB_INTP_AMBA_MISC_STAT);
                        }