From 721059ed00a45bb4d30c6cd3f2cf74c330336982 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 14 Jan 2013 15:59:28 +0000 Subject: ath9k: fix a soft lockup on smp systems Backport of r35152 git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@35153 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/mac80211/patches/300-pending_work.patch | 34 +++++++++++++--------- .../patches/512-ath9k_channelbw_debugfs.patch | 6 ++-- .../mac80211/patches/521-ath9k_cur_txpower.patch | 4 +-- .../525-ath9k_use_configured_antenna_gain.patch | 2 +- .../mac80211/patches/562-ath9k_add_idle_hack.patch | 4 +-- .../mac80211/patches/564-ath9k_debugfs_diag.patch | 2 +- .../566-ath9k_use_ieee80211_free_txskb.patch | 2 +- 7 files changed, 30 insertions(+), 24 deletions(-) diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index c0240ad01e..69c32b8760 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -1269,15 +1269,7 @@ { struct ath_hw *ah = sc->sc_ah; bool ret = true; -@@ -195,19 +195,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; - +@@ -201,14 +201,6 @@ static bool ath_prepare_reset(struct ath if (!ath_drain_all_txq(sc, retry_tx)) ret = false; @@ -1288,11 +1280,11 @@ - } else { - ath_flushrecv(sc); - } -+ tasklet_enable(&sc->intr_tq); - +- return ret; } -@@ -261,7 +257,6 @@ static int ath_reset_internal(struct ath + +@@ -261,11 +253,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; @@ -1300,7 +1292,12 @@ int r; __ath_cancel_work(sc); -@@ -275,11 +270,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)) { +@@ -275,11 +267,10 @@ static int ath_reset_internal(struct ath if (!hchan) { fastcc = false; @@ -1313,7 +1310,16 @@ fastcc = false; ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n", -@@ -821,7 +815,7 @@ static void ath9k_stop(struct ieee80211_ +@@ -297,6 +288,8 @@ static int ath_reset_internal(struct ath + + out: + spin_unlock_bh(&sc->sc_pcu_lock); ++ tasklet_enable(&sc->intr_tq); ++ + return r; + } + +@@ -821,7 +814,7 @@ static void ath9k_stop(struct ieee80211_ ath9k_hw_cfg_gpio_input(ah, ah->led_pin); } diff --git a/package/mac80211/patches/512-ath9k_channelbw_debugfs.patch b/package/mac80211/patches/512-ath9k_channelbw_debugfs.patch index db6d36b68e..15111e9b82 100644 --- a/package/mac80211/patches/512-ath9k_channelbw_debugfs.patch +++ b/package/mac80211/patches/512-ath9k_channelbw_debugfs.patch @@ -80,7 +80,7 @@ } --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1121,7 +1121,7 @@ static void ath9k_disable_ps(struct ath_ +@@ -1120,7 +1120,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; -@@ -1175,9 +1175,11 @@ static int ath9k_config(struct ieee80211 +@@ -1174,9 +1174,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]; -@@ -1220,7 +1222,23 @@ static int ath9k_config(struct ieee80211 +@@ -1219,7 +1221,23 @@ static int ath9k_config(struct ieee80211 memset(&sc->survey[pos], 0, sizeof(struct survey_info)); } diff --git a/package/mac80211/patches/521-ath9k_cur_txpower.patch b/package/mac80211/patches/521-ath9k_cur_txpower.patch index d740332de3..14b59e58e7 100644 --- a/package/mac80211/patches/521-ath9k_cur_txpower.patch +++ b/package/mac80211/patches/521-ath9k_cur_txpower.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1245,6 +1245,8 @@ int ath9k_config(struct ieee80211_hw *hw +@@ -1244,6 +1244,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 -@@ -1259,6 +1261,7 @@ int ath9k_config(struct ieee80211_hw *hw +@@ -1258,6 +1260,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); diff --git a/package/mac80211/patches/525-ath9k_use_configured_antenna_gain.patch b/package/mac80211/patches/525-ath9k_use_configured_antenna_gain.patch index 4c34c89684..367438ea3e 100644 --- a/package/mac80211/patches/525-ath9k_use_configured_antenna_gain.patch +++ b/package/mac80211/patches/525-ath9k_use_configured_antenna_gain.patch @@ -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 -@@ -1257,7 +1257,10 @@ int ath9k_config(struct ieee80211_hw *hw +@@ -1256,7 +1256,10 @@ int ath9k_config(struct ieee80211_hw *hw } if (changed & IEEE80211_CONF_CHANGE_POWER) { diff --git a/package/mac80211/patches/562-ath9k_add_idle_hack.patch b/package/mac80211/patches/562-ath9k_add_idle_hack.patch index ec8bbcef6d..7c3c0426be 100644 --- a/package/mac80211/patches/562-ath9k_add_idle_hack.patch +++ b/package/mac80211/patches/562-ath9k_add_idle_hack.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1081,6 +1081,7 @@ static void ath9k_remove_interface(struc +@@ -1080,6 +1080,7 @@ static void ath9k_remove_interface(struc ath9k_calculate_summary_state(hw, NULL); mutex_unlock(&sc->mutex); @@ -8,7 +8,7 @@ ath9k_ps_restore(sc); } -@@ -1133,7 +1134,8 @@ int ath9k_config(struct ieee80211_hw *hw +@@ -1132,7 +1133,8 @@ int ath9k_config(struct ieee80211_hw *hw mutex_lock(&sc->mutex); if (changed & IEEE80211_CONF_CHANGE_IDLE) { diff --git a/package/mac80211/patches/564-ath9k_debugfs_diag.patch b/package/mac80211/patches/564-ath9k_debugfs_diag.patch index 638d3b58d3..b7d9f5edc5 100644 --- a/package/mac80211/patches/564-ath9k_debugfs_diag.patch +++ b/package/mac80211/patches/564-ath9k_debugfs_diag.patch @@ -125,7 +125,7 @@ } --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -470,6 +470,11 @@ irqreturn_t ath_isr(int irq, void *dev) +@@ -469,6 +469,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 */ diff --git a/package/mac80211/patches/566-ath9k_use_ieee80211_free_txskb.patch b/package/mac80211/patches/566-ath9k_use_ieee80211_free_txskb.patch index 20fd408273..3b75ab5da3 100644 --- a/package/mac80211/patches/566-ath9k_use_ieee80211_free_txskb.patch +++ b/package/mac80211/patches/566-ath9k_use_ieee80211_free_txskb.patch @@ -127,7 +127,7 @@ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -769,7 +769,7 @@ static void ath9k_tx(struct ieee80211_hw +@@ -768,7 +768,7 @@ static void ath9k_tx(struct ieee80211_hw return; exit: -- cgit v1.2.3