From bd146c07dec5b6653a73a8331ede7fa67c9f8994 Mon Sep 17 00:00:00 2001 From: bings Date: Thu, 29 Dec 2016 16:50:17 +0800 Subject: 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 --- CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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__); -- cgit v1.2.3