From 50582ca9cbc976adc069518781c31d967be7b282 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Thu, 12 Sep 2019 15:45:21 -0700 Subject: [PATCH] qcacld-3.0: Move clearing recovery flag to after platform driver callback Platform driver is still doing MHI cleanup at the current location of clearing the recovery flag. Clear it after platform driver callback. Change-Id: Ifa81950790fa3d2704ed1aed85301a99c6383470 CRs-Fixed: 2526873 --- core/hdd/src/wlan_hdd_main.c | 6 ++++-- core/pld/inc/pld_common.h | 7 +++++++ core/pld/src/pld_common.c | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index adc35df73402b..4d3c6b77a68b6 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9764,8 +9764,6 @@ int hdd_psoc_idle_shutdown(struct device *dev) else ret = __hdd_psoc_idle_shutdown(hdd_ctx); - cds_set_recovery_in_progress(false); - return ret; } @@ -9838,6 +9836,10 @@ static void hdd_psoc_idle_timeout_callback(void *priv) hdd_debug("System suspend in progress. Restart idle shutdown timer"); hdd_psoc_idle_timer_start(hdd_ctx); } + + /* Clear the recovery flag for PCIe discrete soc after idle shutdown*/ + if (PLD_BUS_TYPE_PCIE == pld_get_bus_type(hdd_ctx->parent_dev)) + cds_set_recovery_in_progress(false); } #ifdef WLAN_LOGGING_SOCK_SVC_ENABLE diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h index 780e3fbc16a94..f92853c4810e6 100644 --- a/core/pld/inc/pld_common.h +++ b/core/pld/inc/pld_common.h @@ -733,4 +733,11 @@ static inline int pld_nbuf_pre_alloc_free(struct sk_buff *skb) return 0; } #endif +/** + * pld_get_bus_type() - Bus type of the device + * @dev: device + * + * Return: PLD bus type + */ +enum pld_bus_type pld_get_bus_type(struct device *dev); #endif diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 53fd7f971d72c..20e6cb3b8c0ab 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -200,7 +200,7 @@ static struct dev_node *pld_get_dev_node(struct device *dev) * * Return: PLD bus type */ -static enum pld_bus_type pld_get_bus_type(struct device *dev) +enum pld_bus_type pld_get_bus_type(struct device *dev) { struct dev_node *dev_node = pld_get_dev_node(dev);