提交 3a3ff72c 编写于 作者: W Wey-Yi Guy 提交者: John W. Linville

iwlwifi: dump error log when uCode error occurred

uCode error log contain information as to what the error was and where
it occurred necessary to debug any uCode issues.

Always log the information without special debug flag, this can help to
capture the important information when error happened.
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: NBen Cahill <ben.m.cahill@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 5ade1e4d
...@@ -1604,7 +1604,6 @@ static int iwl_read_ucode(struct iwl_priv *priv) ...@@ -1604,7 +1604,6 @@ static int iwl_read_ucode(struct iwl_priv *priv)
return ret; return ret;
} }
#ifdef CONFIG_IWLWIFI_DEBUG
static const char *desc_lookup_text[] = { static const char *desc_lookup_text[] = {
"OK", "OK",
"FAIL", "FAIL",
...@@ -1697,6 +1696,8 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) ...@@ -1697,6 +1696,8 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv)
} }
#ifdef CONFIG_IWLWIFI_DEBUG
#define EVENT_START_OFFSET (4 * sizeof(u32)) #define EVENT_START_OFFSET (4 * sizeof(u32))
/** /**
......
...@@ -1361,9 +1361,9 @@ void iwl_irq_handle_error(struct iwl_priv *priv) ...@@ -1361,9 +1361,9 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
/* Cancel currently queued command. */ /* Cancel currently queued command. */
clear_bit(STATUS_HCMD_ACTIVE, &priv->status); clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
priv->cfg->ops->lib->dump_nic_error_log(priv);
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) { if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) {
priv->cfg->ops->lib->dump_nic_error_log(priv);
priv->cfg->ops->lib->dump_nic_event_log(priv); priv->cfg->ops->lib->dump_nic_event_log(priv);
iwl_print_rx_config_cmd(priv); iwl_print_rx_config_cmd(priv);
} }
......
...@@ -578,19 +578,15 @@ int iwl_pci_resume(struct pci_dev *pdev); ...@@ -578,19 +578,15 @@ int iwl_pci_resume(struct pci_dev *pdev);
/***************************************************** /*****************************************************
* Error Handling Debugging * Error Handling Debugging
******************************************************/ ******************************************************/
void iwl_dump_nic_error_log(struct iwl_priv *priv);
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
void iwl_dump_nic_event_log(struct iwl_priv *priv); void iwl_dump_nic_event_log(struct iwl_priv *priv);
void iwl_dump_nic_error_log(struct iwl_priv *priv);
void iwl_print_rx_config_cmd(struct iwl_priv *priv); void iwl_print_rx_config_cmd(struct iwl_priv *priv);
#else #else
static inline void iwl_dump_nic_event_log(struct iwl_priv *priv) static inline void iwl_dump_nic_event_log(struct iwl_priv *priv)
{ {
} }
static inline void iwl_dump_nic_error_log(struct iwl_priv *priv)
{
}
static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv) static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv)
{ {
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册