Pārlūkot izejas kodu

qcacld-3.0: Add runtime sync resume before idle shutdown

WLAN Host timeout waiting for resume event from FW seems to
happen due to race condition between psoc idle shutdown and
runtime resume. So, to avoid that, add runtime sync resume
before calling the pld_idle_shutdown.

Change-Id: Ie4734e66e4cc887681262b596aa2e1c400aa6e43
CRs-Fixed: 3091738
Aditya Kodukula 3 gadi atpakaļ
vecāks
revīzija
e4b5c8fbdc
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      core/hdd/src/wlan_hdd_main.c

+ 10 - 0
core/hdd/src/wlan_hdd_main.c

@@ -12759,10 +12759,20 @@ static void hdd_psoc_idle_timeout_callback(void *priv)
 {
 	int ret;
 	struct hdd_context *hdd_ctx = priv;
+	void *hif_ctx;
 
 	if (wlan_hdd_validate_context(hdd_ctx))
 		return;
 
+	hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+	if (hif_ctx) {
+		/*
+		 * Trigger runtime sync resume before psoc_idle_shutdown
+		 * such that resume can happen successfully
+		 */
+		hif_pm_runtime_sync_resume(hif_ctx, RTPM_ID_SOC_IDLE_SHUTDOWN);
+	}
+
 	hdd_info("Psoc idle timeout elapsed; starting psoc shutdown");
 
 	ret = pld_idle_shutdown(hdd_ctx->parent_dev, hdd_psoc_idle_shutdown);