aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch
blob: 517402998913fbded394f29ade940c3dca7d1cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -69,15 +69,21 @@ static void qca953x_ip2_irq_dispatch(str
 	u32 status;
 
 	status = ath79_reset_rr(QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS);
+	status &= QCA953X_PCIE_WMAC_INT_PCIE_ALL | QCA953X_PCIE_WMAC_INT_WMAC_ALL;
+
+	if (status == 0) {
+		spurious_interrupt();
+		return;
+	}
 
 	if (status & QCA953X_PCIE_WMAC_INT_PCIE_ALL) {
 		ath79_ddr_wb_flush(3);
 		generic_handle_irq(ATH79_IP2_IRQ(0));
-	} else if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) {
+	}
+
+	if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) {
 		ath79_ddr_wb_flush(4);
 		generic_handle_irq(ATH79_IP2_IRQ(1));
-	} else {
-		spurious_interrupt();
 	}
 }