kernel: bump 5.4 to 5.4.92
[openwrt/openwrt.git] / target / linux / mediatek / patches-5.4 / 1010-pcie-mediatek-fix-clearing-interrupt-status.patch
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
4
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
7
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 ---
10
11 --- a/drivers/pci/controller/pcie-mediatek.c
12 +++ b/drivers/pci/controller/pcie-mediatek.c
13 @@ -616,10 +616,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) {
16 /* Clear the INTx */
17 - writel(1 << bit, port->base + PCIE_INT_STATUS);
18 virq = irq_find_mapping(port->irq_domain,
19 bit - INTX_SHIFT);
20 generic_handle_irq(virq);
21 + writel(1 << bit, port->base + PCIE_INT_STATUS);
22 }
23 }
24