From: Greg Kroah-Hartman Date: Fri, 9 May 2014 05:23:18 +0000 (+0200) Subject: 3.14-stable patches X-Git-Tag: v3.14.4~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b90c1aff80be7b51c3a3f468307365796937585;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: locks-allow-__break_lease-to-sleep-even-when-break_time-is-0.patch rtlwifi-rtl8188ee-fix-too-long-disable-of-irqs.patch rtlwifi-rtl8188ee-initialize-packet_beacon.patch rtlwifi-rtl8192cu-fix-too-long-disable-of-irqs.patch rtlwifi-rtl8192se-fix-regression-due-to-commit-1bf4bbb.patch rtlwifi-rtl8192se-fix-too-long-disable-of-irqs.patch rtlwifi-rtl8723ae-fix-too-long-disable-of-irqs.patch --- diff --git a/queue-3.14/locks-allow-__break_lease-to-sleep-even-when-break_time-is-0.patch b/queue-3.14/locks-allow-__break_lease-to-sleep-even-when-break_time-is-0.patch new file mode 100644 index 00000000000..81bd42e5788 --- /dev/null +++ b/queue-3.14/locks-allow-__break_lease-to-sleep-even-when-break_time-is-0.patch @@ -0,0 +1,48 @@ +From 4991a628a789dc5954e98e79476d9808812292ec Mon Sep 17 00:00:00 2001 +From: Jeff Layton +Date: Tue, 15 Apr 2014 08:44:12 -0400 +Subject: locks: allow __break_lease to sleep even when break_time is 0 + +From: Jeff Layton + +commit 4991a628a789dc5954e98e79476d9808812292ec upstream. + +A fl->fl_break_time of 0 has a special meaning to the lease break code +that basically means "never break the lease". knfsd uses this to ensure +that leases don't disappear out from under it. + +Unfortunately, the code in __break_lease can end up passing this value +to wait_event_interruptible as a timeout, which prevents it from going +to sleep at all. This causes __break_lease to spin in a tight loop and +causes soft lockups. + +Fix this by ensuring that we pass a minimum value of 1 as a timeout +instead. + +Cc: J. Bruce Fields +Reported-by: Terry Barnaby +Signed-off-by: Jeff Layton +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + fs/locks.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/fs/locks.c ++++ b/fs/locks.c +@@ -1376,11 +1376,10 @@ int __break_lease(struct inode *inode, u + + restart: + break_time = flock->fl_break_time; +- if (break_time != 0) { ++ if (break_time != 0) + break_time -= jiffies; +- if (break_time == 0) +- break_time++; +- } ++ if (break_time == 0) ++ break_time++; + locks_insert_block(flock, new_fl); + spin_unlock(&inode->i_lock); + error = wait_event_interruptible_timeout(new_fl->fl_wait, diff --git a/queue-3.14/rtlwifi-rtl8188ee-fix-too-long-disable-of-irqs.patch b/queue-3.14/rtlwifi-rtl8188ee-fix-too-long-disable-of-irqs.patch new file mode 100644 index 00000000000..a14ad3d0e7d --- /dev/null +++ b/queue-3.14/rtlwifi-rtl8188ee-fix-too-long-disable-of-irqs.patch @@ -0,0 +1,78 @@ +From 6b6392715856d563719991e9ce95e773491a8983 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 4 Mar 2014 16:53:52 -0600 +Subject: rtlwifi: rtl8188ee: Fix too long disable of IRQs + +From: Larry Finger + +commit 6b6392715856d563719991e9ce95e773491a8983 upstream. + +In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: +rtl8192ce: Fix too long disable of IRQs", Olivier Langlois + fixed a problem caused by an extra long disabling +of interrupts. This patch makes the same fix for rtl8188ee. + +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c +@@ -1025,9 +1025,20 @@ int rtl88ee_hw_init(struct ieee80211_hw + bool rtstatus = true; + int err = 0; + u8 tmp_u1b, u1byte; ++ unsigned long flags; + + RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Rtl8188EE hw init\n"); + rtlpriv->rtlhal.being_init_adapter = true; ++ /* As this function can take a very long time (up to 350 ms) ++ * and can be called with irqs disabled, reenable the irqs ++ * to let the other devices continue being serviced. ++ * ++ * It is safe doing so since our own interrupts will only be enabled ++ * in a subsequent step. ++ */ ++ local_save_flags(flags); ++ local_irq_enable(); ++ + rtlpriv->intf_ops->disable_aspm(hw); + + tmp_u1b = rtl_read_byte(rtlpriv, REG_SYS_CLKR+1); +@@ -1043,7 +1054,7 @@ int rtl88ee_hw_init(struct ieee80211_hw + if (rtstatus != true) { + RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n"); + err = 1; +- return err; ++ goto exit; + } + + err = rtl88e_download_fw(hw, false); +@@ -1051,8 +1062,7 @@ int rtl88ee_hw_init(struct ieee80211_hw + RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, + "Failed to download FW. Init HW without FW now..\n"); + err = 1; +- rtlhal->fw_ready = false; +- return err; ++ goto exit; + } else { + rtlhal->fw_ready = true; + } +@@ -1135,10 +1145,12 @@ int rtl88ee_hw_init(struct ieee80211_hw + } + rtl_write_byte(rtlpriv, REG_NAV_CTRL+2, ((30000+127)/128)); + rtl88e_dm_init(hw); ++exit: ++ local_irq_restore(flags); + rtlpriv->rtlhal.being_init_adapter = false; + RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "end of Rtl8188EE hw init %x\n", + err); +- return 0; ++ return err; + } + + static enum version_8188e _rtl88ee_read_chip_version(struct ieee80211_hw *hw) diff --git a/queue-3.14/rtlwifi-rtl8188ee-initialize-packet_beacon.patch b/queue-3.14/rtlwifi-rtl8188ee-initialize-packet_beacon.patch new file mode 100644 index 00000000000..ce1c9149375 --- /dev/null +++ b/queue-3.14/rtlwifi-rtl8188ee-initialize-packet_beacon.patch @@ -0,0 +1,37 @@ +From 328e203fc35f0b4f6df1c4943f74cf553bcc04f8 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Mon, 21 Apr 2014 17:38:44 +0100 +Subject: rtlwifi: rtl8188ee: initialize packet_beacon + +From: Colin Ian King + +commit 328e203fc35f0b4f6df1c4943f74cf553bcc04f8 upstream. + +static code analysis from cppcheck reports: + +[drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:322]: + (error) Uninitialized variable: packet_beacon + +packet_beacon is not initialized and hence packet_beacon +contains garbage from the stack, so set it to false. + +Signed-off-by: Colin Ian King +Acked-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8188ee/trx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c ++++ b/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c +@@ -293,7 +293,7 @@ static void _rtl88ee_translate_rx_signal + u8 *psaddr; + __le16 fc; + u16 type, ufc; +- bool match_bssid, packet_toself, packet_beacon, addr; ++ bool match_bssid, packet_toself, packet_beacon = false, addr; + + tmp_buf = skb->data + pstatus->rx_drvinfo_size + pstatus->rx_bufshift; + diff --git a/queue-3.14/rtlwifi-rtl8192cu-fix-too-long-disable-of-irqs.patch b/queue-3.14/rtlwifi-rtl8192cu-fix-too-long-disable-of-irqs.patch new file mode 100644 index 00000000000..82c89b5e6ac --- /dev/null +++ b/queue-3.14/rtlwifi-rtl8192cu-fix-too-long-disable-of-irqs.patch @@ -0,0 +1,60 @@ +From a53268be0cb9763f11da4f6fe3fb924cbe3a7d4a Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 4 Mar 2014 16:53:50 -0600 +Subject: rtlwifi: rtl8192cu: Fix too long disable of IRQs + +From: Larry Finger + +commit a53268be0cb9763f11da4f6fe3fb924cbe3a7d4a upstream. + +In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: +rtl8192ce: Fix too long disable of IRQs", Olivier Langlois + fixed a problem caused by an extra long disabling +of interrupts. This patch makes the same fix for rtl8192cu. + +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +@@ -985,6 +985,17 @@ int rtl92cu_hw_init(struct ieee80211_hw + struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); + int err = 0; + static bool iqk_initialized; ++ unsigned long flags; ++ ++ /* As this function can take a very long time (up to 350 ms) ++ * and can be called with irqs disabled, reenable the irqs ++ * to let the other devices continue being serviced. ++ * ++ * It is safe doing so since our own interrupts will only be enabled ++ * in a subsequent step. ++ */ ++ local_save_flags(flags); ++ local_irq_enable(); + + rtlhal->hw_type = HARDWARE_TYPE_RTL8192CU; + err = _rtl92cu_init_mac(hw); +@@ -997,7 +1008,7 @@ int rtl92cu_hw_init(struct ieee80211_hw + RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, + "Failed to download FW. Init HW without FW now..\n"); + err = 1; +- return err; ++ goto exit; + } + rtlhal->last_hmeboxnum = 0; /* h2c */ + _rtl92cu_phy_param_tab_init(hw); +@@ -1034,6 +1045,8 @@ int rtl92cu_hw_init(struct ieee80211_hw + _InitPABias(hw); + _update_mac_setting(hw); + rtl92c_dm_init(hw); ++exit: ++ local_irq_restore(flags); + return err; + } + diff --git a/queue-3.14/rtlwifi-rtl8192se-fix-regression-due-to-commit-1bf4bbb.patch b/queue-3.14/rtlwifi-rtl8192se-fix-regression-due-to-commit-1bf4bbb.patch new file mode 100644 index 00000000000..6b450b33541 --- /dev/null +++ b/queue-3.14/rtlwifi-rtl8192se-fix-regression-due-to-commit-1bf4bbb.patch @@ -0,0 +1,47 @@ +From 5f9186990ec4579ee5b7a99b3254c29eda479f36 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Fri, 25 Apr 2014 10:05:43 -0500 +Subject: rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb + +From: Larry Finger + +commit 5f9186990ec4579ee5b7a99b3254c29eda479f36 upstream. + +Beginning with kernel 3.13, this driver fails on some systems. The problem +was bisected to: + +Commit 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac +Author: Felix Fietkau +Title: mac80211: send control port protocol frames to the VO queue + +There is noting wrong with the above commit. The regression occurs because +V0 queue on RTL8192SE cards uses priority 6, not the usual 7. The fix is to +modify the rtl8192se routine that sets the correct transmit queue. + +Bug: https://bugzilla.kernel.org/show_bug.cgi?id=74541 + +Reported-by: Alex Miller +Tested-by: Alex Miller +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c +@@ -49,6 +49,12 @@ static u8 _rtl92se_map_hwqueue_to_fwqueu + if (ieee80211_is_nullfunc(fc)) + return QSLT_HIGH; + ++ /* Kernel commit 1bf4bbb4024dcdab changed EAPOL packets to use ++ * queue V0 at priority 7; however, the RTL8192SE appears to have ++ * that queue at priority 6 ++ */ ++ if (skb->priority == 7) ++ return QSLT_VO; + return skb->priority; + } + diff --git a/queue-3.14/rtlwifi-rtl8192se-fix-too-long-disable-of-irqs.patch b/queue-3.14/rtlwifi-rtl8192se-fix-too-long-disable-of-irqs.patch new file mode 100644 index 00000000000..dea8f92253b --- /dev/null +++ b/queue-3.14/rtlwifi-rtl8192se-fix-too-long-disable-of-irqs.patch @@ -0,0 +1,101 @@ +From 2610decdd0b3808ba20471a999835cfee5275f98 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 4 Mar 2014 16:53:51 -0600 +Subject: rtlwifi: rtl8192se: Fix too long disable of IRQs + +From: Larry Finger + +commit 2610decdd0b3808ba20471a999835cfee5275f98 upstream. + +In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: +rtl8192ce: Fix too long disable of IRQs", Olivier Langlois + fixed a problem caused by an extra long disabling +of interrupts. This patch makes the same fix for rtl8192se. + +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 27 +++++++++++++++++++++------ + 1 file changed, 21 insertions(+), 6 deletions(-) + +--- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c +@@ -955,7 +955,7 @@ int rtl92se_hw_init(struct ieee80211_hw + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); + u8 tmp_byte = 0; +- ++ unsigned long flags; + bool rtstatus = true; + u8 tmp_u1b; + int err = false; +@@ -967,6 +967,16 @@ int rtl92se_hw_init(struct ieee80211_hw + + rtlpci->being_init_adapter = true; + ++ /* As this function can take a very long time (up to 350 ms) ++ * and can be called with irqs disabled, reenable the irqs ++ * to let the other devices continue being serviced. ++ * ++ * It is safe doing so since our own interrupts will only be enabled ++ * in a subsequent step. ++ */ ++ local_save_flags(flags); ++ local_irq_enable(); ++ + rtlpriv->intf_ops->disable_aspm(hw); + + /* 1. MAC Initialize */ +@@ -984,7 +994,8 @@ int rtl92se_hw_init(struct ieee80211_hw + RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, + "Failed to download FW. Init HW without FW now... " + "Please copy FW into /lib/firmware/rtlwifi\n"); +- return 1; ++ err = 1; ++ goto exit; + } + + /* After FW download, we have to reset MAC register */ +@@ -997,7 +1008,8 @@ int rtl92se_hw_init(struct ieee80211_hw + /* 3. Initialize MAC/PHY Config by MACPHY_reg.txt */ + if (!rtl92s_phy_mac_config(hw)) { + RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "MAC Config failed\n"); +- return rtstatus; ++ err = rtstatus; ++ goto exit; + } + + /* because last function modify RCR, so we update +@@ -1016,7 +1028,8 @@ int rtl92se_hw_init(struct ieee80211_hw + /* 4. Initialize BB After MAC Config PHY_reg.txt, AGC_Tab.txt */ + if (!rtl92s_phy_bb_config(hw)) { + RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "BB Config failed\n"); +- return rtstatus; ++ err = rtstatus; ++ goto exit; + } + + /* 5. Initiailze RF RAIO_A.txt RF RAIO_B.txt */ +@@ -1033,7 +1046,8 @@ int rtl92se_hw_init(struct ieee80211_hw + + if (!rtl92s_phy_rf_config(hw)) { + RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "RF Config failed\n"); +- return rtstatus; ++ err = rtstatus; ++ goto exit; + } + + /* After read predefined TXT, we must set BB/MAC/RF +@@ -1122,8 +1136,9 @@ int rtl92se_hw_init(struct ieee80211_hw + + rtlpriv->cfg->ops->led_control(hw, LED_CTL_POWER_ON); + rtl92s_dm_init(hw); ++exit: ++ local_irq_restore(flags); + rtlpci->being_init_adapter = false; +- + return err; + } + diff --git a/queue-3.14/rtlwifi-rtl8723ae-fix-too-long-disable-of-irqs.patch b/queue-3.14/rtlwifi-rtl8723ae-fix-too-long-disable-of-irqs.patch new file mode 100644 index 00000000000..550e547014e --- /dev/null +++ b/queue-3.14/rtlwifi-rtl8723ae-fix-too-long-disable-of-irqs.patch @@ -0,0 +1,70 @@ +From bfc1010c418a22cbebd8b1bd1e75dad6a527a609 Mon Sep 17 00:00:00 2001 +From: Larry Finger +Date: Tue, 4 Mar 2014 16:53:53 -0600 +Subject: rtlwifi: rtl8723ae: Fix too long disable of IRQs + +From: Larry Finger + +commit bfc1010c418a22cbebd8b1bd1e75dad6a527a609 upstream. + +In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: +rtl8192ce: Fix too long disable of IRQs", Olivier Langlois + fixed a problem caused by an extra long disabling +of interrupts. This patch makes the same fix for rtl8723ae. + +Signed-off-by: Larry Finger +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c +@@ -880,14 +880,25 @@ int rtl8723ae_hw_init(struct ieee80211_h + bool rtstatus = true; + int err; + u8 tmp_u1b; ++ unsigned long flags; + + rtlpriv->rtlhal.being_init_adapter = true; ++ /* As this function can take a very long time (up to 350 ms) ++ * and can be called with irqs disabled, reenable the irqs ++ * to let the other devices continue being serviced. ++ * ++ * It is safe doing so since our own interrupts will only be enabled ++ * in a subsequent step. ++ */ ++ local_save_flags(flags); ++ local_irq_enable(); ++ + rtlpriv->intf_ops->disable_aspm(hw); + rtstatus = _rtl8712e_init_mac(hw); + if (rtstatus != true) { + RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n"); + err = 1; +- return err; ++ goto exit; + } + + err = rtl8723ae_download_fw(hw); +@@ -895,8 +906,7 @@ int rtl8723ae_hw_init(struct ieee80211_h + RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, + "Failed to download FW. Init HW without FW now..\n"); + err = 1; +- rtlhal->fw_ready = false; +- return err; ++ goto exit; + } else { + rtlhal->fw_ready = true; + } +@@ -971,6 +981,8 @@ int rtl8723ae_hw_init(struct ieee80211_h + RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n"); + } + rtl8723ae_dm_init(hw); ++exit: ++ local_irq_restore(flags); + rtlpriv->rtlhal.being_init_adapter = false; + return err; + } diff --git a/queue-3.14/series b/queue-3.14/series index ffac4f3e162..8fcb3dd0b74 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -45,3 +45,10 @@ mac80211-fix-suspend-vs.-authentication-race.patch mac80211-fix-software-remain-on-channel-implementation.patch mac80211-exclude-ap_vlan-interfaces-from-tx-power-calculation.patch ath9k-fix-ready-time-of-the-multicast-buffer-queue.patch +locks-allow-__break_lease-to-sleep-even-when-break_time-is-0.patch +rtlwifi-rtl8723ae-fix-too-long-disable-of-irqs.patch +rtlwifi-rtl8188ee-fix-too-long-disable-of-irqs.patch +rtlwifi-rtl8192cu-fix-too-long-disable-of-irqs.patch +rtlwifi-rtl8192se-fix-too-long-disable-of-irqs.patch +rtlwifi-rtl8192se-fix-regression-due-to-commit-1bf4bbb.patch +rtlwifi-rtl8188ee-initialize-packet_beacon.patch