From 90a51a157ea3061a18d96dc1f0223772a2d0ffb6 Mon Sep 17 00:00:00 2001 From: Vevek Venkatesan Date: Fri, 8 Jan 2021 17:27:27 +0530 Subject: [PATCH] qcacld-3.0: sync rtpm suspend resume only for CE wake irq type In moselle, the runtime suspend and wow resume sync logic has been added without any condition, since hastings is doing APPS side PCI bus suspend which cannot be reverted on suspend failure, so doing this sync logic only if wake irq type is CE interrupt. Change-Id: I07dc5a99d0661fe1ef81e7a46e7053244edf8eb6 CRs-Fixed: 2851261 --- .../pmo/core/src/wlan_pmo_suspend_resume.c | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 9607cb7afae6..1f05ea9afc9c 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -1060,16 +1060,25 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc, } } - hif_pm_runtime_suspend_lock(hif_ctx); - psoc_ctx = pmo_psoc_get_priv(psoc); - if (pmo_core_get_wow_initial_wake_up(psoc_ctx)) { + if (hif_pm_get_wake_irq_type(hif_ctx) == HIF_PM_CE_WAKE) { + /* + * In moselle, there is no separate interrupt for wake_irq, + * shares CE interrupt, there is a chance of wow wakeup + * while suspend is in-progress, so handling such scenario + */ + hif_pm_runtime_suspend_lock(hif_ctx); + psoc_ctx = pmo_psoc_get_priv(psoc); + if (pmo_core_get_wow_initial_wake_up(psoc_ctx)) { + hif_pm_runtime_suspend_unlock(hif_ctx); + pmo_err("Target wake up received before suspend completion"); + status = QDF_STATUS_E_BUSY; + goto resume_hif; + } + hif_process_runtime_suspend_success(hif_ctx); hif_pm_runtime_suspend_unlock(hif_ctx); - pmo_err("Target wake up received before suspend completion"); - status = QDF_STATUS_E_BUSY; - goto resume_hif; + } else { + hif_process_runtime_suspend_success(hif_ctx); } - hif_process_runtime_suspend_success(hif_ctx); - hif_pm_runtime_suspend_unlock(hif_ctx); goto dec_psoc_ref;