ath9k: fix a soft lockup on smp systems

SVN-Revision: 35152
This commit is contained in:
Felix Fietkau 2013-01-14 15:58:46 +00:00
parent fca519e06d
commit b8ee5a7a1c
5 changed files with 27 additions and 21 deletions

View file

@ -318,15 +318,7 @@
{
struct ath_hw *ah = sc->sc_ah;
bool ret = true;
@@ -196,19 +196,15 @@ static bool ath_prepare_reset(struct ath
ath9k_debug_samp_bb_mac(sc);
ath9k_hw_disable_interrupts(ah);
+ tasklet_disable(&sc->intr_tq);
+
if (!ath_stoprecv(sc))
ret = false;
@@ -202,14 +202,6 @@ static bool ath_prepare_reset(struct ath
if (!ath_drain_all_txq(sc, retry_tx))
ret = false;
@ -337,11 +329,11 @@
- } else {
- ath_flushrecv(sc);
- }
+ tasklet_enable(&sc->intr_tq);
-
return ret;
}
@@ -262,7 +258,6 @@ static int ath_reset_internal(struct ath
@@ -262,11 +254,11 @@ static int ath_reset_internal(struct ath
struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_hw_cal_data *caldata = NULL;
bool fastcc = true;
@ -349,7 +341,12 @@
int r;
__ath_cancel_work(sc);
@@ -276,11 +271,10 @@ static int ath_reset_internal(struct ath
+ tasklet_disable(&sc->intr_tq);
spin_lock_bh(&sc->sc_pcu_lock);
if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) {
@@ -276,11 +268,10 @@ static int ath_reset_internal(struct ath
if (!hchan) {
fastcc = false;
@ -362,7 +359,16 @@
fastcc = false;
ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
@@ -804,7 +798,7 @@ static void ath9k_stop(struct ieee80211_
@@ -302,6 +293,8 @@ static int ath_reset_internal(struct ath
out:
spin_unlock_bh(&sc->sc_pcu_lock);
+ tasklet_enable(&sc->intr_tq);
+
return r;
}
@@ -804,7 +797,7 @@ static void ath9k_stop(struct ieee80211_
ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
}

View file

@ -80,7 +80,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1069,7 +1069,7 @@ static void ath9k_disable_ps(struct ath_
@@ -1068,7 +1068,7 @@ static void ath9k_disable_ps(struct ath_
ath_dbg(common, PS, "PowerSave disabled\n");
}
@ -89,7 +89,7 @@
{
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
@@ -1123,9 +1123,11 @@ static int ath9k_config(struct ieee80211
@@ -1122,9 +1122,11 @@ static int ath9k_config(struct ieee80211
if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
struct ieee80211_channel *curchan = hw->conf.channel;
@ -101,7 +101,7 @@
if (ah->curchan)
old_pos = ah->curchan - &ah->channels[0];
@@ -1168,7 +1170,23 @@ static int ath9k_config(struct ieee80211
@@ -1167,7 +1169,23 @@ static int ath9k_config(struct ieee80211
memset(&sc->survey[pos], 0, sizeof(struct survey_info));
}

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1193,6 +1193,8 @@ int ath9k_config(struct ieee80211_hw *hw
@@ -1192,6 +1192,8 @@ int ath9k_config(struct ieee80211_hw *hw
return -EINVAL;
}
@ -9,7 +9,7 @@
/*
* The most recent snapshot of channel->noisefloor for the old
* channel is only available after the hardware reset. Copy it to
@@ -1207,6 +1209,7 @@ int ath9k_config(struct ieee80211_hw *hw
@@ -1206,6 +1208,7 @@ int ath9k_config(struct ieee80211_hw *hw
sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow);

View file

@ -21,7 +21,7 @@
if (ant_gain > max_gain)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1205,7 +1205,10 @@ int ath9k_config(struct ieee80211_hw *hw
@@ -1204,7 +1204,10 @@ int ath9k_config(struct ieee80211_hw *hw
}
if (changed & IEEE80211_CONF_CHANGE_POWER) {

View file

@ -125,7 +125,7 @@
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
@@ -464,6 +464,11 @@ irqreturn_t ath_isr(int irq, void *dev)
@@ -463,6 +463,11 @@ irqreturn_t ath_isr(int irq, void *dev)
ath9k_hw_getisr(ah, &status); /* NB: clears ISR too */
status &= ah->imask; /* discard unasked-for bits */