* [PATCH] ath11k: Fix target crash due to WBM_IDLE_LINK ring desc shortage
@ 2019-10-29 4:26 Vasanthakumar Thiagarajan
2019-11-07 9:03 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Vasanthakumar Thiagarajan @ 2019-10-29 4:26 UTC (permalink / raw)
To: ath11k
Make sure the number of WBM_IDLE_LINK ring descriptors is power
of 2. This increases the number of descriptors to 32k from the
current ~18k to fix the target assert because of the shortage in
the descriptors in WBM_IDLE_LINK ring. Remove unnecessary
power of 2 calculation in ath11k_dp_link_desc_setup() as it is
not required after this change.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/dp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index ff510e8..72c21cf 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -478,6 +478,9 @@ static int ath11k_wbm_idle_ring_setup(struct ath11k_base *ab, u32 *n_link_desc)
*n_link_desc = n_mpdu_link_desc + n_mpdu_queue_desc +
n_tx_msdu_link_desc + n_rx_msdu_link_desc;
+ if (*n_link_desc & (*n_link_desc - 1))
+ *n_link_desc = 1 << fls(*n_link_desc);
+
ret = ath11k_dp_srng_setup(ab, &dp->wbm_idle_ring,
HAL_WBM_IDLE_LINK, 0, 0, *n_link_desc);
if (ret) {
@@ -499,9 +502,6 @@ int ath11k_dp_link_desc_setup(struct ath11k_base *ab,
u32 *desc;
int i, ret;
- if (n_link_desc & (n_link_desc - 1))
- n_link_desc = 1 << fls(n_link_desc);
-
tot_mem_sz = n_link_desc * HAL_LINK_DESC_SIZE;
tot_mem_sz += HAL_LINK_DESC_ALIGN;
--
2.7.4
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: Fix target crash due to WBM_IDLE_LINK ring desc shortage
2019-10-29 4:26 [PATCH] ath11k: Fix target crash due to WBM_IDLE_LINK ring desc shortage Vasanthakumar Thiagarajan
@ 2019-11-07 9:03 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-11-07 9:03 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan; +Cc: ath11k
Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> wrote:
> Make sure the number of WBM_IDLE_LINK ring descriptors is power
> of 2. This increases the number of descriptors to 32k from the
> current ~18k to fix the target assert because of the shortage in
> the descriptors in WBM_IDLE_LINK ring. Remove unnecessary
> power of 2 calculation in ath11k_dp_link_desc_setup() as it is
> not required after this change.
>
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath11k-post-bringup branch of ath.git, thanks.
1415d842e71a ath11k: Fix target crash due to WBM_IDLE_LINK ring desc shortage
--
https://patchwork.kernel.org/patch/11216961/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-07 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 4:26 [PATCH] ath11k: Fix target crash due to WBM_IDLE_LINK ring desc shortage Vasanthakumar Thiagarajan
2019-11-07 9:03 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.