소스 검색

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 년 전
부모
커밋
e4b5c8fbdc
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  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);