2020-10-24 19:15:20 +00:00
|
|
|
From: Felix Fietkau <nbd@nbd.name>
|
|
|
|
Date: Fri, 4 Sep 2020 18:33:27 +0200
|
|
|
|
Subject: [PATCH] pcie-mediatek: fix clearing interrupt status
|
|
|
|
|
|
|
|
Clearing the status needs to happen after running the handler, otherwise
|
|
|
|
we will get an extra spurious interrupt after the cause has been cleared
|
|
|
|
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
---
|
|
|
|
|
|
|
|
--- a/drivers/pci/controller/pcie-mediatek.c
|
|
|
|
+++ b/drivers/pci/controller/pcie-mediatek.c
|
2021-07-28 21:18:01 +00:00
|
|
|
@@ -615,10 +615,10 @@ static void mtk_pcie_intr_handler(struct
|
2020-10-24 19:15:20 +00:00
|
|
|
if (status & INTX_MASK) {
|
|
|
|
for_each_set_bit_from(bit, &status, PCI_NUM_INTX + INTX_SHIFT) {
|
|
|
|
/* Clear the INTx */
|
|
|
|
- writel(1 << bit, port->base + PCIE_INT_STATUS);
|
|
|
|
virq = irq_find_mapping(port->irq_domain,
|
|
|
|
bit - INTX_SHIFT);
|
|
|
|
generic_handle_irq(virq);
|
|
|
|
+ writel(1 << bit, port->base + PCIE_INT_STATUS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|