ath9k: fix a soft lockup on smp systems

SVN-Revision: 35152
v19.07.3_mercusys_ac12_duma
Felix Fietkau 12 years ago
parent fca519e06d
commit b8ee5a7a1c

@ -318,15 +318,7 @@
{ {
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
bool ret = true; bool ret = true;
@@ -196,19 +196,15 @@ static bool ath_prepare_reset(struct ath @@ -202,14 +202,6 @@ 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;
if (!ath_drain_all_txq(sc, retry_tx)) if (!ath_drain_all_txq(sc, retry_tx))
ret = false; ret = false;
@ -337,11 +329,11 @@
- } else { - } else {
- ath_flushrecv(sc); - ath_flushrecv(sc);
- } - }
+ tasklet_enable(&sc->intr_tq); -
return ret; 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 ath_common *common = ath9k_hw_common(ah);
struct ath9k_hw_cal_data *caldata = NULL; struct ath9k_hw_cal_data *caldata = NULL;
bool fastcc = true; bool fastcc = true;
@ -349,7 +341,12 @@
int r; int r;
__ath_cancel_work(sc); __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) { if (!hchan) {
fastcc = false; fastcc = false;
@ -362,7 +359,16 @@
fastcc = false; fastcc = false;
ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n", 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); ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
} }

@ -80,7 +80,7 @@
debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc, debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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"); ath_dbg(common, PS, "PowerSave disabled\n");
} }
@ -89,7 +89,7 @@
{ {
struct ath_softc *sc = hw->priv; struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah; 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) { if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
struct ieee80211_channel *curchan = hw->conf.channel; struct ieee80211_channel *curchan = hw->conf.channel;
@ -101,7 +101,7 @@
if (ah->curchan) if (ah->curchan)
old_pos = ah->curchan - &ah->channels[0]; 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)); memset(&sc->survey[pos], 0, sizeof(struct survey_info));
} }

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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; return -EINVAL;
} }
@ -9,7 +9,7 @@
/* /*
* The most recent snapshot of channel->noisefloor for the old * The most recent snapshot of channel->noisefloor for the old
* channel is only available after the hardware reset. Copy it to * 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; sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow, ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow); sc->config.txpowlimit, &sc->curtxpow);

@ -21,7 +21,7 @@
if (ant_gain > max_gain) if (ant_gain > max_gain)
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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) { if (changed & IEEE80211_CONF_CHANGE_POWER) {

@ -125,7 +125,7 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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 */ ath9k_hw_getisr(ah, &status); /* NB: clears ISR too */
status &= ah->imask; /* discard unasked-for bits */ status &= ah->imask; /* discard unasked-for bits */

Loading…
Cancel
Save