qcacld-3.0: Avoid deadlock during suspend and resume
Presently in the driver, we get the MSI interrupt to wake up from suspend which directs the call to the both kernel and driver. In the driver, the HIF callback target_initial_wakeup_cb registered, gets called in interrupt context while that through the kernel get scheduled in thread context. These two call can potentially get into a deadlock. The scenario can be described as: - MSI interrupt raised - callback invoked from kernel -> takes spinlock on psoc->lock - hif callback in interrupt context -> spins on the same psoc->lock - deadlock The problem arises due to the fact that both the kernel thread and the interrupt handler are executing on the same CPU. This causes the spinlock in the interrupt context to spin forever. The solution to mitigate this scenario is to not take the reference inside the hif callback pmo_core_psoc_handle_initial_wake_up. This reference was put in place to prevent the wake up callback from getting affected by psoc creation and deletion. But there seems no need for this as creation and deletion of psoc happens outside the time-scope of the wake up callback. Change-Id: I566ab08802ba3f38e154d26599c73d718ec74bfb CRs-Fixed: 2556497
This commit is contained in:

committed by
nshrivas

parent
2b3843e027
commit
ffcaf378c7
@@ -1450,7 +1450,6 @@ void pmo_core_psoc_handle_initial_wake_up(void *cb_ctx)
|
||||
{
|
||||
struct pmo_psoc_priv_obj *psoc_ctx;
|
||||
struct wlan_objmgr_psoc *psoc = (struct wlan_objmgr_psoc *)cb_ctx;
|
||||
QDF_STATUS status;
|
||||
|
||||
pmo_enter();
|
||||
if (!psoc) {
|
||||
@@ -1458,17 +1457,9 @@ void pmo_core_psoc_handle_initial_wake_up(void *cb_ctx)
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = pmo_psoc_get_ref(psoc);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
pmo_err("Failed to get psoc reference");
|
||||
goto out;
|
||||
}
|
||||
|
||||
psoc_ctx = pmo_psoc_get_priv(psoc);
|
||||
pmo_core_update_wow_initial_wake_up(psoc_ctx, true);
|
||||
|
||||
pmo_psoc_put_ref(psoc);
|
||||
|
||||
out:
|
||||
pmo_exit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user