[PATCH] wifi: ath11k: Fix CE offset address calculation for WCN6750 in SSR
Jeff Johnson
quic_jjohnson at quicinc.com
Fri Oct 4 09:44:26 PDT 2024
On 9/27/2024 2:58 AM, Balaji Pothunoori wrote:
> Currently, mem_ce and mem iomem addresses are used to calculate the
> CE offset address. mem_ce is initialized with mem address, and for
> targets where ce_remap is needed, mem_ce is remapped to a new address
> space during AHB probe.
>
> For targets such as WCN6750 in which CE address space is same as WCSS
> address space (i.e. "ce_remap" hw_param is set to false), mem_ce and
> mem iomem addresses are same. In the initial SRNG setup for such targets,
> the CE offset address and hence CE register base addresses are
> calculated correctly in ath11k_hal_srng_init() as both mem and mem_ce
> are initialized with same iomem address.
>
> Later, after the firmware download, mem is initialized with BAR address
> received in qmi_wlanfw_device_info_resp_msg_v01 QMI message, while mem_ce
> is not updated.
>
> After initial setup success, during Subsystem Restart (SSR), as part
> of reinitialization, ath11k_hal_srng_init() will be called again,
> and CE offset address will be calculated incorrectly this time as mem_ce
> address was not updated. Due to the incorrect CE offset address,
> APPS accesses an invalid CE register address which leads to improper
> behavior in firmware after SSR is triggered.
>
> To fix the above issue, update mem_ce to mem iomem address in
> ath11k_qmi_request_device_info() for targets which do not support
> ce_remap feature.
>
> Fixes: b42b3678c91f("wifi: ath11k: remap ce register space for IPQ5018")
Not quite correct, missing space after the hash. Should be:
Fixes: b42b3678c91f ("wifi: ath11k: remap ce register space for IPQ5018")
hint: if you add the following to your git config file, you can issue the
command "git fixes <hash>" and it will emit the correct Fixes: tag.
[alias]
fixes = show -q --format=fixes
[pretty]
fixes = Fixes: %h (\"%s\")
[core]
abbrev = 12
No need to resend to fix this -- I'll fix it in the pending branch
> Signed-off-by: Balaji Pothunoori <quic_bpothuno at quicinc.com>
> ---
> drivers/net/wireless/ath/ath11k/qmi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
> index f477afd325de..7a22483b35cd 100644
> --- a/drivers/net/wireless/ath/ath11k/qmi.c
> +++ b/drivers/net/wireless/ath/ath11k/qmi.c
> @@ -2180,6 +2180,9 @@ static int ath11k_qmi_request_device_info(struct ath11k_base *ab)
> ab->mem = bar_addr_va;
> ab->mem_len = resp.bar_size;
>
> + if (!ab->hw_params.ce_remap)
> + ab->mem_ce = ab->mem;
> +
> return 0;
> out:
> return ret;
More information about the ath11k
mailing list