qcacmn: Clean up global desc pool during Umac reset
Make sure that the global dp tx desc pools are cleaned up only once during MLO umac reset. Change-Id: Id6e0ac6532b11ffb9ea190b6ab4d481fb486d853 CRs-Fixed: 3647660
This commit is contained in:

committad av
Ravindra Konda

förälder
136b01ad6b
incheckning
c71f2aaf75
@@ -1736,6 +1736,53 @@ dp_get_umac_reset_in_progress_state(struct cdp_soc_t *psoc)
|
||||
CDP_UMAC_RESET_IN_PROGRESS_DURING_BUFFER_WINDOW :
|
||||
CDP_UMAC_RESET_NOT_IN_PROGRESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_get_global_tx_desc_cleanup_flag() - Get cleanup needed flag
|
||||
* @soc: dp soc handle
|
||||
*
|
||||
* Return: cleanup needed/ not needed
|
||||
*/
|
||||
bool dp_get_global_tx_desc_cleanup_flag(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
struct dp_mlo_ctxt *mlo_ctx = be_soc->ml_ctxt;
|
||||
struct dp_soc_mlo_umac_reset_ctx *grp_umac_reset_ctx;
|
||||
bool flag;
|
||||
|
||||
if (!mlo_ctx)
|
||||
return true;
|
||||
|
||||
grp_umac_reset_ctx = &mlo_ctx->grp_umac_reset_ctx;
|
||||
qdf_spin_lock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
|
||||
|
||||
flag = grp_umac_reset_ctx->tx_desc_pool_cleaned;
|
||||
if (!flag)
|
||||
grp_umac_reset_ctx->tx_desc_pool_cleaned = true;
|
||||
|
||||
qdf_spin_unlock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
|
||||
|
||||
return !flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_reset_global_tx_desc_cleanup_flag() - Reset cleanup needed flag
|
||||
* @soc: dp soc handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void dp_reset_global_tx_desc_cleanup_flag(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
struct dp_mlo_ctxt *mlo_ctx = be_soc->ml_ctxt;
|
||||
struct dp_soc_mlo_umac_reset_ctx *grp_umac_reset_ctx;
|
||||
|
||||
if (!mlo_ctx)
|
||||
return;
|
||||
|
||||
grp_umac_reset_ctx = &mlo_ctx->grp_umac_reset_ctx;
|
||||
grp_umac_reset_ctx->tx_desc_pool_cleaned = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct dp_soc *
|
||||
|
@@ -2985,6 +2985,23 @@ static inline void dp_umac_reset_trigger_pre_reset_notify_cb(struct dp_soc *soc)
|
||||
callback(soc);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_reset_global_tx_desc_cleanup_flag() - Reset cleanup needed flag
|
||||
* @soc: dp soc handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void dp_reset_global_tx_desc_cleanup_flag(struct dp_soc *soc);
|
||||
|
||||
/**
|
||||
* dp_get_global_tx_desc_cleanup_flag() - Get cleanup needed flag
|
||||
* @soc: dp soc handle
|
||||
*
|
||||
* Return: cleanup needed/ not needed
|
||||
*/
|
||||
bool dp_get_global_tx_desc_cleanup_flag(struct dp_soc *soc);
|
||||
|
||||
|
||||
#if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
|
||||
/**
|
||||
* dp_umac_reset_complete_umac_recovery() - Complete Umac reset session
|
||||
|
@@ -11917,6 +11917,7 @@ static QDF_STATUS dp_umac_reset_handle_pre_reset(struct dp_soc *soc)
|
||||
static QDF_STATUS dp_umac_reset_handle_post_reset(struct dp_soc *soc)
|
||||
{
|
||||
if (!soc->umac_reset_ctx.skel_enable) {
|
||||
bool cleanup_needed;
|
||||
qdf_nbuf_t *nbuf_list = &soc->umac_reset_ctx.nbuf_list;
|
||||
|
||||
dp_set_umac_regs(soc);
|
||||
@@ -11929,7 +11930,9 @@ static QDF_STATUS dp_umac_reset_handle_post_reset(struct dp_soc *soc)
|
||||
|
||||
dp_umac_reset_ppeds_txdesc_pool_reset(soc, nbuf_list);
|
||||
|
||||
dp_tx_desc_pool_cleanup(soc, nbuf_list);
|
||||
cleanup_needed = dp_get_global_tx_desc_cleanup_flag(soc);
|
||||
|
||||
dp_tx_desc_pool_cleanup(soc, nbuf_list, cleanup_needed);
|
||||
|
||||
dp_reset_tid_q_setup(soc);
|
||||
}
|
||||
@@ -11963,6 +11966,8 @@ static QDF_STATUS dp_umac_reset_handle_post_reset_complete(struct dp_soc *soc)
|
||||
|
||||
dp_resume_tx_hardstart(soc);
|
||||
|
||||
dp_reset_global_tx_desc_cleanup_flag(soc);
|
||||
|
||||
status = dp_umac_reset_notify_action_completion(soc,
|
||||
UMAC_RESET_ACTION_DO_POST_RESET_COMPLETE);
|
||||
|
||||
|
@@ -95,15 +95,20 @@ static void dp_tx_desc_clean_up(void *ctxt, void *elem, void *elem_list)
|
||||
}
|
||||
}
|
||||
|
||||
void dp_tx_desc_pool_cleanup(struct dp_soc *soc, qdf_nbuf_t *nbuf_list)
|
||||
void dp_tx_desc_pool_cleanup(struct dp_soc *soc, qdf_nbuf_t *nbuf_list,
|
||||
bool cleanup)
|
||||
{
|
||||
int i;
|
||||
struct dp_tx_desc_pool_s *tx_desc_pool = NULL;
|
||||
uint8_t num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
|
||||
if (!cleanup)
|
||||
return;
|
||||
|
||||
for (i = 0; i < num_pool; i++) {
|
||||
tx_desc_pool = dp_get_tx_desc_pool(soc, i);
|
||||
|
||||
TX_DESC_LOCK_LOCK(&tx_desc_pool->lock);
|
||||
if (tx_desc_pool)
|
||||
qdf_tx_desc_pool_free_bufs(soc,
|
||||
&tx_desc_pool->desc_pages,
|
||||
@@ -112,7 +117,10 @@ void dp_tx_desc_pool_cleanup(struct dp_soc *soc, qdf_nbuf_t *nbuf_list)
|
||||
true, &dp_tx_desc_clean_up,
|
||||
nbuf_list);
|
||||
|
||||
TX_DESC_LOCK_UNLOCK(&tx_desc_pool->lock);
|
||||
|
||||
tx_desc_pool = dp_get_spcl_tx_desc_pool(soc, i);
|
||||
TX_DESC_LOCK_LOCK(&tx_desc_pool->lock);
|
||||
|
||||
if (tx_desc_pool)
|
||||
qdf_tx_desc_pool_free_bufs(soc,
|
||||
@@ -121,6 +129,8 @@ void dp_tx_desc_pool_cleanup(struct dp_soc *soc, qdf_nbuf_t *nbuf_list)
|
||||
tx_desc_pool->elem_count,
|
||||
true, &dp_tx_desc_clean_up,
|
||||
nbuf_list);
|
||||
|
||||
TX_DESC_LOCK_UNLOCK(&tx_desc_pool->lock);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -454,9 +454,11 @@ void dp_tx_tso_num_seg_pool_deinit(struct dp_soc *soc, uint8_t num_pool);
|
||||
* dp_tx_desc_pool_cleanup() - Clean up the tx dexcriptor pools
|
||||
* @soc: Handle to DP SoC structure
|
||||
* @nbuf_list: nbuf list for delayed free
|
||||
* @cleanup: cleanup the pool
|
||||
*
|
||||
*/
|
||||
void dp_tx_desc_pool_cleanup(struct dp_soc *soc, qdf_nbuf_t *nbuf_list);
|
||||
void dp_tx_desc_pool_cleanup(struct dp_soc *soc, qdf_nbuf_t *nbuf_list,
|
||||
bool cleanup);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -321,6 +321,20 @@ bool dp_check_umac_reset_in_progress(struct dp_soc *soc)
|
||||
return !!soc->umac_reset_ctx.intr_ctx_bkp;
|
||||
}
|
||||
|
||||
|
||||
#if !defined(QCA_SUPPORT_DP_GLOBAL_CTX) || \
|
||||
(defined(QCA_SUPPORT_DP_GLOBAL_CTX) && \
|
||||
!defined(WLAN_FEATURE_11BE_MLO) || !defined(WLAN_MLO_MULTI_CHIP))
|
||||
bool dp_get_global_tx_desc_cleanup_flag(struct dp_soc *soc)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void dp_reset_global_tx_desc_cleanup_flag(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(WLAN_FEATURE_11BE_MLO) || !defined(WLAN_MLO_MULTI_CHIP)
|
||||
/**
|
||||
* dp_umac_reset_initiate_umac_recovery() - Initiate Umac reset session
|
||||
|
@@ -178,6 +178,7 @@ struct reset_ts {
|
||||
* @grp_ctx_lock: lock for accessing group level umac reset context
|
||||
* @umac_reset_in_progress: Flag to indicate if umac reset is in progress
|
||||
* @is_target_recovery: Flag to indicate if this is for target recovery
|
||||
* @tx_desc_pool_cleaned: Global tx_desc pool clean up has been done
|
||||
* @initiator_chip_id: chip id of the Umac reset initiator
|
||||
* @umac_reset_count: Number of times Umac reset happened on this MLO group
|
||||
*/
|
||||
@@ -187,7 +188,8 @@ struct dp_soc_mlo_umac_reset_ctx {
|
||||
unsigned long response_map;
|
||||
qdf_spinlock_t grp_ctx_lock;
|
||||
uint8_t umac_reset_in_progress:1,
|
||||
is_target_recovery:1;
|
||||
is_target_recovery:1,
|
||||
tx_desc_pool_cleaned:1;
|
||||
uint8_t initiator_chip_id;
|
||||
uint32_t umac_reset_count;
|
||||
};
|
||||
|
Referens i nytt ärende
Block a user