From: Hou Zhiqiang Date: Fri, 5 Jul 2019 09:56:56 +0000 (+0800) Subject: PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8a4f9fea2697ae11a0f542f158636f00d10b800f;p=linux.git PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr() 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 Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Acked-by: Karthikeyan Mitran Tested-by: Karthikeyan Mitran --- diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index b3ff6555e9aa9..672e633601c78 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -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); }