summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnurag Chouhan <achouhan@codeaurora.org>2017-10-27 16:31:38 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-11-01 23:50:26 -0700
commitfd554860f06f6289f8fa359139d12a088e225fc9 (patch)
tree09fcaf32059fa0f9b3b2f56ac409a0fbad8aa0c3
parentaedf62a2ba4143939439ecacee412358ccd6fea2 (diff)
icnss: Check for FW_READY state before sending uevent in PD notifier
The existing state check will create a corner case that when FW crashed during driver probe, platform driver won't send early uevent notification to host driver, which create a small window where host can communicate with FW when FW is crashed. This case can be covered by checking FW_READY state instead. CRs-Fixed: 2122702 Change-Id: I0bde9cb5a526ccd9fe81cd38bd4c27cf2e95042b Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org> Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
-rw-r--r--drivers/soc/qcom/icnss.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c
index 3afe10141ac7..83efbbe25e6b 100644
--- a/drivers/soc/qcom/icnss.c
+++ b/drivers/soc/qcom/icnss.c
@@ -2651,7 +2651,9 @@ event_post:
clear_bit(ICNSS_HOST_TRIGGERED_PDR, &priv->state);
fw_down_data.crashed = event_data->crashed;
- icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_DOWN, &fw_down_data);
+ if (test_bit(ICNSS_FW_READY, &priv->state))
+ icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_DOWN,
+ &fw_down_data);
icnss_driver_event_post(ICNSS_DRIVER_EVENT_PD_SERVICE_DOWN,
ICNSS_EVENT_SYNC, event_data);
done: