add fw coredump for sdio when firmware assert
v3 cover add fw coredump for sdio when firmware assert
add fw coredump for sdio when firmware assert
Wen Gong (2):
ath10k: add bus type for each layout of coredump
v2: change code style
v3: split bus type to another patch,
remove ATH10K_BUS_ANY,
add bus type for each layout
ath10k: add fw coredump for sdio when firmware assert
v2: change code style
v3: add commit log for fastdump,
add commit log for ath10k_sdio_hif_diag_read, change ath10k_err to dbg log
drivers/net/wireless/ath/ath10k/bmi.c | 1 + drivers/net/wireless/ath/ath10k/core.c | 4 + drivers/net/wireless/ath/ath10k/coredump.c | 348 +++++++++++++++++++++++++++- 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, 697 insertions(+), 5 deletions(-)
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v3 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
drivers/net/wireless/ath/ath10k/coredump.c | 15 ++++++++++++++- drivers/net/wireless/ath/ath10k/coredump.h | 1 + 2 files changed, 15 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/coredump.c +14 -1
@@ -955,6 +955,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),
@@ -963,6 +964,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),
@@ -971,6 +973,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),
@@ -979,6 +982,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),
@@ -987,6 +991,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),
@@ -995,6 +1000,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),
@@ -1003,6 +1009,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),
@@ -1011,6 +1018,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),
@@ -1019,6 +1027,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),
@@ -1027,6 +1036,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),
@@ -1035,6 +1045,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),
@@ -1043,6 +1054,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),
@@ -1090,7 +1102,8 @@ const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10kfor (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
@@ -155,6 +155,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
PATCH v3 2/2 ath10k: add fw coredump for sdio when firmware assert
In reply to Wen GongWhen 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: add commit log for fastdump,
add commit log for ath10k_sdio_hif_diag_read,
change ath10k_err to dbg log
drivers/net/wireless/ath/ath10k/bmi.c | 1 + drivers/net/wireless/ath/ath10k/core.c | 4 + 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, 682 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath10k/bmi.c +1 -0
@@ -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 +4 -0
@@ -708,6 +708,10 @@ static void ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)ath10k_bmi_read32 (ar, hi_option_flag, ¶m); param |=HI_OPTION_DISABLE_DBGLOG ;ath10k_bmi_write32 (ar, hi_option_flag, param); + +ath10k_bmi_read32 (ar, hi_option_flag2, ¶m); + param |=HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_HOST ; +ath10k_bmi_write32 (ar, hi_option_flag2, param); }static int ath10k_init_configure_target (struct ath10k *ar)
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
@@ -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
Quoted 1 line · Wen Gong
add fw coredump for sdio when firmware assert
Please add the changelog here.
Quoted 11 lines
Wen Gong (2):
ath10k: add bus type for each layout of coredump
v2: change code style
v3: split bus type to another patch,
removeATH10K_BUS_ANY,
add bus type for each layout
ath10k: add fw coredump for sdio when firmware assert
v2: change code style
v3: add commit log for fastdump,
add commit log forath10k_sdio_hif_diag_read, changeath10k_errto dbg log
Then you mix the changelog with patch titles like that it makes it hard to read the summary. So instead add the changelog above, before the summary, and leave the summary intact.
Also this didn't apply:
Applying: ath10k: add bus type for each layout of coredump
Applying: ath10k: add fw coredump for sdio when firmware assert
fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath10k/coredump.c).
error: could not build fake ancestor
Patch failed at 0002 ath10k: add fw coredump for sdio when firmware assert
Then you submit the patch use ath.git master branch as the baseline and do NOT have any other patches applied. Otherwise the sha1 information is wrong and it's a lot more work for me to fix the conflicts.
So please rebase and resend.
Signature · 6 lines
Kalle Valo _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
On 2019-09-24 13:42, Kalle Valo wrote:
patch v4 sent.
Quoted 1 line
So please rebase and resend.
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k