Browse Source

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
Vevek Venkatesan 4 năm trước cách đây
mục cha
commit
7d8963e3f1
1 tập tin đã thay đổi với 17 bổ sung8 xóa
  1. 17 8
      components/pmo/core/src/wlan_pmo_suspend_resume.c

+ 17 - 8
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -1065,16 +1065,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;