mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
qcacmn: cancel ce_tasklet workers during deinit sequence
Fix tasklet workers leak, make sure to cancel the ce tasklet workqueues during driver unload/deinit sequence. Change-Id: I48e0c60f1a8bd9dc5e9cb151e197b3e843eaa0f3 CRs-Fixed: 2244061
This commit is contained in:
parent
8c72007596
commit
a5a30867c4
3 changed files with 20 additions and 1 deletions
|
|
@ -2681,6 +2681,7 @@ void hif_unconfig_ce(struct hif_softc *hif_sc)
|
|||
int pipe_num;
|
||||
struct HIF_CE_pipe_info *pipe_info;
|
||||
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_sc);
|
||||
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(hif_sc);
|
||||
|
||||
for (pipe_num = 0; pipe_num < hif_sc->ce_count; pipe_num++) {
|
||||
pipe_info = &hif_state->pipe_info[pipe_num];
|
||||
|
|
@ -2692,6 +2693,7 @@ void hif_unconfig_ce(struct hif_softc *hif_sc)
|
|||
qdf_spinlock_destroy(&pipe_info->recv_bufs_needed_lock);
|
||||
}
|
||||
}
|
||||
deinit_tasklet_workers(hif_hdl);
|
||||
if (hif_sc->athdiag_procfs_inited) {
|
||||
athdiag_procfs_remove();
|
||||
hif_sc->athdiag_procfs_inited = false;
|
||||
|
|
|
|||
|
|
@ -111,6 +111,22 @@ void init_tasklet_workers(struct hif_opaque_softc *scn)
|
|||
work_initialized = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* deinit_tasklet_workers() - deinit_tasklet_workers
|
||||
* @scn: HIF Context
|
||||
*
|
||||
* Return: N/A
|
||||
*/
|
||||
void deinit_tasklet_workers(struct hif_opaque_softc *scn)
|
||||
{
|
||||
u32 id;
|
||||
|
||||
for (id = 0; id < CE_ID_MAX; id++)
|
||||
cancel_work_sync(&tasklet_workers[id].work);
|
||||
|
||||
work_initialized = false;
|
||||
}
|
||||
|
||||
#ifdef HIF_CONFIG_SLUB_DEBUG_ON
|
||||
/**
|
||||
* ce_schedule_tasklet() - schedule ce tasklet
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2016,2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
#define __CE_TASKLET_H__
|
||||
#include "ce_main.h"
|
||||
void init_tasklet_workers(struct hif_opaque_softc *scn);
|
||||
void deinit_tasklet_workers(struct hif_opaque_softc *scn);
|
||||
void ce_tasklet_init(struct HIF_CE_state *hif_ce_state, uint32_t mask);
|
||||
void ce_tasklet_kill(struct hif_softc *scn);
|
||||
int hif_drain_tasklets(struct hif_softc *scn);
|
||||
|
|
|
|||
Loading…
Reference in a new issue