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