浏览代码

qcacmn: Do runtime_get_sync in htc_kick_queues

Interface down is received when wlan is in runtime
suspend state. The wmi commands that have to be sent
as part of this cause a runtime resume and the htc tx
queues are processed within runtime_resume callback.
The work that is scheduled for this tries to do a
runtime_get as part of htc_try_send but the runtime_status
is still in resuming state causing EINPROGRESS return
value. This will result in the wmi commands to be not sent
to firmware and eventually resulting wmi command timeout.

Fix is to do runtime_get_sync in htc_kick_queues.

Change-Id: I1f4ba1c3dad32f7c407c4416529424be6d4bf18d
CRs-Fixed: 2711998
Yeshwanth Sriram Guntuka 5 年之前
父节点
当前提交
86084af159
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      htc/htc_send.c

+ 5 - 0
htc/htc_send.c

@@ -2446,6 +2446,9 @@ void htc_kick_queues(void *context)
 	HTC_TARGET *target = (HTC_TARGET *)context;
 	HTC_ENDPOINT *endpoint = NULL;
 
+	if (hif_pm_runtime_get_sync(target->hif_dev, RTPM_ID_HTC))
+		return;
+
 	for (i = 0; i < ENDPOINT_MAX; i++) {
 		endpoint = &target->endpoint[i];
 
@@ -2460,6 +2463,8 @@ void htc_kick_queues(void *context)
 	}
 
 	hif_fastpath_resume(target->hif_dev);
+
+	hif_pm_runtime_put(target->hif_dev, RTPM_ID_HTC);
 }
 #endif