From 9e6d8704ec51a933ca8464ba4d51b3cc6b145aa3 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Fri, 6 Oct 2017 15:11:54 -0700 Subject: [PATCH] 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 --- drivers/soc/qcom/icnss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 76d0c480f093..bb3732686b8a 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -1220,8 +1220,7 @@ event_post: clear_bit(ICNSS_HOST_TRIGGERED_PDR, &priv->state); fw_down_data.crashed = event_data->crashed; - if (test_bit(ICNSS_DRIVER_PROBED, &priv->state) && - !test_bit(ICNSS_PD_RESTART, &priv->state)) + 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,