瀏覽代碼

qcacmn: Fix the leak in ce tasklet counting on one-msi platform

On one-msi platform, when some ce tasklet execute, other srng such
as reo generate the interrupt, the ce interrupt handler can also be
called and then schedule the ce tasklet, if the running ce tasklet
intend to re-schedule itself due to the rx pending, obviously will
fail, then ce active tasklet count leaked.

Decrease the ce active tasklet count if failed to re-schedule when ce
rx pending.

Change-Id: I36c1c6c007735e192bee5af12aab674ee8324ca9
CRs-Fixed: 2830443
Li Feng 4 年之前
父節點
當前提交
8c267f9645
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      hif/src/ce/ce_tasklet.c

+ 8 - 0
hif/src/ce/ce_tasklet.c

@@ -373,6 +373,14 @@ static void ce_tasklet(unsigned long data)
 		hif_record_ce_desc_event(scn, tasklet_entry->ce_id,
 				HIF_CE_TASKLET_RESCHEDULE, NULL, NULL, -1, 0);
 
+		if (test_bit(TASKLET_STATE_SCHED,
+			     &tasklet_entry->intr_tq.state)) {
+			hif_info("ce_id%d tasklet was scheduled, return",
+				 tasklet_entry->ce_id);
+			qdf_atomic_dec(&scn->active_tasklet_cnt);
+			return;
+		}
+
 		ce_schedule_tasklet(tasklet_entry);
 		return;
 	}