* [ath9k-devel] [PATCH] ath10k: improve firmware crash message
@ 2013-05-10 9:54 Janusz Dziedzic
2013-05-14 4:44 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Janusz Dziedzic @ 2013-05-10 9:54 UTC (permalink / raw)
To: ath9k-devel
print hardware name/id, firware version,
make register dump more compact
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e348fd9..b7840c8 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -697,11 +697,18 @@ static u16 ath10k_pci_hif_get_free_queue_number(struct ath10k *ar, u8 pipe)
static void ath10k_pci_hif_dump_area(struct ath10k *ar)
{
u32 reg_dump_area = 0;
- u32 reg_dump_values[REG_DUMP_COUNT_QCA988X];
+ u32 reg_dump_values[REG_DUMP_COUNT_QCA988X] = {};
u32 host_addr;
int ret;
u32 i;
+ ath10k_err("firmware crashed!\n");
+ ath10k_err("hardware name %s version 0x%x\n",
+ ar->hw_params.name, ar->target_version);
+ ath10k_err("firmware version: %u.%u.%u.%u\n", ar->fw_version_major,
+ ar->fw_version_minor, ar->fw_version_release,
+ ar->fw_version_build);
+
host_addr = host_interest_item_address(HI_ITEM(hi_failure_state));
if (ath10k_pci_diag_read_mem(ar, host_addr,
®_dump_area, sizeof(u32)) != 0) {
@@ -719,9 +726,16 @@ static void ath10k_pci_hif_dump_area(struct ath10k *ar)
return;
}
+ BUILD_BUG_ON(REG_DUMP_COUNT_QCA988X % 4);
+
ath10k_err("target Register Dump\n");
- for (i = 0; i < REG_DUMP_COUNT_QCA988X; i++)
- ath10k_err("[%02d]: 0x%08X\n", i, reg_dump_values[i]);
+ for (i = 0; i < REG_DUMP_COUNT_QCA988X; i += 4)
+ ath10k_err("[%02d]: 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ i,
+ reg_dump_values[i],
+ reg_dump_values[i + 1],
+ reg_dump_values[i + 2],
+ reg_dump_values[i + 3]);
}
static void ath10k_pci_hif_send_complete_check(struct ath10k *ar, u8 pipe,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-14 4:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 9:54 [ath9k-devel] [PATCH] ath10k: improve firmware crash message Janusz Dziedzic
2013-05-14 4:44 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox