diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-14 10:56:46 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-14 15:02:22 -0500 |
commit | 4668cce527acb3bd048c5e6c99b157a14b214671 (patch) | |
tree | 33aadaddf6dbd9dba6af7cf1bd227f036b1b316d | |
parent | 463e3ed3eacc8f47866e5d612bd8ee0bcee5e2f0 (diff) |
ath9k: disable the tasklet before taking the PCU lock
Fixes a reported CPU soft lockup where the tasklet tries to acquire the
lock and blocks while ath_prepare_reset (holding the lock) waits for it
to complete.
Cc: stable@vger.kernel.org
Reported-by: Robert Shade <robert.shade@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 9844b758f81d..3796e65c26f1 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -196,16 +196,12 @@ static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx) | |||
196 | ath9k_debug_samp_bb_mac(sc); | 196 | ath9k_debug_samp_bb_mac(sc); |
197 | ath9k_hw_disable_interrupts(ah); | 197 | ath9k_hw_disable_interrupts(ah); |
198 | 198 | ||
199 | tasklet_disable(&sc->intr_tq); | ||
200 | |||
201 | if (!ath_stoprecv(sc)) | 199 | if (!ath_stoprecv(sc)) |
202 | ret = false; | 200 | ret = false; |
203 | 201 | ||
204 | if (!ath_drain_all_txq(sc, retry_tx)) | 202 | if (!ath_drain_all_txq(sc, retry_tx)) |
205 | ret = false; | 203 | ret = false; |
206 | 204 | ||
207 | tasklet_enable(&sc->intr_tq); | ||
208 | |||
209 | return ret; | 205 | return ret; |
210 | } | 206 | } |
211 | 207 | ||
@@ -262,6 +258,7 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan, | |||
262 | 258 | ||
263 | __ath_cancel_work(sc); | 259 | __ath_cancel_work(sc); |
264 | 260 | ||
261 | tasklet_disable(&sc->intr_tq); | ||
265 | spin_lock_bh(&sc->sc_pcu_lock); | 262 | spin_lock_bh(&sc->sc_pcu_lock); |
266 | 263 | ||
267 | if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) { | 264 | if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) { |
@@ -296,6 +293,8 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan, | |||
296 | 293 | ||
297 | out: | 294 | out: |
298 | spin_unlock_bh(&sc->sc_pcu_lock); | 295 | spin_unlock_bh(&sc->sc_pcu_lock); |
296 | tasklet_enable(&sc->intr_tq); | ||
297 | |||
299 | return r; | 298 | return r; |
300 | } | 299 | } |
301 | 300 | ||