From 5f0ae149d9d156632b5661deb430d68792607a11 Mon Sep 17 00:00:00 2001 From: bings Date: Fri, 14 Jul 2017 17:52:45 +0800 Subject: [PATCH] qcacld-3.0: Mask sdio host controller interrupts in shutdown Driver should mask the sdio host controller interrupts in ssr shutdown callback, or routine mmc_signal_sdio_irq is called unexpectedly and causes crash. Change-Id: I8551a7d809bf115d2df9735c8c7a30045f717cd1 CRs-Fixed: 2076658 --- core/hdd/src/wlan_hdd_driver_ops.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index f2d09a55e874..0dc6b35b9d3d 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -488,6 +488,13 @@ static void wlan_hdd_shutdown(void) return; } + if (!hif_ctx) { + hdd_err("Failed to get HIF context, ignore SSR shutdown"); + return; + } + /* mask the host controller interrupts */ + hif_mask_interrupt_call(hif_ctx); + if (cds_is_load_or_unload_in_progress()) { hdd_err("Load/unload in progress, ignore SSR shutdown"); return; @@ -500,10 +507,7 @@ static void wlan_hdd_shutdown(void) hdd_err("Host is not ready for SSR, attempting anyway"); if (!QDF_IS_EPPING_ENABLED(cds_get_conparam())) { - if (!hif_ctx) - hdd_err("Invalid hif ctx!"); - else - hif_disable_isr(hif_ctx); + hif_disable_isr(hif_ctx); hdd_wlan_shutdown(); } }