From d80c7669d0eaa04bda817db4ba6d666942fbb897 Mon Sep 17 00:00:00 2001 From: Sravan Kumar Kairam Date: Tue, 3 Oct 2017 16:11:05 +0530 Subject: [PATCH] qcacld-3.0: Shutdown IPA WDI pipes on PDR event Shutdown the IPA WDI pipes on PDR event from ICNSS driver to prevent the possibility of IPA diver invalid access of CE ring registers. Change-Id: I19da0c015ba229512f71d7016236b106d9d8ee43 CRs-Fixed: 2072920 --- core/hdd/inc/wlan_hdd_main.h | 6 ++++++ core/hdd/src/wlan_hdd_driver_ops.c | 6 ++++-- core/hdd/src/wlan_hdd_main.c | 10 ++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index a3cff8eb3936..0cb71e4ab499 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -2871,4 +2871,10 @@ void hdd_start_driver_ops_timer(int drv_op); */ void hdd_stop_driver_ops_timer(void); +/** + * hdd_pld_ipa_uc_shutdown_pipes() - Disconnect IPA WDI pipes during PDR + * + * Return: None + */ +void hdd_pld_ipa_uc_shutdown_pipes(void); #endif /* end #if !defined(WLAN_HDD_MAIN_H) */ diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index a29713afb8c4..1d08f1c83999 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1373,10 +1373,12 @@ static void wlan_hdd_pld_notify_handler(struct device *dev, static void wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *uevent) { - if (uevent->uevent == PLD_RECOVERY) + if (uevent->uevent == PLD_RECOVERY) { cds_set_recovery_in_progress(true); - else if (uevent->uevent == PLD_FW_DOWN) + hdd_pld_ipa_uc_shutdown_pipes(); + } else if (uevent->uevent == PLD_FW_DOWN) { cds_set_fw_state(CDS_FW_STATE_DOWN); + } } #ifdef FEATURE_RUNTIME_PM diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0934249e561a..3695c976a2ba 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12738,6 +12738,16 @@ void hdd_drv_ops_inactivity_handler(void) QDF_BUG(0); } +void hdd_pld_ipa_uc_shutdown_pipes(void) +{ + struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + + if (!hdd_ctx) + return; + + hdd_ipa_uc_force_pipe_shutdown(hdd_ctx); +} + /* Register the module init/exit functions */ module_init(hdd_module_init); module_exit(hdd_module_exit);