ath10k: cancel the event work in wlan snoc driver module remove
The ath10k snoc driver has two work handlers for the qmi event processing and serializations of event processing. These two event work handler must be sync and canceled in driver remove method to avoid module unload and load failure due to the active event work handler during device object memory free. Change-Id: I546c6ba5404e6a26b22b5ef6155e092e279f2c71 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
This commit is contained in:
parent
3d82d66409
commit
e8397c272f
2 changed files with 6 additions and 3 deletions
|
@ -888,12 +888,13 @@ void ath10k_snoc_stop_qmi_service(struct ath10k *ar)
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_SNOC, "Removing QMI service..\n");
|
ath10k_dbg(ar, ATH10K_DBG_SNOC, "Removing QMI service..\n");
|
||||||
|
|
||||||
|
wake_up_all(&ath10k_fw_ready_wait_event);
|
||||||
|
cancel_work_sync(&qmi_cfg->event_work);
|
||||||
|
cancel_work_sync(&qmi_cfg->qmi_recv_msg_work);
|
||||||
qmi_svc_event_notifier_unregister(WLFW_SERVICE_ID_V01,
|
qmi_svc_event_notifier_unregister(WLFW_SERVICE_ID_V01,
|
||||||
WLFW_SERVICE_VERS_V01,
|
WLFW_SERVICE_VERS_V01,
|
||||||
WLFW_SERVICE_INS_ID_V01,
|
WLFW_SERVICE_INS_ID_V01,
|
||||||
&qmi_cfg->wlfw_clnt_nb);
|
&qmi_cfg->wlfw_clnt_nb);
|
||||||
|
|
||||||
wake_up_all(&ath10k_fw_ready_wait_event);
|
|
||||||
destroy_workqueue(qmi_cfg->event_wq);
|
destroy_workqueue(qmi_cfg->event_wq);
|
||||||
qmi_cfg = NULL;
|
qmi_cfg = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1146,8 +1146,10 @@ static int ath10k_snoc_hif_power_up(struct ath10k *ar)
|
||||||
if (ar->state == ATH10K_STATE_ON ||
|
if (ar->state == ATH10K_STATE_ON ||
|
||||||
test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags)) {
|
test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags)) {
|
||||||
ret = ath10k_snoc_bus_configure(ar);
|
ret = ath10k_snoc_bus_configure(ar);
|
||||||
if (ret)
|
if (ret) {
|
||||||
ath10k_err(ar, "failed to configure bus: %d\n", ret);
|
ath10k_err(ar, "failed to configure bus: %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ret = ath10k_snoc_init_pipes(ar);
|
ret = ath10k_snoc_init_pipes(ar);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue