aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-01-14 13:20:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-01-14 13:20:38 +0000
commit4c6a5dae3ccebfa556c53295edf6bee2910bbf6b (patch)
tree40b2fb1a88be8bf5fa17c664c83ed6feee3daaa5 /package
parent2729cdcf9e087c63bc4c51bf9fef429c71b91fd5 (diff)
downloadmaster-187ad058-4c6a5dae3ccebfa556c53295edf6bee2910bbf6b.tar.gz
master-187ad058-4c6a5dae3ccebfa556c53295edf6bee2910bbf6b.tar.bz2
master-187ad058-4c6a5dae3ccebfa556c53295edf6bee2910bbf6b.zip
ath9k: fix irq storm issues (#18483)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43971 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/329-ath9k-fix-race-condition-in-irq-processing-during-ha.patch53
-rw-r--r--package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch4
2 files changed, 55 insertions, 2 deletions
diff --git a/package/kernel/mac80211/patches/329-ath9k-fix-race-condition-in-irq-processing-during-ha.patch b/package/kernel/mac80211/patches/329-ath9k-fix-race-condition-in-irq-processing-during-ha.patch
new file mode 100644
index 0000000000..69b21e7284
--- /dev/null
+++ b/package/kernel/mac80211/patches/329-ath9k-fix-race-condition-in-irq-processing-during-ha.patch
@@ -0,0 +1,53 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Wed, 14 Jan 2015 14:13:15 +0100
+Subject: [PATCH] ath9k: fix race condition in irq processing during hardware
+ reset
+
+To fix invalid hardware accesses, the commit
+"ath9k: do not access hardware on IRQs during reset" made the irq
+handler ignore interrupts emitted after queueing a hardware reset (which
+disables the IRQ). This left a small time window for the IRQ to get
+re-enabled by the tasklet, which caused IRQ storms.
+Instead of returning IRQ_NONE when ATH_OP_HW_RESET is set, disable the
+IRQ entirely for the duration of the reset.
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -285,6 +285,7 @@ static int ath_reset_internal(struct ath
+
+ __ath_cancel_work(sc);
+
++ disable_irq(sc->irq);
+ tasklet_disable(&sc->intr_tq);
+ tasklet_disable(&sc->bcon_tasklet);
+ spin_lock_bh(&sc->sc_pcu_lock);
+@@ -331,6 +332,7 @@ static int ath_reset_internal(struct ath
+ r = -EIO;
+
+ out:
++ enable_irq(sc->irq);
+ spin_unlock_bh(&sc->sc_pcu_lock);
+ tasklet_enable(&sc->bcon_tasklet);
+ tasklet_enable(&sc->intr_tq);
+@@ -512,9 +514,6 @@ irqreturn_t ath_isr(int irq, void *dev)
+ if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
+ return IRQ_NONE;
+
+- if (!AR_SREV_9100(ah) && test_bit(ATH_OP_HW_RESET, &common->op_flags))
+- return IRQ_NONE;
+-
+ /* shared irq, not for us */
+ if (!ath9k_hw_intrpend(ah))
+ return IRQ_NONE;
+@@ -529,7 +528,7 @@ irqreturn_t ath_isr(int irq, void *dev)
+ ath9k_debug_sync_cause(sc, sync_cause);
+ status &= ah->imask; /* discard unasked-for bits */
+
+- if (AR_SREV_9100(ah) && test_bit(ATH_OP_HW_RESET, &common->op_flags))
++ if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
+ return IRQ_HANDLED;
+
+ /*
diff --git a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
index 34d698ba65..615e913a0b 100644
--- a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
@@ -125,8 +125,8 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -532,6 +532,11 @@ irqreturn_t ath_isr(int irq, void *dev)
- if (AR_SREV_9100(ah) && test_bit(ATH_OP_HW_RESET, &common->op_flags))
+@@ -531,6 +531,11 @@ irqreturn_t ath_isr(int irq, void *dev)
+ if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
return IRQ_HANDLED;
+ if (test_bit(ATH_DIAG_TRIGGER_ERROR, &ah->diag)) {