From 5d2697f78d2d0a6d4f96572b50ffe5ce2f65de4e Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Thu, 3 Sep 2015 14:42:40 -0700 Subject: [PATCH] qcacld-3.0: Remove target_lock from ce_h2t_tx_ce_cleanup No other thread should modify the copy engine indexes while we are cleaning up the data structures. Change-Id: I324286c3a8eed24ddd94aa868dbaac425cc30dbf CRs-Fixed: 941355 --- core/hif/src/ce/ce_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/hif/src/ce/ce_main.c b/core/hif/src/ce/ce_main.c index 9ea21085f7fd..e425fd8f1cc2 100644 --- a/core/hif/src/ce/ce_main.c +++ b/core/hif/src/ce/ce_main.c @@ -458,6 +458,11 @@ error_no_dma_mem: * @ce_hdl: Cope engine handle * Using an assert, this function makes sure that, * the TX CE has been processed completely. + * + * This is called while dismantling CE structures. No other thread + * should be using these structures while dismantling is occuring + * therfore no locking is needed. + * * Return: none */ void @@ -471,10 +476,8 @@ ce_h2t_tx_ce_cleanup(struct CE_handle *ce_hdl) if (sc->fastpath_mode_on && (ce_state->id == CE_HTT_H2T_MSG)) { HIF_INFO("%s %d Fastpath mode ON, Cleaning up HTT Tx CE\n", __func__, __LINE__); - cdf_spin_lock_bh(&sc->target_lock); sw_index = src_ring->sw_index; write_index = src_ring->sw_index; - cdf_spin_unlock_bh(&sc->target_lock); /* At this point Tx CE should be clean */ cdf_assert_always(sw_index == write_index);