mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
e8e2b88f5f
The 1st generation MediaTek PCIe host bridge cannot handle Message Signaled Interrupts (MSIs). The core PCI code is not aware that MSI is not available. This results in warnings of the form: WARNING: CPU: 2 PID: 112 at include/linux/msi.h:219 pci_msi_setup_msi_irqs.constprop.8+0x64/0x6c Modules linked in: ahci(+) libahci libata sd_mod scsi_mod gpio_button_hotplug CPU: 2 PID: 112 Comm: kmodloader Not tainted 5.10.52 #0 Hardware name: Mediatek Cortex-A7 (Device Tree) Import patches that introduce the 'no_msi' attribute to signal missing MSI support to the core PCI. Refresh patches: - 000-spi-fix-fifo.patch - 330-mtk-bmt-support.patch - 510-net-mediatek-add-flow-offload-for-mt7623.patch - 601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch - 610-pcie-mediatek-fix-clearing-interrupt-status.patch - 700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch - 710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
25 lines
822 B
Diff
25 lines
822 B
Diff
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
|
|
@@ -615,10 +615,10 @@ static void mtk_pcie_intr_handler(struct
|
|
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);
|
|
}
|
|
}
|
|
|