summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2016-12-29 16:50:17 +0800
committerAshish kumar goswami <agoswa@codeaurora.org>2017-01-09 15:03:25 +0530
commitbd146c07dec5b6653a73a8331ede7fa67c9f8994 (patch)
tree7df87bd95c76812c61afe7b9b14eb0103d695027
parentdee66abb7327aa6d3020283623f5fd61bdf27a62 (diff)
qcacld-2.0: Ignore SSR when load/unload in process
Crash happens because ssr_timer is double added. hdd_ssr_timer_start is called by SSR and rmmod in the same time. SSR and rmmod should not be executed at the same time. Ignore SSR when load/unload in process like PCIE does. Change-Id: I95fea2afe8884b62381185ef38799f304a409b67 CRs-Fixed: 1106372
-rw-r--r--CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
index c1edb6c8d893..48a3762874ee 100644
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2773,6 +2773,10 @@ static void hif_sdio_device_removed(struct sdio_func *func)
static int hif_sdio_device_reinit(struct sdio_func *func, const struct sdio_device_id * id)
{
+ if (vos_is_load_unload_in_progress(VOS_MODULE_ID_HIF, NULL)) {
+ printk("Load/unload in progress, ignore SSR reinit\n");
+ return 0;
+ }
if ((func != NULL) && (id != NULL))
return hifDeviceInserted(func, id);
else
@@ -2784,6 +2788,11 @@ static int hif_sdio_device_reinit(struct sdio_func *func, const struct sdio_devi
static void hif_sdio_device_shutdown(struct sdio_func *func)
{
vos_set_logp_in_progress(VOS_MODULE_ID_HIF, TRUE);
+ if (vos_is_load_unload_in_progress(VOS_MODULE_ID_HIF, NULL)) {
+ vos_set_logp_in_progress(VOS_MODULE_ID_HIF, FALSE);
+ printk("Load/unload in progress, ignore SSR shutdown\n");
+ return;
+ }
vos_set_shutdown_in_progress(VOS_MODULE_ID_HIF, TRUE);
if (!vos_is_ssr_ready(__func__))
pr_err(" %s Host driver is not ready for SSR, attempting anyway\n", __func__);