qcacmn: Fix napi_complete function call limitation
napi_completion could stop NAPI re-queue only if returned budget is small than limit budget. WLAN driver IRQ affinity change would force NAPI complete. In some cases, RX is in busy loop, RX NAPI could be queued to more than one CPU NAPI polling list, which will lead system crash. This change is aimed to make sure that returned budget is smaller than the limit. Change-Id: I1b93596b8afc3ee09c4caeceb7a7ba98c4bed4d1 CRs-Fixed: 3420953
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e93182a1b2
commit
3cbef591fb
@@ -649,6 +649,7 @@ static int hif_exec_poll(struct napi_struct *napi, int budget)
|
||||
int actual_dones;
|
||||
int shift = hif_ext_group->scale_bin_shift;
|
||||
int cpu = smp_processor_id();
|
||||
bool force_complete = false;
|
||||
|
||||
hif_record_event(hif_ext_group->hif, hif_ext_group->grp_id,
|
||||
0, 0, 0, HIF_EVENT_BH_SCHED);
|
||||
@@ -666,7 +667,13 @@ static int hif_exec_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
actual_dones = work_done;
|
||||
|
||||
if (hif_is_force_napi_complete_required(hif_ext_group) ||
|
||||
if (hif_is_force_napi_complete_required(hif_ext_group)) {
|
||||
force_complete = true;
|
||||
if (work_done >= normalized_budget)
|
||||
work_done = normalized_budget - 1;
|
||||
}
|
||||
|
||||
if (qdf_unlikely(force_complete) ||
|
||||
(!hif_ext_group->force_break && work_done < normalized_budget) ||
|
||||
((pld_is_one_msi(scn->qdf_dev->dev) &&
|
||||
hif_irq_disabled_time_limit_reached(hif_ext_group)))) {
|
||||
|
Reference in New Issue
Block a user