msm: ipa3: Fix to flush to workqueue during teardown pipe

Workqueue was getting scheduled after teardwon the pipe.
Adding changes to flush to workqueue during teardown pipe.

Change-Id: I5a6b3464d76a9835bfbf7668e8dbb1cdf00c73fe
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
This commit is contained in:
Ashok Vuyyuru 2022-03-03 17:13:03 +05:30 • committed by Jagadeesh Ponduru
commit ceaf68b200
2 changed files with 7 additions and 1 deletions

View file

@ -1673,6 +1673,12 @@ int ipa3_teardown_sys_pipe(u32 clnt_hdl)
}
if (ep->sys->repl_wq)
flush_workqueue(ep->sys->repl_wq);
if(ep->sys->common_sys) {
cancel_delayed_work_sync(&ep->sys->common_sys->freepage_work);
tasklet_kill(&ep->sys->common_sys->tasklet_find_freepage);
}
if (IPA_CLIENT_IS_CONS(ep->client) && !ep->sys->common_buff_pool)
ipa3_cleanup_rx(ep->sys);

View file

@ -1131,7 +1131,6 @@ struct ipa3_sys_context {
struct ipa3_sys_context *common_sys;
struct tasklet_struct tasklet_find_freepage;
atomic_t page_avilable;
struct delayed_work freepage_work;
u32 napi_sort_page_thrshld_cnt;
/* ordering is important - mutable fields go above */
@ -1149,6 +1148,7 @@ struct ipa3_sys_context {
unsigned int napi_sch_cnt;
unsigned int napi_comp_cnt;
struct workqueue_struct *freepage_wq;
struct delayed_work freepage_work;
/* ordering is important - other immutable fields go below */
};