Browse Source

qcacmn: Schedule oom_allocation work for SRNG based CE

On nbuf allocation failure in hif_post_recv_buffers_for_pipe
for the last buffer in the CE destination ring, oom_allocation
work is not getting scheduled since there is a mismatch
between the recv_buffers_needed and the num_entries - 1 of the
destination ring.

Fix is to schedule the oom_allocation work for srng
based CE with appropriate check of recv_buffers_needed
and destination ring num_entries.

Change-Id: Ie20d5b21358a401e60776db8a3a8a8644279f1fe
CRs-Fixed: 2705475
Yeshwanth Sriram Guntuka 5 years ago
parent
commit
874f714a03
1 changed files with 3 additions and 1 deletions
  1. 3 1
      hif/src/ce/ce_main.c

+ 3 - 1
hif/src/ce/ce_main.c

@@ -2454,7 +2454,9 @@ static void hif_post_recv_buffers_failure(struct HIF_CE_pipe_info *pipe_info,
 	 *	there is no trigger to refill the ce and we will
 	 *	eventually crash
 	 */
-	if (bufs_needed_tmp == CE_state->dest_ring->nentries - 1)
+	if (bufs_needed_tmp == CE_state->dest_ring->nentries - 1 ||
+	    (ce_srng_based(scn) &&
+	     bufs_needed_tmp == CE_state->dest_ring->nentries - 2))
 		qdf_sched_work(scn->qdf_dev, &CE_state->oom_allocation_work);
 
 }