iwlwifi: uCode Alive notification with timeout
Wait for REPLY_ALIVE notification from init and runtime uCode. based on the type of REPLY_ALIVE, different status bit will be set to wake up the queue: STATUS_INIT_UCODE_ALIVE for init uCode STATUS_RT_UCODE_ALIVE for runtime uCode. If timeout, attempt to download the failing uCode image again. This can only be done for the init ucode images of all iwlagn devices and the runtime ucode image of the 5000 series and up. If there is a problem with the 4965 runtime ucode coming up we restart the interface and thus trigger a new download of the init ucode also. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
cce53aa347
commit
34a66de628
@ -1341,10 +1341,17 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)
|
||||
u32 desc, time, count, base, data1;
|
||||
u32 blink1, blink2, ilink1, ilink2;
|
||||
|
||||
if (priv->ucode_type == UCODE_INIT)
|
||||
base = le32_to_cpu(priv->card_alive_init.error_event_table_ptr);
|
||||
else
|
||||
switch (priv->ucode_type) {
|
||||
case UCODE_RT:
|
||||
base = le32_to_cpu(priv->card_alive.error_event_table_ptr);
|
||||
break;
|
||||
case UCODE_INIT:
|
||||
base = le32_to_cpu(priv->card_alive_init.error_event_table_ptr);
|
||||
break;
|
||||
default:
|
||||
IWL_ERR(priv, "uCode image not available\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
|
||||
IWL_ERR(priv, "Not valid error log pointer 0x%08X\n", base);
|
||||
@ -1396,10 +1403,17 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
|
||||
|
||||
if (num_events == 0)
|
||||
return;
|
||||
if (priv->ucode_type == UCODE_INIT)
|
||||
base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
|
||||
else
|
||||
switch (priv->ucode_type) {
|
||||
case UCODE_RT:
|
||||
base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
|
||||
break;
|
||||
case UCODE_INIT:
|
||||
base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
|
||||
break;
|
||||
default:
|
||||
IWL_ERR(priv, "uCode image not available\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == 0)
|
||||
event_size = 2 * sizeof(u32);
|
||||
@ -1436,10 +1450,17 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv)
|
||||
u32 next_entry; /* index of next entry to be written by uCode */
|
||||
u32 size; /* # entries that we'll print */
|
||||
|
||||
if (priv->ucode_type == UCODE_INIT)
|
||||
base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
|
||||
else
|
||||
switch (priv->ucode_type) {
|
||||
case UCODE_RT:
|
||||
base = le32_to_cpu(priv->card_alive.log_event_table_ptr);
|
||||
break;
|
||||
case UCODE_INIT:
|
||||
base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr);
|
||||
break;
|
||||
default:
|
||||
IWL_ERR(priv, "uCode image not available\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
|
||||
IWL_ERR(priv, "Invalid event log pointer 0x%08X\n", base);
|
||||
|
Reference in New Issue
Block a user