Skip to content
Permalink
Browse files
ath10k: Fix device boot error
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: 9af7c32 ("ath10k: add target IRAM recovery feature support")
Signed-off-by: Abinaya Kalaiselvan <akalaise@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
  • Loading branch information
Abinaya Kalaiselvan authored and intel-lab-lkp committed Sep 13, 2021
1 parent 6880fa6 commit 06d0afd6a0864795a6750173f7959430da2def78
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
@@ -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;

@@ -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)
{
@@ -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 */

0 comments on commit 06d0afd

Please sign in to comment.