From: Greg Kroah-Hartman Date: Tue, 10 Jul 2012 23:46:11 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.37~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56a63fced5211b17c23f91ede3f6020b2983a795;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: asoc-tlv320aic3x-fix-codec-pll-configure-bug.patch ath9k-enable-serialize_regmode-for-non-pcie-ar9287.patch ath9k-fix-softlockup-in-ar9485.patch ath9k_htc-configure-bssid-on-assoc-ibss-change.patch ath9k_hw-avoid-possible-infinite-loop-in.patch --- diff --git a/queue-3.0/asoc-tlv320aic3x-fix-codec-pll-configure-bug.patch b/queue-3.0/asoc-tlv320aic3x-fix-codec-pll-configure-bug.patch new file mode 100644 index 00000000000..78ee191423f --- /dev/null +++ b/queue-3.0/asoc-tlv320aic3x-fix-codec-pll-configure-bug.patch @@ -0,0 +1,58 @@ +From c9fe573a6584034670c1a55ee8162d623519cbbf Mon Sep 17 00:00:00 2001 +From: "Hebbar, Gururaja" +Date: Tue, 26 Jun 2012 19:25:11 +0530 +Subject: ASoC: tlv320aic3x: Fix codec pll configure bug + +From: "Hebbar, Gururaja" + +commit c9fe573a6584034670c1a55ee8162d623519cbbf upstream. + +In sound/soc/codecs/tlv320aic3x.c + + data = snd_soc_read(codec, AIC3X_PLL_PROGA_REG); + snd_soc_write(codec, AIC3X_PLL_PROGA_REG, + data | (pll_p << PLLP_SHIFT)); + +In the above code, pll-p value is OR'ed with previous value without +clearing it. Bug is not seen if pll-p value doesn't change across +Sampling frequency. + +However on some platforms (like AM335x EVM-SK), pll-p may have different +values across different sampling frequencies. In such case, above code +configures the pll with a wrong value. +Because of this bug, when a audio stream is played with pll value +different from previous stream, audio is heard as differently(like its +stretched). + +Signed-off-by: Hebbar, Gururaja +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/tlv320aic3x.c | 4 +--- + sound/soc/codecs/tlv320aic3x.h | 1 + + 2 files changed, 2 insertions(+), 3 deletions(-) + +--- a/sound/soc/codecs/tlv320aic3x.c ++++ b/sound/soc/codecs/tlv320aic3x.c +@@ -949,9 +949,7 @@ static int aic3x_hw_params(struct snd_pc + } + + found: +- data = snd_soc_read(codec, AIC3X_PLL_PROGA_REG); +- snd_soc_write(codec, AIC3X_PLL_PROGA_REG, +- data | (pll_p << PLLP_SHIFT)); ++ snd_soc_update_bits(codec, AIC3X_PLL_PROGA_REG, PLLP_MASK, pll_p); + snd_soc_write(codec, AIC3X_OVRF_STATUS_AND_PLLR_REG, + pll_r << PLLR_SHIFT); + snd_soc_write(codec, AIC3X_PLL_PROGB_REG, pll_j << PLLJ_SHIFT); +--- a/sound/soc/codecs/tlv320aic3x.h ++++ b/sound/soc/codecs/tlv320aic3x.h +@@ -166,6 +166,7 @@ + + /* PLL registers bitfields */ + #define PLLP_SHIFT 0 ++#define PLLP_MASK 7 + #define PLLQ_SHIFT 3 + #define PLLR_SHIFT 0 + #define PLLJ_SHIFT 2 diff --git a/queue-3.0/ath9k-enable-serialize_regmode-for-non-pcie-ar9287.patch b/queue-3.0/ath9k-enable-serialize_regmode-for-non-pcie-ar9287.patch new file mode 100644 index 00000000000..4a92a47c594 --- /dev/null +++ b/queue-3.0/ath9k-enable-serialize_regmode-for-non-pcie-ar9287.patch @@ -0,0 +1,32 @@ +From 7508b657967cf664b5aa0f6367d05016e7e3bc2a Mon Sep 17 00:00:00 2001 +From: Panayiotis Karabassis +Date: Tue, 26 Jun 2012 23:37:17 +0300 +Subject: ath9k: enable serialize_regmode for non-PCIE AR9287 + +From: Panayiotis Karabassis + +commit 7508b657967cf664b5aa0f6367d05016e7e3bc2a upstream. + +https://bugzilla.kernel.org/show_bug.cgi?id=42903 + +Based on the work of + +Signed-off-by: Panayiotis Karabassis +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/hw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -530,7 +530,7 @@ static int __ath9k_hw_init(struct ath_hw + + if (ah->config.serialize_regmode == SER_REG_MODE_AUTO) { + if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI || +- ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) && ++ ((AR_SREV_9160(ah) || AR_SREV_9280(ah) || AR_SREV_9287(ah)) && + !ah->is_pciexpress)) { + ah->config.serialize_regmode = + SER_REG_MODE_ON; diff --git a/queue-3.0/ath9k-fix-softlockup-in-ar9485.patch b/queue-3.0/ath9k-fix-softlockup-in-ar9485.patch new file mode 100644 index 00000000000..7cdd0fa00af --- /dev/null +++ b/queue-3.0/ath9k-fix-softlockup-in-ar9485.patch @@ -0,0 +1,66 @@ +From bcb7ad7bcbef030e6ba71ede1f9866368aca7c99 Mon Sep 17 00:00:00 2001 +From: Mohammed Shafi Shajakhan +Date: Wed, 13 Jun 2012 21:28:09 +0530 +Subject: ath9k: Fix softlockup in AR9485 + +From: Mohammed Shafi Shajakhan + +commit bcb7ad7bcbef030e6ba71ede1f9866368aca7c99 upstream. + +steps to recreate: +load latest ath9k driver with AR9485 +stop the network-manager and wpa_supplicant +bring the interface up + + Call Trace: + [] ? ath_hw_check+0xe0/0xe0 [ath9k] + [] __const_udelay+0x28/0x30 + [] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw] + [] ath_hw_pll_work+0x5b/0xe0 [ath9k] + [] process_one_work+0x11e/0x470 + [] worker_thread+0x15f/0x360 + [] ? manage_workers+0x230/0x230 + [] kthread+0x93/0xa0 + [] kernel_thread_helper+0x4/0x10 + [] ? kthread_freezable_should_stop+0x70/0x70 + [] ? gs_change+0x13/0x13 + +ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is +associated (or) IBSS/AP mode had started beaconing. Ideally this WAR +is needed to recover from some rare beacon stuck during stress testing. +Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c) +always seem to have zero even though we had configured PLL3(0x16188) to +query about PLL's locking status. When we keep on polling infinitely PLL4's +8th bit(ie check for PLL locking measurements is done), machine hangs +due to softlockup. + +fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142 + +Reported-by: Rolf Offermanns +Tested-by: Mohammed Shafi Shajakhan +Signed-off-by: Mohammed Shafi Shajakhan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/main.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -648,6 +648,15 @@ void ath_hw_pll_work(struct work_struct + hw_pll_work.work); + u32 pll_sqsum; + ++ /* ++ * ensure that the PLL WAR is executed only ++ * after the STA is associated (or) if the ++ * beaconing had started in interfaces that ++ * uses beacons. ++ */ ++ if (!(sc->sc_flags & SC_OP_BEACONS)) ++ return; ++ + if (AR_SREV_9485(sc->sc_ah)) { + + ath9k_ps_wakeup(sc); diff --git a/queue-3.0/ath9k_htc-configure-bssid-on-assoc-ibss-change.patch b/queue-3.0/ath9k_htc-configure-bssid-on-assoc-ibss-change.patch new file mode 100644 index 00000000000..3d9e6a082e5 --- /dev/null +++ b/queue-3.0/ath9k_htc-configure-bssid-on-assoc-ibss-change.patch @@ -0,0 +1,49 @@ +From 931cb03afed7b541392295f3afc4638da32f08a0 Mon Sep 17 00:00:00 2001 +From: Rajkumar Manoharan +Date: Wed, 20 Jun 2012 16:29:20 +0530 +Subject: ath9k_htc: configure bssid on ASSOC/IBSS change + +From: Rajkumar Manoharan + +commit 931cb03afed7b541392295f3afc4638da32f08a0 upstream. + +After the change "mac80211: remove spurious BSSID change flag", +BSS_CHANGED_BSSID will not be passed on association or IBSS +status changes. So it could be better to program bssid on ASSOC +or IBSS change notification. Not doing so, is affecting the +packet transmission. + +Reported-by: Michael Leun +Signed-off-by: Rajkumar Manoharan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/htc_drv_main.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c ++++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c +@@ -1487,6 +1487,7 @@ static void ath9k_htc_bss_info_changed(s + priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; + + if (priv->ah->opmode == NL80211_IFTYPE_STATION) { ++ ath9k_htc_choose_set_bssid(priv); + if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) + ath9k_htc_start_ani(priv); + else if (priv->num_sta_assoc_vif == 0) +@@ -1494,13 +1495,11 @@ static void ath9k_htc_bss_info_changed(s + } + } + +- if (changed & BSS_CHANGED_BSSID) { ++ if (changed & BSS_CHANGED_IBSS) { + if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { + common->curaid = bss_conf->aid; + memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); + ath9k_htc_set_bssid(priv); +- } else if (priv->ah->opmode == NL80211_IFTYPE_STATION) { +- ath9k_htc_choose_set_bssid(priv); + } + } + diff --git a/queue-3.0/ath9k_hw-avoid-possible-infinite-loop-in.patch b/queue-3.0/ath9k_hw-avoid-possible-infinite-loop-in.patch new file mode 100644 index 00000000000..7f26bf7aad5 --- /dev/null +++ b/queue-3.0/ath9k_hw-avoid-possible-infinite-loop-in.patch @@ -0,0 +1,59 @@ +From f18e3c6b67f448ec47b3a5b242789bd3d5644879 Mon Sep 17 00:00:00 2001 +From: Mohammed Shafi Shajakhan +Date: Mon, 18 Jun 2012 13:13:30 +0530 +Subject: ath9k_hw: avoid possible infinite loop in + ar9003_get_pll_sqsum_dvc + +From: Mohammed Shafi Shajakhan + +commit f18e3c6b67f448ec47b3a5b242789bd3d5644879 upstream. + +"ath9k: Fix softlockup in AR9485" with commit id +64bc1239c790e051ff677e023435d770d2ffa174 fixed the reported +issue, yet its better to avoid the possible infinite loop +in ar9003_get_pll_sqsum_dvc by having a timeout as suggested +by ath9k maintainers. +http://www.spinics.net/lists/linux-wireless/msg92126.html. +Based on my testing PLL's locking measurement is done in +~200us (2 iterations). + +Cc: Rolf Offermanns +Cc: Sujith Manoharan +Cc: Senthil Balasubramanian +Signed-off-by: Mohammed Shafi Shajakhan +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/hw.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -682,13 +682,25 @@ static void ath9k_hw_init_qos(struct ath + + u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) + { ++ struct ath_common *common = ath9k_hw_common(ah); ++ int i = 0; ++ + REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); + udelay(100); + REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); + +- while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) ++ while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) { ++ + udelay(100); + ++ if (WARN_ON_ONCE(i >= 100)) { ++ ath_err(common, "PLL4 meaurement not done\n"); ++ break; ++ } ++ ++ i++; ++ } ++ + return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; + } + EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); diff --git a/queue-3.0/series b/queue-3.0/series index 5f73c46fa1c..523582a5244 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -18,3 +18,8 @@ nilfs2-ensure-proper-cache-clearing-for-gc-inodes.patch udf-use-ret-instead-of-abusing-i-in-udf_load_logicalvol.patch udf-avoid-run-away-loop-when-partition-table-length-is-corrupted.patch udf-fortify-loading-of-sparing-table.patch +ath9k-fix-softlockup-in-ar9485.patch +ath9k_hw-avoid-possible-infinite-loop-in.patch +ath9k_htc-configure-bssid-on-assoc-ibss-change.patch +ath9k-enable-serialize_regmode-for-non-pcie-ar9287.patch +asoc-tlv320aic3x-fix-codec-pll-configure-bug.patch