aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-03-04 17:53:51 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-03-06 14:29:57 -0500
commit2610decdd0b3808ba20471a999835cfee5275f98 (patch)
tree0984a5b723eb3e1761f281bf7e57e5af8f7295f3 /drivers/net/wireless/rtlwifi
parenta53268be0cb9763f11da4f6fe3fb924cbe3a7d4a (diff)
rtlwifi: rtl8192se: Fix too long disable of IRQs
In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi: rtl8192ce: Fix too long disable of IRQs", Olivier Langlois <olivier@trillion01.com> fixed a problem caused by an extra long disabling of interrupts. This patch makes the same fix for rtl8192se. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192se/hw.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
index 7c4b39cc5dbf..3015af167b2b 100644
--- 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 *hw)
955 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 955 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
956 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); 956 struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
957 u8 tmp_byte = 0; 957 u8 tmp_byte = 0;
958 958 unsigned long flags;
959 bool rtstatus = true; 959 bool rtstatus = true;
960 u8 tmp_u1b; 960 u8 tmp_u1b;
961 int err = false; 961 int err = false;
@@ -967,6 +967,16 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
967 967
968 rtlpci->being_init_adapter = true; 968 rtlpci->being_init_adapter = true;
969 969
970 /* As this function can take a very long time (up to 350 ms)
971 * and can be called with irqs disabled, reenable the irqs
972 * to let the other devices continue being serviced.
973 *
974 * It is safe doing so since our own interrupts will only be enabled
975 * in a subsequent step.
976 */
977 local_save_flags(flags);
978 local_irq_enable();
979
970 rtlpriv->intf_ops->disable_aspm(hw); 980 rtlpriv->intf_ops->disable_aspm(hw);
971 981
972 /* 1. MAC Initialize */ 982 /* 1. MAC Initialize */
@@ -984,7 +994,8 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
984 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, 994 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
985 "Failed to download FW. Init HW without FW now... " 995 "Failed to download FW. Init HW without FW now... "
986 "Please copy FW into /lib/firmware/rtlwifi\n"); 996 "Please copy FW into /lib/firmware/rtlwifi\n");
987 return 1; 997 err = 1;
998 goto exit;
988 } 999 }
989 1000
990 /* After FW download, we have to reset MAC register */ 1001 /* After FW download, we have to reset MAC register */
@@ -997,7 +1008,8 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
997 /* 3. Initialize MAC/PHY Config by MACPHY_reg.txt */ 1008 /* 3. Initialize MAC/PHY Config by MACPHY_reg.txt */
998 if (!rtl92s_phy_mac_config(hw)) { 1009 if (!rtl92s_phy_mac_config(hw)) {
999 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "MAC Config failed\n"); 1010 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "MAC Config failed\n");
1000 return rtstatus; 1011 err = rtstatus;
1012 goto exit;
1001 } 1013 }
1002 1014
1003 /* because last function modify RCR, so we update 1015 /* because last function modify RCR, so we update
@@ -1016,7 +1028,8 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
1016 /* 4. Initialize BB After MAC Config PHY_reg.txt, AGC_Tab.txt */ 1028 /* 4. Initialize BB After MAC Config PHY_reg.txt, AGC_Tab.txt */
1017 if (!rtl92s_phy_bb_config(hw)) { 1029 if (!rtl92s_phy_bb_config(hw)) {
1018 RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "BB Config failed\n"); 1030 RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "BB Config failed\n");
1019 return rtstatus; 1031 err = rtstatus;
1032 goto exit;
1020 } 1033 }
1021 1034
1022 /* 5. Initiailze RF RAIO_A.txt RF RAIO_B.txt */ 1035 /* 5. Initiailze RF RAIO_A.txt RF RAIO_B.txt */
@@ -1033,7 +1046,8 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
1033 1046
1034 if (!rtl92s_phy_rf_config(hw)) { 1047 if (!rtl92s_phy_rf_config(hw)) {
1035 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "RF Config failed\n"); 1048 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "RF Config failed\n");
1036 return rtstatus; 1049 err = rtstatus;
1050 goto exit;
1037 } 1051 }
1038 1052
1039 /* After read predefined TXT, we must set BB/MAC/RF 1053 /* After read predefined TXT, we must set BB/MAC/RF
@@ -1122,8 +1136,9 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
1122 1136
1123 rtlpriv->cfg->ops->led_control(hw, LED_CTL_POWER_ON); 1137 rtlpriv->cfg->ops->led_control(hw, LED_CTL_POWER_ON);
1124 rtl92s_dm_init(hw); 1138 rtl92s_dm_init(hw);
1139exit:
1140 local_irq_restore(flags);
1125 rtlpci->being_init_adapter = false; 1141 rtlpci->being_init_adapter = false;
1126
1127 return err; 1142 return err;
1128} 1143}
1129 1144