Skip to contentSkip to conversation

ath10k: improve logging in firmware crash routine.

PATCH In review [email protected] 2 participants 3 messages Aug 5, 2014 – Aug 19, 2014 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: improve logging in firmware crash routine.

From: Ben Greear <[email protected]>

Only print error message upon failure, and print more details in case it does find an error.

---

This is on top of the firmware crash reporting patches, not sure it would apply clean until those get in.

 drivers/net/wireless/ath/ath10k/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +2 -3
index 24688b7..085c0c8 100644
@@ -929,12 +929,11 @@ static void ath10k_pci_hif_dump_area(struct ath10k *ar)
 	ret = ath10k_pci_diag_read_mem(ar, host_addr,
 				       &reg_dump_area, sizeof(u32));
 	if (ret) {
-		ath10k_err("failed to read FW dump area address: %d\n", ret);
+		ath10k_err("failed to read FW dump area address: %d  (hostaddr 0x%08X  hi-failure-state 0x%08lX)\n",
+			   ret, host_addr, HI_ITEM(hi_failure_state));
 		goto exit;
 	}
 
-	ath10k_err("target register Dump Location: 0x%08X\n", reg_dump_area);
-
 	ret = ath10k_pci_diag_read_mem(ar, reg_dump_area,
 				       &reg_dump_values[0],
 				       REG_DUMP_COUNT_QCA988X * sizeof(u32));
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 10 lines · [email protected] writes:

From: Ben Greear <[email protected]>

Only print error message upon failure, and print more details in case it does find an error.

---

This is on top of the firmware crash reporting patches, not sure it would apply clean until those get in.

Yeah, this does conflict with the firmware crash dump patches.

Quoted 8 lines
 drivers/net/wireless/ath/ath10k/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +0 -0
index 24688b7..085c0c8 100644

drivers/net/wireless/ath/ath10k/pci.c static void ath10k_pci_hif_dump_area(struct ath10k *ar) · line 935

Quoted 8 lines
drivers/net/wireless/ath/ath10k/pci.c +2 -1
@@ -929,12 +929,11 @@ static void ath10k_pci_hif_dump_area(struct ath10k *ar)
 	ret = ath10k_pci_diag_read_mem(ar, host_addr,
 				       &reg_dump_area, sizeof(u32));
 	if (ret) {
-		ath10k_err("failed to read FW dump area address: %d\n", ret);
+		ath10k_err("failed to read FW dump area address: %d  (hostaddr 0x%08X  hi-failure-state 0x%08lX)\n",
+			   ret, host_addr, HI_ITEM(hi_failure_state));
 		goto exit;
 	}

As I reworked how the diag interface is used, this doesn't directly apply anymore. And are these values really that important?

drivers/net/wireless/ath/ath10k/pci.c static void ath10k_pci_hif_dump_area(struct ath10k *ar) · line 936

Quoted 1 line
drivers/net/wireless/ath/ath10k/pci.c +0 -1
-	ath10k_err("target register Dump Location: 0x%08X\n", reg_dump_area);

I actually removed this line in the firmware crash dump patchset.

Signature · 1 line
Kalle Valo
author
#2 lore raw
Quoted 35 lines · Kalle Valo
Quoted 10 lines · [email protected] writes:

From: Ben Greear <[email protected]>

Only print error message upon failure, and print more details in case it does find an error.

---

This is on top of the firmware crash reporting patches, not sure it would apply clean until those get in.

Yeah, this does conflict with the firmware crash dump patches.

Quoted 8 lines
  drivers/net/wireless/ath/ath10k/pci.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +0 -0
index 24688b7..085c0c8 100644

drivers/net/wireless/ath/ath10k/pci.c static void ath10k_pci_hif_dump_area(struct ath10k *ar) · line 935

Quoted 8 lines
drivers/net/wireless/ath/ath10k/pci.c +2 -1
@@ -929,12 +929,11 @@ static void ath10k_pci_hif_dump_area(struct ath10k *ar)
  	ret = ath10k_pci_diag_read_mem(ar, host_addr,
  				       &reg_dump_area, sizeof(u32));
  	if (ret) {
-		ath10k_err("failed to read FW dump area address: %d\n", ret);
+		ath10k_err("failed to read FW dump area address: %d  (hostaddr 0x%08X  hi-failure-state 0x%08lX)\n",
+			   ret, host_addr, HI_ITEM(hi_failure_state));
  		goto exit;
  	}

As I reworked how the diag interface is used, this doesn't directly apply anymore. And are these values really that important?

Quoted 3 lines

drivers/net/wireless/ath/ath10k/pci.c static void ath10k_pci_hif_dump_area(struct ath10k *ar) · line 936

Quoted 1 line
drivers/net/wireless/ath/ath10k/pci.c +0 -1
-	ath10k_err("target register Dump Location: 0x%08X\n", reg_dump_area);

I actually removed this line in the firmware crash dump patchset.

Probably with your re-work, this patch is no longer useful. At the time I wrote it, it allowed a bit more information in error cases and less noise when everything was OK.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com