ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: Fix device boot error
@ 2021-09-13 17:50 Jouni Malinen
  2021-09-14  3:20 ` kernel test robot
  2021-10-20  7:55 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Jouni Malinen @ 2021-09-13 17:50 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless, Abinaya Kalaiselvan, Jouni Malinen

From: Abinaya Kalaiselvan <akalaise@codeaurora.org>

mask value ATH10K_FW_CRASH_DUMP_RAM_DATA is not mandatory to get iram
mem layout. So introduced ath10k_coredump_get_hw_mem_layout to copy
hardware memory layout.

This fixes the below boot error:
[   17.468882] ath10k_pci 0000:06:00.0: failed to copy target iram contents: -12
[   17.513925] ath10k_pci 0000:06:00.0: could not init core (-12)
[   17.517635] ath10k_pci 0000:06:00.0: could not probe fw (-12)

Tested-on: QCA9984 X86 10.4-3.9.0.2-00139

Fixes: 9af7c32ceca8 ("ath10k: add target IRAM recovery feature support")
Signed-off-by: Abinaya Kalaiselvan <akalaise@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/core.c     |  2 +-
 drivers/net/wireless/ath/ath10k/coredump.c | 11 ++++++++---
 drivers/net/wireless/ath/ath10k/coredump.h |  1 +
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 2f9be182fbfb..cbcf3aa3e92c 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -2690,7 +2690,7 @@ static int ath10k_core_copy_target_iram(struct ath10k *ar)
 	int i, ret;
 	u32 len, remaining_len;
 
-	hw_mem = ath10k_coredump_get_mem_layout(ar);
+	hw_mem = ath10k_coredump_get_hw_mem_layout(ar);
 	if (!hw_mem)
 		return -ENOMEM;
 
diff --git a/drivers/net/wireless/ath/ath10k/coredump.c b/drivers/net/wireless/ath/ath10k/coredump.c
index 7eb72290a925..f8419a707b89 100644
--- a/drivers/net/wireless/ath/ath10k/coredump.c
+++ b/drivers/net/wireless/ath/ath10k/coredump.c
@@ -1447,11 +1447,17 @@ static u32 ath10k_coredump_get_ramdump_size(struct ath10k *ar)
 
 const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar)
 {
-	int i;
-
 	if (!test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask))
 		return NULL;
 
+	return ath10k_coredump_get_hw_mem_layout(ar);
+}
+EXPORT_SYMBOL(ath10k_coredump_get_mem_layout);
+
+const struct ath10k_hw_mem_layout *ath10k_coredump_get_hw_mem_layout(struct ath10k *ar)
+{
+	int i;
+
 	if (WARN_ON(ar->target_version == 0))
 		return NULL;
 
@@ -1464,7 +1470,6 @@ const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k
 
 	return NULL;
 }
-EXPORT_SYMBOL(ath10k_coredump_get_mem_layout);
 
 struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar)
 {
diff --git a/drivers/net/wireless/ath/ath10k/coredump.h b/drivers/net/wireless/ath/ath10k/coredump.h
index 42404e246e0e..7f4849c69ce8 100644
--- a/drivers/net/wireless/ath/ath10k/coredump.h
+++ b/drivers/net/wireless/ath/ath10k/coredump.h
@@ -177,6 +177,7 @@ void ath10k_coredump_unregister(struct ath10k *ar);
 void ath10k_coredump_destroy(struct ath10k *ar);
 
 const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar);
+const struct ath10k_hw_mem_layout *ath10k_coredump_get_hw_mem_layout(struct ath10k *ar);
 
 #else /* CONFIG_DEV_COREDUMP */
 
-- 
2.25.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-20  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 17:50 [PATCH] ath10k: Fix device boot error Jouni Malinen
2021-09-14  3:20 ` kernel test robot
2021-10-20  7:55 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).