aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2009-08-07 15:41:44 -0700
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:48 -0400
commitc03ea16285bf142172f9816b8a1f5c43bb4b4405 (patch)
tree7499ccfbcfee182cf387629ccd31c64123dd9214 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent5225935b53ce1eafb222c644230d03ad6011d357 (diff)
iwlwifi: revert uCode Alive notification with timeout
commit "iwlwifi: uCode Alive notification with timeout" introduced a more reliable mechanism for ucode loading. Unfortunately we hit a problem with it frequently enough to make a 4965 unusable. The problem can be seen in debug log below. What this code attempts is to set runtime ucode up to load, start a timer to wait for the alive response from runtime ucode, and if it times out it tries again. As can be seen below we receive the alive response and wake the waiting task _before_ the tasks starts waiting. The task thus times out as the alive response is not received while it is waiting for it and it restarts the device. This starts the cycle all over again. [29739.000819] ieee80211 phy0: U iwl_mac_start enter [29739.005751] ieee80211 phy0: U iwl_prepare_card_hw iwl_prepare_card_hw enter [29739.012798] ieee80211 phy0: U iwl_set_hw_ready hardware ready [29739.057200] ieee80211 phy0: U iwl4965_load_bsm Begin load bsm [29739.063366] ieee80211 phy0: U iwl4965_verify_bsm Begin verify bsm [29739.072485] ieee80211 phy0: U iwl4965_verify_bsm BSM bootstrap uCode image OK [29739.079671] ieee80211 phy0: U iwl4965_load_bsm BSM write complete, poll 0 iterations [29739.257019] ieee80211 phy0: I iwl_rx_reply_alive Alive ucode status 0x00000001 revision 0x1 0x9 [29739.260964] ieee80211 phy0: I iwl_rx_reply_alive Initialization Alive received. [29739.260964] ieee80211 phy0: U __iwl_up iwlagn is coming up [29739.278571] ieee80211 phy0: U iwl_mac_start Start UP work done. [29739.284509] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 788 [29739.292432] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 10312 [29739.302004] ieee80211 phy0: U iwl_verify_ucode Initialize uCode is good in inst SRAM [29739.309746] ieee80211 phy0: U iwl4965_hw_get_temperature Running temperature calibration [29739.317833] ieee80211 phy0: U iwl4965_hw_get_temperature Calib values R[1-3]: -36 13522 -13496 R4: -2726 [29739.327337] ieee80211 phy0: U iwl4965_hw_get_temperature Calibrated temperature: 310K, 37C [29739.335598] ieee80211 phy0: U iwl4965_init_alive_start Initialization Alive received. [29739.343477] ieee80211 phy0: U iwl4965_set_ucode_ptrs Runtime uCode pointers are set. [29739.351283] ieee80211 phy0: I iwl_rx_reply_alive Alive ucode status 0x00000001 revision 0x1 0x0 [29739.355210] ieee80211 phy0: I iwl_rx_reply_alive Runtime Alive received. [29739.366731] iwlagn 0000:03:00.0: Runtime uCode already alive? Waiting for alive anyway [29743.284110] iwlagn 0000:03:00.0: START_ALIVE timeout after 4000ms. [29743.290337] ieee80211 phy0: U iwl_mac_add_interface enter: type 2 [29744.364089] iwlagn 0000:03:00.0: Runtime timeout after 5000ms [29744.370882] ieee80211 phy0: U iwl_alive_start Runtime Alive received. [29744.377347] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 788 [29744.385287] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 10312 [29744.393397] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 94720 [29744.415835] ieee80211 phy0: U iwl_verify_ucode Runtime uCode is good in inst SRAM Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index c9a1aacb243..319df4ab7f1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -533,16 +533,12 @@ static void iwl_rx_reply_alive(struct iwl_priv *priv,
if (palive->ver_subtype == INITIALIZE_SUBTYPE) {
IWL_DEBUG_INFO(priv, "Initialization Alive received.\n");
- set_bit(STATUS_INIT_UCODE_ALIVE, &priv->status);
- wake_up_interruptible(&priv->wait_command_queue);
memcpy(&priv->card_alive_init,
&pkt->u.alive_frame,
sizeof(struct iwl_init_alive_resp));
pwork = &priv->init_alive_start;
} else {
IWL_DEBUG_INFO(priv, "Runtime Alive received.\n");
- set_bit(STATUS_RT_UCODE_ALIVE, &priv->status);
- wake_up_interruptible(&priv->wait_command_queue);
memcpy(&priv->card_alive, &pkt->u.alive_frame,
sizeof(struct iwl_alive_resp));
pwork = &priv->alive_start;
@@ -1784,7 +1780,6 @@ static int __iwl_up(struct iwl_priv *priv)
{
int i;
int ret;
- unsigned long status;
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
IWL_WARN(priv, "Exit pending; will not bring the NIC up\n");
@@ -1862,51 +1857,6 @@ static int __iwl_up(struct iwl_priv *priv)
/* start card; "initialize" will load runtime ucode */
iwl_nic_start(priv);
- /* Just finish download Init or Runtime uCode image to device
- * now we wait here for uCode send REPLY_ALIVE notification
- * to indicate uCode is ready.
- * 1) For Init uCode image, all iwlagn devices should wait here
- * on STATUS_INIT_UCODE_ALIVE status bit; if timeout before
- * receive the REPLY_ALIVE notification, go back and try to
- * download the Init uCode image again.
- * 2) For Runtime uCode image, all iwlagn devices except 4965
- * wait here on STATUS_RT_UCODE_ALIVE status bit; if
- * timeout before receive the REPLY_ALIVE notification, go back
- * and download the Runtime uCode image again.
- * 3) For 4965 Runtime uCode, it will not go through this path,
- * need to wait for STATUS_RT_UCODE_ALIVE status bit in
- * iwl4965_init_alive_start() function; if timeout, need to
- * restart and download Init uCode image.
- */
- if (priv->ucode_type == UCODE_INIT)
- status = STATUS_INIT_UCODE_ALIVE;
- else
- status = STATUS_RT_UCODE_ALIVE;
- if (test_bit(status, &priv->status)) {
- IWL_WARN(priv,
- "%s uCode already alive? "
- "Waiting for alive anyway\n",
- (status == STATUS_INIT_UCODE_ALIVE)
- ? "INIT" : "Runtime");
- clear_bit(status, &priv->status);
- }
- ret = wait_event_interruptible_timeout(
- priv->wait_command_queue,
- test_bit(status, &priv->status),
- UCODE_ALIVE_TIMEOUT);
- if (!ret) {
- if (!test_bit(status, &priv->status)) {
- priv->ucode_type =
- (status == STATUS_INIT_UCODE_ALIVE)
- ? UCODE_NONE : UCODE_INIT;
- IWL_ERR(priv,
- "%s timeout after %dms\n",
- (status == STATUS_INIT_UCODE_ALIVE)
- ? "INIT" : "Runtime",
- jiffies_to_msecs(UCODE_ALIVE_TIMEOUT));
- continue;
- }
- }
IWL_DEBUG_INFO(priv, DRV_NAME " is coming up\n");
return 0;