aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2019-09-11 12:47:27 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2019-09-13 16:39:44 +0200
commitfebf9de9cf8da24c9c15522d721fb36b6baf98c6 (patch)
treedf5352e1454282f11ab5c05146444993df4f3263 /target
parentca3c7a88686ee57a35213dfc96489cf871ec83e2 (diff)
downloadupstream-febf9de9cf8da24c9c15522d721fb36b6baf98c6.tar.gz
upstream-febf9de9cf8da24c9c15522d721fb36b6baf98c6.tar.bz2
upstream-febf9de9cf8da24c9c15522d721fb36b6baf98c6.zip
ar71xx: fix potential IRQ misses during dispatch for qca953x
If both interrupts are set in the current implementation only the 1st will be handled and the 2nd will be skipped due to the "if else" condition. Fix this by using the same approach as done for QCA955x just below it. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> (cherry picked from commit 9e8c36557cc0582986862f5a36e17adf6db2b90e)
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch b/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch
new file mode 100644
index 0000000000..5174029989
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.14/955-qca953x-fix-potential-missing-irq-dispatch.patch
@@ -0,0 +1,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();
+ }
+ }
+