From 7d672e584a881e485df0698a07b1d7d8c99e014d Mon Sep 17 00:00:00 2001 From: Naman Padhiar Date: Wed, 5 Aug 2020 00:39:22 +0530 Subject: [PATCH] icnss: Do not clear SHUTDOWN_DONE flag until reinit is done In case of SSR/PDR, when FW comes up, platform driver receives FW_READY indication. As part of FW_READY, platform driver calls shutdown and reinit ops of host driver. Clear SHUTDOWN_DONE flag at right place so that if reinit is not called SSR/PDR because of FW again went down between calling driver shutdown and reinit then next time directly call reinit and avoid calling shutdown. Change-Id: I2a8bd77ab47d5008b705010f09084cbfebc4d06e Signed-off-by: Naman Padhiar --- drivers/soc/qcom/icnss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 0709f211acde..e0794357b2bb 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -1220,7 +1220,7 @@ static int icnss_call_driver_shutdown(struct icnss_priv *priv) static int icnss_pd_restart_complete(struct icnss_priv *priv) { - int ret; + int ret = 0; icnss_pm_relax(priv); @@ -1260,7 +1260,6 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv) goto out_power_off; } -out: icnss_block_shutdown(false); clear_bit(ICNSS_SHUTDOWN_DONE, &penv->state); return 0; @@ -1271,6 +1270,7 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv) out_power_off: icnss_hw_power_off(priv); +out: return ret; }