Skip to contentSkip to conversation

ath10k: improve firmware crash message

PATCH New Janusz Dziedzic 2 participants 2 messages May 10, 2013 – May 14, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: improve firmware crash message

print hardware name/id, firware version,
make register dump more compact

---
 drivers/net/wireless/ath/ath10k/pci.c |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +17 -3
index e348fd9..b7840c8 100644
@@ -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,
 				     &reg_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,
Signature · 1 line
1.7.9.5
Applied
#1 lore raw

PATCH 1/1 ath10k: improve firmware crash message

Quoted 4 lines · Janusz Dziedzic

print hardware name/id, firware version,
make register dump more compact

Thanks, applied.

Signature · 1 line
Kalle Valo