Просмотр исходного кода

qcacld-3.0: Do not directly call QDF_BUG in PMO

Use qdf_trigger_self_recovery instead of QDF_BUG for runtime PM
resume failure case as qdf_trigger_self_recovery can handle more
scenarios gracefully.

Change-Id: Iff0348fafb1be82f46400099e3cd551c079eea74
CRs-fixed: 2377677
Yue Ma 6 лет назад
Родитель
Сommit
a66ccb8e2a
1 измененных файлов с 27 добавлено и 9 удалено
  1. 27 9
      components/pmo/core/src/wlan_pmo_suspend_resume.c

+ 27 - 9
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -936,27 +936,45 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
 
 	hif_pre_runtime_resume(hif_ctx);
 
-	if (pld_cb)
-		QDF_BUG(!pld_cb());
+	if (pld_cb) {
+		if (pld_cb()) {
+			status = QDF_STATUS_E_FAILURE;
+			goto fail;
+		}
+	}
 
-	QDF_BUG(!hif_runtime_resume(hif_ctx));
+	if (hif_runtime_resume(hif_ctx)) {
+		status = QDF_STATUS_E_FAILURE;
+		goto fail;
+	}
 
 	status = pmo_core_psoc_bus_resume_req(psoc, QDF_RUNTIME_SUSPEND);
-	QDF_BUG(status == QDF_STATUS_SUCCESS);
+	if (status != QDF_STATUS_SUCCESS)
+		goto fail;
 
 	status = pmo_core_psoc_configure_resume(psoc);
-	QDF_BUG(status == QDF_STATUS_SUCCESS);
+	if (status != QDF_STATUS_SUCCESS)
+		goto fail;
 
 	status = pmo_tgt_psoc_set_runtime_pm_inprogress(psoc, false);
-	QDF_BUG(status == QDF_STATUS_SUCCESS);
+	if (status != QDF_STATUS_SUCCESS)
+		goto fail;
 
-	QDF_BUG(!htc_runtime_resume(htc_ctx));
+	if (htc_runtime_resume(htc_ctx)) {
+		status = QDF_STATUS_E_FAILURE;
+		goto fail;
+	}
 
 	status = cdp_runtime_resume(dp_soc, txrx_pdev);
-	QDF_BUG(status == QDF_STATUS_SUCCESS);
+	if (status != QDF_STATUS_SUCCESS)
+		goto fail;
 
 	hif_process_runtime_resume_success(hif_ctx);
 
+fail:
+	if (status != QDF_STATUS_SUCCESS)
+		qdf_trigger_self_recovery();
+
 dec_psoc_ref:
 	pmo_psoc_put_ref(psoc);