summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYue Ma <yuem@qca.qualcomm.com>2015-08-27 15:53:16 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-08-28 16:50:28 +0530
commit8c94a8d520e4593b71ded4ac85b3210ccca8e2d4 (patch)
tree9387a2033a780955d1f1f2c33078f9df3ab69db9
parent0a613b8bd7a8d82dda6dba60db02669196a24f28 (diff)
qcacld: Ignore setting runtime PM suspend delay during load/unload
During load/unload, runtime PM suspend delay should be ignored since there may be race condition between the timer callback and driver load/unload. Also print the delay for debug purpose. Change-Id: I65f1c7544e90ace574c45e42e45728cd889cee23 CRs-fixed: 898047
-rw-r--r--CORE/SERVICES/HIF/PCIe/hif_pci.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c
index 3d0f5c350914..2bce86856663 100644
--- a/CORE/SERVICES/HIF/PCIe/hif_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c
@@ -3276,6 +3276,12 @@ int hif_pm_runtime_prevent_suspend_timeout(void *ol_sc, unsigned int delay)
unsigned long expires;
unsigned long flags;
+ if (vos_is_load_unload_in_progress(VOS_MODULE_ID_HIF, NULL)) {
+ VOS_TRACE(VOS_MODULE_ID_HIF, VOS_TRACE_LEVEL_ERROR,
+ "%s: Load/unload in progress, ignore!\n", __func__);
+ return -EINVAL;
+ }
+
if (!sc->enable_runtime_pm)
return 0;
@@ -3312,8 +3318,8 @@ int hif_pm_runtime_prevent_suspend_timeout(void *ol_sc, unsigned int delay)
spin_unlock_irqrestore(&hif_sc->runtime_lock, flags);
VOS_TRACE(VOS_MODULE_ID_HIF, VOS_TRACE_LEVEL_INFO,
- "%s: pm_state:%d ret: %d\n", __func__,
- adf_os_atomic_read(&hif_sc->pm_state), ret);
+ "%s: pm_state: %d delay: %dms ret: %d\n", __func__,
+ adf_os_atomic_read(&hif_sc->pm_state), delay, ret);
return ret;