diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-11-20 15:05:05 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-23 17:05:36 -0500 |
commit | 3a3ff72c18085563ce64f7456ae3afff3a83397e (patch) | |
tree | 55a6031ea3723bbbef3c143c6a5d5ab281679e0d | |
parent | 5ade1e4dd1df436c3a441d17321c24aac8497306 (diff) |
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: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 92f9df6a04a6..927131192572 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1604,7 +1604,6 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1604 | return ret; | 1604 | return ret; |
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1608 | static const char *desc_lookup_text[] = { | 1607 | static const char *desc_lookup_text[] = { |
1609 | "OK", | 1608 | "OK", |
1610 | "FAIL", | 1609 | "FAIL", |
@@ -1697,6 +1696,8 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) | |||
1697 | 1696 | ||
1698 | } | 1697 | } |
1699 | 1698 | ||
1699 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1700 | |||
1700 | #define EVENT_START_OFFSET (4 * sizeof(u32)) | 1701 | #define EVENT_START_OFFSET (4 * sizeof(u32)) |
1701 | 1702 | ||
1702 | /** | 1703 | /** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index c2263180614e..05a0c413cdf9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1361,9 +1361,9 @@ void iwl_irq_handle_error(struct iwl_priv *priv) | |||
1361 | /* Cancel currently queued command. */ | 1361 | /* Cancel currently queued command. */ |
1362 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); | 1362 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); |
1363 | 1363 | ||
1364 | priv->cfg->ops->lib->dump_nic_error_log(priv); | ||
1364 | #ifdef CONFIG_IWLWIFI_DEBUG | 1365 | #ifdef CONFIG_IWLWIFI_DEBUG |
1365 | if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) { | 1366 | if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) { |
1366 | priv->cfg->ops->lib->dump_nic_error_log(priv); | ||
1367 | priv->cfg->ops->lib->dump_nic_event_log(priv); | 1367 | priv->cfg->ops->lib->dump_nic_event_log(priv); |
1368 | iwl_print_rx_config_cmd(priv); | 1368 | iwl_print_rx_config_cmd(priv); |
1369 | } | 1369 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 0779158fed2f..ecba0f46bac5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -578,19 +578,15 @@ int iwl_pci_resume(struct pci_dev *pdev); | |||
578 | /***************************************************** | 578 | /***************************************************** |
579 | * Error Handling Debugging | 579 | * Error Handling Debugging |
580 | ******************************************************/ | 580 | ******************************************************/ |
581 | void iwl_dump_nic_error_log(struct iwl_priv *priv); | ||
581 | #ifdef CONFIG_IWLWIFI_DEBUG | 582 | #ifdef CONFIG_IWLWIFI_DEBUG |
582 | void iwl_dump_nic_event_log(struct iwl_priv *priv); | 583 | void iwl_dump_nic_event_log(struct iwl_priv *priv); |
583 | void iwl_dump_nic_error_log(struct iwl_priv *priv); | ||
584 | void iwl_print_rx_config_cmd(struct iwl_priv *priv); | 584 | void iwl_print_rx_config_cmd(struct iwl_priv *priv); |
585 | #else | 585 | #else |
586 | static inline void iwl_dump_nic_event_log(struct iwl_priv *priv) | 586 | static inline void iwl_dump_nic_event_log(struct iwl_priv *priv) |
587 | { | 587 | { |
588 | } | 588 | } |
589 | 589 | ||
590 | static inline void iwl_dump_nic_error_log(struct iwl_priv *priv) | ||
591 | { | ||
592 | } | ||
593 | |||
594 | static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv) | 590 | static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv) |
595 | { | 591 | { |
596 | } | 592 | } |