Skip to contentSkip to conversation

add fw coredump for sdio when firmware assert

PATCH In review Wen Gong 2 participants 8 messages Sep 24, 2019 – Aug 19, 2020 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Wen Gong

author
#0 lore raw

v4 cover add fw coredump for sdio when firmware assert

add fw coredump for sdio when firmware assert

v2: change code style

v3: split bus type to another patch,
remove ATH10K_BUS_ANY,
add bus type for each layout

v4: rebase to latest commit

Wen Gong (2):
ath10k: add bus type for each layout of coredump
ath10k: add fw coredump for sdio when firmware assert

 drivers/net/wireless/ath/ath10k/bmi.c       |   1 +
 drivers/net/wireless/ath/ath10k/core.c      |  10 +
 drivers/net/wireless/ath/ath10k/coredump.c  | 349 +++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/coredump.h  |   1 +
 drivers/net/wireless/ath/ath10k/sdio.c      | 338 ++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/targaddrs.h |  10 +
 6 files changed, 704 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v4 1/2 ath10k: add bus type for each layout of coredump

For some hw version, it has more than one bus type, it need to add bus type to distinguish different chip.

Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00018-QCARMSWP-1.

---
v2: change code style

v3: split bus type to another patch,
remove ATH10K_BUS_ANY,
add bus type for each layout

v4: rebase to latest commit

 drivers/net/wireless/ath/ath10k/coredump.c | 16 +++++++++++++++-
 drivers/net/wireless/ath/ath10k/coredump.h |  1 +
 2 files changed, 16 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/coredump.c +15 -1
index de0926c..8860c62 100644
@@ -968,6 +968,7 @@
 	{
 		.hw_id = QCA6174_HW_1_0_VERSION,
 		.hw_rev = ATH10K_HW_QCA6174,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw10_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw10_mem_regions),
@@ -976,6 +977,7 @@
 	{
 		.hw_id = QCA6174_HW_1_1_VERSION,
 		.hw_rev = ATH10K_HW_QCA6174,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw10_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw10_mem_regions),
@@ -984,6 +986,7 @@
 	{
 		.hw_id = QCA6174_HW_1_3_VERSION,
 		.hw_rev = ATH10K_HW_QCA6174,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw10_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw10_mem_regions),
@@ -992,6 +995,7 @@
 	{
 		.hw_id = QCA6174_HW_2_1_VERSION,
 		.hw_rev = ATH10K_HW_QCA6174,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw21_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw21_mem_regions),
@@ -1000,6 +1004,7 @@
 	{
 		.hw_id = QCA6174_HW_3_0_VERSION,
 		.hw_rev = ATH10K_HW_QCA6174,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw30_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw30_mem_regions),
@@ -1008,6 +1013,7 @@
 	{
 		.hw_id = QCA6174_HW_3_2_VERSION,
 		.hw_rev = ATH10K_HW_QCA6174,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw30_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw30_mem_regions),
@@ -1016,6 +1022,7 @@
 	{
 		.hw_id = QCA9377_HW_1_1_DEV_VERSION,
 		.hw_rev = ATH10K_HW_QCA9377,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca6174_hw30_mem_regions,
 			.size = ARRAY_SIZE(qca6174_hw30_mem_regions),
@@ -1024,6 +1031,7 @@
 	{
 		.hw_id = QCA988X_HW_2_0_VERSION,
 		.hw_rev = ATH10K_HW_QCA988X,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca988x_hw20_mem_regions,
 			.size = ARRAY_SIZE(qca988x_hw20_mem_regions),
@@ -1032,6 +1040,7 @@
 	{
 		.hw_id = QCA9984_HW_1_0_DEV_VERSION,
 		.hw_rev = ATH10K_HW_QCA9984,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca9984_hw10_mem_regions,
 			.size = ARRAY_SIZE(qca9984_hw10_mem_regions),
@@ -1040,6 +1049,7 @@
 	{
 		.hw_id = QCA9888_HW_2_0_DEV_VERSION,
 		.hw_rev = ATH10K_HW_QCA9888,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca9984_hw10_mem_regions,
 			.size = ARRAY_SIZE(qca9984_hw10_mem_regions),
@@ -1048,6 +1058,7 @@
 	{
 		.hw_id = QCA99X0_HW_2_0_DEV_VERSION,
 		.hw_rev = ATH10K_HW_QCA99X0,
+		.bus = ATH10K_BUS_PCI,
 		.region_table = {
 			.regions = qca99x0_hw20_mem_regions,
 			.size = ARRAY_SIZE(qca99x0_hw20_mem_regions),
@@ -1056,6 +1067,7 @@
 	{
 		.hw_id = QCA4019_HW_1_0_DEV_VERSION,
 		.hw_rev = ATH10K_HW_QCA4019,
+		.bus = ATH10K_BUS_AHB,
 		.region_table = {
 			.regions = qca4019_hw10_mem_regions,
 			.size = ARRAY_SIZE(qca4019_hw10_mem_regions),
@@ -1064,6 +1076,7 @@
 	{
 		.hw_id = WCN3990_HW_1_0_DEV_VERSION,
 		.hw_rev = ATH10K_HW_WCN3990,
+		.bus = ATH10K_BUS_SNOC,
 		.region_table = {
 			.regions = wcn399x_hw10_mem_regions,
 			.size = ARRAY_SIZE(wcn399x_hw10_mem_regions),
@@ -1111,7 +1124,8 @@ const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k
 
 	for (i = 0; i < ARRAY_SIZE(hw_mem_layouts); i++) {
 		if (ar->target_version == hw_mem_layouts[i].hw_id &&
-		    ar->hw_rev == hw_mem_layouts[i].hw_rev)
+		    ar->hw_rev == hw_mem_layouts[i].hw_rev &&
+		    hw_mem_layouts[i].bus == ar->hif.bus)
 			return &hw_mem_layouts[i];
 	}
 
drivers/net/wireless/ath/ath10k/coredump.h +1 -0
index 8bf03e8..492dddc 100644
@@ -156,6 +156,7 @@ struct ath10k_mem_region {
 struct ath10k_hw_mem_layout {
 	u32 hw_id;
 	u32 hw_rev;
+	enum ath10k_bus bus;
 
 	struct {
 		const struct ath10k_mem_region *regions;
Signature · 7 lines
1.9.1


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
author
#4 lore raw

PATCH v4 2/2 ath10k: add fw coredump for sdio when firmware assert

In reply to Wen Gong

When firmware assert, it need coredump to analyze, this patch will collect the register and memory info for sdio chip.

The coredump configuration is different between PCIE and SDIO for the same reversion, so this patch add bus type to distinguish PCIE and SDIO chip for coredump.

It has 2 type to dump firmware: fastdump and slowdump. Fastdump is not support in old version firmware, if this, ath10k will select slowdump for it. If firmware support fastdump, ath10k will select fastdump for it. Version WLAN.RMH.4.4.1-00017-QCARMSWPZ-2 of firmware begin to support fastdump.

For slow dump, ath10k_sdio_hif_diag_read can not be used, the diag window has a limit value, it is 4 bytes and the dump's buffer length is larger than it, it will trigger error. So this patch add ath10k_sdio_read_mem to read 4 bytes for each time.

Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00018-QCARMSWP-1.

---
v2: change code style

v3: split bus type to another patch,
remove ATH10K_BUS_ANY,
add bus type for each layout

v4: rebase to latest commit

 drivers/net/wireless/ath/ath10k/bmi.c       |   1 +
 drivers/net/wireless/ath/ath10k/core.c      |  10 +
 drivers/net/wireless/ath/ath10k/coredump.c  | 333 +++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/sdio.c      | 338 +++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/targaddrs.h |  10 +
 5 files changed, 688 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath10k/bmi.c +1 -0
index 95dc4be..990fa4d 100644
@@ -197,6 +197,7 @@ int ath10k_bmi_read_memory(struct ath10k *ar,
 
 	return 0;
 }
+EXPORT_SYMBOL(ath10k_bmi_read_memory);
 
 int ath10k_bmi_write_soc_reg(struct ath10k *ar, u32 address, u32 reg_val)
 {
drivers/net/wireless/ath/ath10k/core.c +10 -0
index 36c62d6..1e0f4c5 100644
@@ -725,6 +725,16 @@ static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
 	if (ret)
 		return ret;
 
+	ret = ath10k_bmi_read32(ar, hi_option_flag2, &param);
+	if (ret)
+		return ret;
+
+	param |= HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_HOST;
+
+	ret = ath10k_bmi_write32(ar, hi_option_flag2, param);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
drivers/net/wireless/ath/ath10k/coredump.c +333 -0

351 lines not on this page · raw message

drivers/net/wireless/ath/ath10k/sdio.c +334 -4

356 lines not on this page · raw message

drivers/net/wireless/ath/ath10k/targaddrs.h +10 -0
index dff6c8a..c65045a 100644
@@ -334,6 +334,16 @@ struct host_interest {
 #define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK (1 << 17)
 
 /*
+ * If both SDIO_CRASH_DUMP_ENHANCEMENT_HOST and SDIO_CRASH_DUMP_ENHANCEMENT_FW
+ * flags are set, then crashdump upload will be done using the BMI host/target
+ * communication channel.
+ */
+/* HOST to support using BMI dump FW memory when hit assert */
+#define HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_HOST 0x400
+/* FW to support using BMI dump FW memory when hit assert */
+#define HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW   0x800
+
+/*
  * CONSOLE FLAGS
  *
  * Bit Range  Meaning
Signature · 7 lines
1.9.1


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#5 lore raw

Re: [PATCH v4 2/2] ath10k: add fw coredump for sdio when firmware assert

Quoted 18 lines · Wen Gong

When firmware assert, it need coredump to analyze, this patch will collect the register and memory info for sdio chip.

The coredump configuration is different between PCIE and SDIO for the same reversion, so this patch add bus type to distinguish PCIE and SDIO chip for coredump.

It has 2 type to dump firmware: fastdump and slowdump. Fastdump is not support in old version firmware, if this, ath10k will select slowdump for it. If firmware support fastdump, ath10k will select fastdump for it. Version WLAN.RMH.4.4.1-00017-QCARMSWPZ-2 of firmware begin to support fastdump.

For slow dump, ath10k_sdio_hif_diag_read can not be used, the diag window has a limit value, it is 4 bytes and the dump's buffer length is larger than it, it will trigger error. So this patch add ath10k_sdio_read_mem to read 4 bytes for each time.

Quoted 4 lines

Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00018-QCARMSWP-1.

I did some changes in the pending branch, please check:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=de03e26479e2cf5f3e1753bda517f44910457036

Also please send dmesg output from a firmware crash, I'll add it to the commit log as an example.

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2031

Quoted 11 lines
drivers/net/wireless/ath/ath10k/sdio.c +11 -0
+static void ath10k_sdio_check_fw_reg(struct ath10k *ar, u32 *fast_dump)
+{
+	u32 param;
+
+	ath10k_sdio_read_host_interest_value(ar, HI_ITEM(hi_option_flag2), &param);
+
+	*fast_dump = ((param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW)
+			     == HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW);
+
+	ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio hi_option_flag2 %x\n", param);
+}

I renamed this ath10k_sdio_is_fast_dump_supported() which returns a boolean. Also I changed all fast_dump variables to a boolean.

Quoted 41 lines
drivers/net/wireless/ath/ath10k/sdio.c +41 -0
+static void ath10k_sdio_dump_memory(struct ath10k *ar,
+				    struct ath10k_fw_crash_data *crash_data,
+				    u32 fast_dump)
+{
+	const struct ath10k_hw_mem_layout *mem_layout;
+	const struct ath10k_mem_region *current_region;
+	struct ath10k_dump_ram_data_hdr *hdr;
+	u32 count;
+	size_t buf_len;
+	int ret, i;
+	u8 *buf;
+
+	if (!crash_data)
+		return;
+
+	mem_layout = ath10k_coredump_get_mem_layout(ar);
+	if (!mem_layout)
+		return;
+
+	current_region = &mem_layout->region_table.regions[0];
+
+	buf = crash_data->ramdump_buf;
+	buf_len = crash_data->ramdump_buf_len;
+
+	memset(buf, 0, buf_len);
+
+	for (i = 0; i < mem_layout->region_table.size; i++) {
+		count = 0;
+
+		if (current_region->len > buf_len) {
+			ath10k_warn(ar, "memory region %s size %d is larger that remaining ramdump buffer size %zu\n",
+				    current_region->name,
+				    current_region->len,
+				    buf_len);
+			break;
+		}
+
+		/* Reserve space for the header. */
+		hdr = (void *)buf;
+		buf += sizeof(*hdr);
+		buf_len -= sizeof(*hdr);

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2259

Quoted 10 lines
drivers/net/wireless/ath/ath10k/sdio.c +10 -0
+
+		ret = ath10k_sdio_dump_memory_generic(ar, current_region, buf, fast_dump);
+
+		ath10k_err(ar, "dump mem, name:%s, type:%d, start:0x%x, len:0x%x, size:%d, ret:0x%x\n",
+			   current_region->name,
+			   current_region->type,
+			   current_region->start,
+			   current_region->len,
+			   current_region->section_table.size,
+			   ret);

This error print looks like a debug message, so I removed it. If you need it, let me know.

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2285

Quoted 7 lines
drivers/net/wireless/ath/ath10k/sdio.c +7 -0
+void ath10k_sdio_fw_crashed_dump(struct ath10k *ar)
+{
+	struct ath10k_fw_crash_data *crash_data;
+	char guid[UUID_STRING_LEN + 1];
+	u32 fast_dump = 0;
+
+	ath10k_err(ar, "begin fw dump\n");

This also looks like a debug message so I removed it.

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2290

Quoted 4 lines
drivers/net/wireless/ath/ath10k/sdio.c +4 -0
+	ath10k_sdio_check_fw_reg(ar, &fast_dump);
+
+	if (fast_dump)
+		ar->bmi.done_sent = false;

I did some refactoring in patch "ath10k: move enable_pll_clk call to ath10k_core_start()" (submitted separately) so that I could change this to ath10k_bmi_start().

drivers/net/wireless/ath/ath10k/targaddrs.h struct host_interest { · line 342

Quoted 12 lines
drivers/net/wireless/ath/ath10k/targaddrs.h +6 -0
@@ -334,6 +334,16 @@ struct host_interest {
 #define HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_FW_ACK (1 << 17)
 
 /*
+ * If both SDIO_CRASH_DUMP_ENHANCEMENT_HOST and SDIO_CRASH_DUMP_ENHANCEMENT_FW
+ * flags are set, then crashdump upload will be done using the BMI host/target
+ * communication channel.
+ */
+/* HOST to support using BMI dump FW memory when hit assert */
+#define HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_HOST 0x400

Added empty line here.

Quoted 7 lines
drivers/net/wireless/ath/ath10k/targaddrs.h +4 -0
+/* FW to support using BMI dump FW memory when hit assert */
+#define HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW   0x800
+
+/*
  * CONSOLE FLAGS
  *
  * Bit Range  Meaning
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author
#6 lore raw

Re: [PATCH v4 2/2] ath10k: add fw coredump for sdio when firmware assert

Quoted 2 lines · Kalle Valo

Wen Gong <[email protected]> writes:

...

Quoted 3 lines

I did some changes in the pending branch, please check:

I compared this patch with patch in pending branch, it is OK for me.

Quoted 5 lines

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=de03e26479e2cf5f3e1753bda517f44910457036

Also please send dmesg output from a firmware crash, I'll add it to the commit log as an example.

message of this patch:

[ 1378.668263] ath10k_sdio mmc1:0001:1: simulating soft firmware crash
[ 1378.675727] ath10k_sdio mmc1:0001:1: begin fw dump
[ 1378.686200] ath10k_sdio mmc1:0001:1: firmware crashed! (guid 413d98b1-84c0-4298-b605-2b10ec0c54a5)
[ 1378.695375] ath10k_sdio mmc1:0001:1: qca6174 hw3.2 sdio target 0x05030000 chip_id 0x00000000 sub 0000:0000
[ 1378.705121] ath10k_sdio mmc1:0001:1: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 1
[ 1378.714502] ath10k_sdio mmc1:0001:1: firmware ver WLAN.RMH4.4.1-00126-QCARMSWP-1 api 6 features wowlan,ignore-otp,raw-mode crc32 b84317cf
[ 1378.728077] ath10k_sdio mmc1:0001:1: board_file api 2 bmi_id 0:4 crc32 6364cfcc
[ 1378.735414] ath10k_sdio mmc1:0001:1: htt-ver 3.69 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[ 1378.748882] ath10k_sdio mmc1:0001:1: firmware register dump:
[ 1378.754582] ath10k_sdio mmc1:0001:1: [00]: 0x05030000 0x000015B3 0x0099908D 0x00955B31
[ 1378.762547] ath10k_sdio mmc1:0001:1: [04]: 0x0099908D 0x00060730 0x00000018 0x004641A0
[ 1378.770504] ath10k_sdio mmc1:0001:1: [08]: 0x0041FAA4 0x0041FA9C 0x00999070 0x00404490
[ 1378.778440] ath10k_sdio mmc1:0001:1: [12]: 0x00000009 0xFFFFFFFF 0x00952CD0 0x00952CE6
[ 1378.786540] ath10k_sdio mmc1:0001:1: [16]: 0x00952CC4 0x00910712 0x00000000 0x00000000
[ 1378.794508] ath10k_sdio mmc1:0001:1: [20]: 0x4099908D 0x0040E9E8 0x00000001 0x00423AC0
[ 1378.802449] ath10k_sdio mmc1:0001:1: [24]: 0x809F3189 0x0040EA48 0x00426240 0xC099908D
[ 1378.810379] ath10k_sdio mmc1:0001:1: [28]: 0x809143A7 0x0040EA68 0x0041FAA4 0x00423A80
[ 1378.818313] ath10k_sdio mmc1:0001:1: [32]: 0x809F1193 0x0040EA88 0x00411770 0x004117E0
[ 1378.826246] ath10k_sdio mmc1:0001:1: [36]: 0x809F0EEE 0x0040EAA8 0x00000000 0x00000000
[ 1378.834188] ath10k_sdio mmc1:0001:1: [40]: 0x80911210 0x0040EAC8 0x00000008 0x00404130
[ 1378.842166] ath10k_sdio mmc1:0001:1: [44]: 0x80911154 0x0040EB28 0x00400000 0x00000000
[ 1378.851006] ath10k_sdio mmc1:0001:1: [48]: 0x8091122D 0x0040EB48 0x00000000 0x00400600
[ 1378.858947] ath10k_sdio mmc1:0001:1: [52]: 0x40910024 0x0040EB78 0x0040AB98 0x0040AB98
[ 1378.866880] ath10k_sdio mmc1:0001:1: [56]: 0x00000000 0x0040EB98 0x009BB001 0x00040020
[ 1392.089770] ath10k_sdio mmc1:0001:1: dump mem, name:DRAM, type:2, start:0x400000, len:0xa8000, size:0, ret:0xa8000
[ 1393.987320] ath10k_sdio mmc1:0001:1: dump mem, name:AXI, type:3, start:0xa0000, len:0x18000, size:0, ret:0x18000
[ 1404.113610] ath10k_sdio mmc1:0001:1: dump mem, name:IRAM1, type:4, start:0x980000, len:0x80000, size:0, ret:0x80000
[ 1409.231972] ath10k_sdio mmc1:0001:1: dump mem, name:IRAM2, type:5, start:0xa00000, len:0x40000, size:0, ret:0x40000
[ 1409.767636] ath10k_sdio mmc1:0001:1: dump mem, name:REG_TOTAL, type:1, start:0x800, len:0x7f820, size:245, ret:0x7f820

message if use https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=de03e26479e2cf5f3e1753bda517f44910457036
it removed "begin fw dump" and "dump mem, name:..."

[ 1378.668263] ath10k_sdio mmc1:0001:1: simulating soft firmware crash
[ 1378.680788] ath10k_sdio mmc1:0001:1: check fw reg : 400
[ 1378.686200] ath10k_sdio mmc1:0001:1: firmware crashed! (guid 413d98b1-84c0-4298-b605-2b10ec0c54a5)
[ 1378.695375] ath10k_sdio mmc1:0001:1: qca6174 hw3.2 sdio target 0x05030000 chip_id 0x00000000 sub 0000:0000
[ 1378.705121] ath10k_sdio mmc1:0001:1: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 1
[ 1378.714502] ath10k_sdio mmc1:0001:1: firmware ver WLAN.RMH4.4.1-00126-QCARMSWP-1 api 6 features wowlan,ignore-otp,raw-mode crc32 b84317cf
[ 1378.728077] ath10k_sdio mmc1:0001:1: board_file api 2 bmi_id 0:4 crc32 6364cfcc
[ 1378.735414] ath10k_sdio mmc1:0001:1: htt-ver 3.69 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[ 1378.748882] ath10k_sdio mmc1:0001:1: firmware register dump:
[ 1378.754582] ath10k_sdio mmc1:0001:1: [00]: 0x05030000 0x000015B3 0x0099908D 0x00955B31
[ 1378.762547] ath10k_sdio mmc1:0001:1: [04]: 0x0099908D 0x00060730 0x00000018 0x004641A0
[ 1378.770504] ath10k_sdio mmc1:0001:1: [08]: 0x0041FAA4 0x0041FA9C 0x00999070 0x00404490
[ 1378.778440] ath10k_sdio mmc1:0001:1: [12]: 0x00000009 0xFFFFFFFF 0x00952CD0 0x00952CE6
[ 1378.786540] ath10k_sdio mmc1:0001:1: [16]: 0x00952CC4 0x00910712 0x00000000 0x00000000
[ 1378.794508] ath10k_sdio mmc1:0001:1: [20]: 0x4099908D 0x0040E9E8 0x00000001 0x00423AC0
[ 1378.802449] ath10k_sdio mmc1:0001:1: [24]: 0x809F3189 0x0040EA48 0x00426240 0xC099908D
[ 1378.810379] ath10k_sdio mmc1:0001:1: [28]: 0x809143A7 0x0040EA68 0x0041FAA4 0x00423A80
[ 1378.818313] ath10k_sdio mmc1:0001:1: [32]: 0x809F1193 0x0040EA88 0x00411770 0x004117E0
[ 1378.826246] ath10k_sdio mmc1:0001:1: [36]: 0x809F0EEE 0x0040EAA8 0x00000000 0x00000000
[ 1378.834188] ath10k_sdio mmc1:0001:1: [40]: 0x80911210 0x0040EAC8 0x00000008 0x00404130
[ 1378.842166] ath10k_sdio mmc1:0001:1: [44]: 0x80911154 0x0040EB28 0x00400000 0x00000000
[ 1378.851006] ath10k_sdio mmc1:0001:1: [48]: 0x8091122D 0x0040EB48 0x00000000 0x00400600
[ 1378.858947] ath10k_sdio mmc1:0001:1: [52]: 0x40910024 0x0040EB78 0x0040AB98 0x0040AB98
[ 1378.866880] ath10k_sdio mmc1:0001:1: [56]: 0x00000000 0x0040EB98 0x009BB001 0x00040020
Quoted 8 lines
Quoted 8 lines

+static void ath10k_sdio_check_fw_reg(struct ath10k *ar, u32 *fast_dump)

drivers/net/wireless/ath/ath10k/sdio.c +4 -0
+{
+	u32 param;
+
+	ath10k_sdio_read_host_interest_value(ar, HI_ITEM(hi_option_flag2), 

&param);
+

Quoted 8 lines

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2031

Quoted 5 lines
drivers/net/wireless/ath/ath10k/sdio.c +5 -0
+	*fast_dump = ((param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW)
+			     == HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW);
+
+	ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio hi_option_flag2 %x\n", param);
+}

I renamed this ath10k_sdio_is_fast_dump_supported() which returns a boolean. Also I changed all fast_dump variables to a boolean.

OK.

Quoted 1 line

...

Quoted 6 lines
Quoted 6 lines
(quoted diff) +1 -0
+		ret = ath10k_sdio_dump_memory_generic(ar, current_region, buf, 

fast_dump);

(quoted diff) +2 -0
+
+		ath10k_err(ar, "dump mem, name:%s, type:%d, start:0x%x, len:0x%x, 

size:%d, ret:0x%x\n",

(quoted diff) +1 -0
+			   current_region->name,
Quoted 9 lines

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2259

Quoted 5 lines
drivers/net/wireless/ath/ath10k/sdio.c +5 -0
+			   current_region->type,
+			   current_region->start,
+			   current_region->len,
+			   current_region->section_table.size,
+			   ret);

This error print looks like a debug message, so I removed it. If you need it, let me know.

OK

Quoted 10 lines

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2285

Quoted 7 lines
drivers/net/wireless/ath/ath10k/sdio.c +7 -0
+void ath10k_sdio_fw_crashed_dump(struct ath10k *ar)
+{
+	struct ath10k_fw_crash_data *crash_data;
+	char guid[UUID_STRING_LEN + 1];
+	u32 fast_dump = 0;
+
+	ath10k_err(ar, "begin fw dump\n");

This also looks like a debug message so I removed it.

Quoted 8 lines

drivers/net/wireless/ath/ath10k/sdio.c static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend, · line 2290

Quoted 4 lines
drivers/net/wireless/ath/ath10k/sdio.c +4 -0
+	ath10k_sdio_check_fw_reg(ar, &fast_dump);
+
+	if (fast_dump)
+		ar->bmi.done_sent = false;

I did some refactoring in patch "ath10k: move enable_pll_clk call to ath10k_core_start()" (submitted separately) so that I could change this to ath10k_bmi_start().

OK
...

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#7 lore raw

Re: [PATCH v4 2/2] ath10k: add fw coredump for sdio when firmware assert

Quoted 6 lines · Wen Gong
Quoted 4 lines · Kalle Valo

Wen Gong <[email protected]> writes:

I did some changes in the pending branch, please check:

I compared this patch with patch in pending branch, it is OK for me.

Great, thanks for testing.

I also did some changes to the commit log and added an example output of a firmware crash.

Quoted 1 line
[ 1378.680788] ath10k_sdio mmc1:0001:1: check fw reg : 400

But I could not find this message anywhere in upstream ath10k so I assumed it's from an out-of-tree patch and removed it from the example.

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw

Re: [PATCH v4 1/2] ath10k: add bus type for each layout of coredump

In reply to Wen Gong
Quoted 7 lines · Wen Gong

For some hw version, it has more than one bus type, it need to add bus type to distinguish different chip.

Tested-on: QCA6174 SDIO WLAN.RMH.4.4.1-00018-QCARMSWP-1

2 patches applied to ath-next branch of ath.git, thanks.

c796d513c6ae ath10k: add bus type for each layout of coredump 3c45f21af84e ath10k: sdio: add firmware coredump support

Signature · 9 lines
https://patchwork.kernel.org/patch/11158043/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#3 lore raw

Re: [PATCH v4 1/2] ath10k: add bus type for each layout of coredump

In reply to Wen Gong
Quoted 7 lines · Wen Gong

For some hw version, it has more than one bus type, it need to add bus type to distinguish different chip.

Tested-on: QCA6174 SDIO WLAN.RMH.4.4.1-00018-QCARMSWP-1

2 patches applied to ath-next branch of ath.git, thanks.

c796d513c6ae ath10k: add bus type for each layout of coredump 3c45f21af84e ath10k: sdio: add firmware coredump support

Signature · 3 lines
https://patchwork.kernel.org/patch/11158043/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches