355c835a6ed46caed1e019709a9965506bfd4d4b
[openwrt/staging/blocktrron.git] /
1 From 69c1f2c6f45a556361fd8e8d2d4eb20e2c8d3d95 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
3 Date: Thu, 18 Mar 2021 17:04:32 +0100
4 Subject: [PATCH] PCI: aardvark: Check return value of
5 generic_handle_domain_irq() when processing INTx IRQ
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 It is possible that we receive spurious INTx interrupt. Check for the
11 return value of generic_handle_domain_irq() when processing INTx IRQ.
12
13 Signed-off-by: Pali Rohár <pali@kernel.org>
14 Signed-off-by: Marek Behún <kabel@kernel.org>
15 ---
16 drivers/pci/controller/pci-aardvark.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19 --- a/drivers/pci/controller/pci-aardvark.c
20 +++ b/drivers/pci/controller/pci-aardvark.c
21 @@ -1439,7 +1439,9 @@ static void advk_pcie_handle_int(struct
22 advk_writel(pcie, PCIE_ISR1_INTX_ASSERT(i),
23 PCIE_ISR1_REG);
24
25 - generic_handle_domain_irq(pcie->irq_domain, i);
26 + if (generic_handle_domain_irq(pcie->irq_domain, i) == -EINVAL)
27 + dev_err_ratelimited(&pcie->pdev->dev, "unexpected INT%c IRQ\n",
28 + (char)i + 'A');
29 }
30 }
31