OSDN Git Service

icnss: Send FW CRASHED uevent only if driver is probed
authorAnurag Chouhan <achouhan@codeaurora.org>
Fri, 24 Mar 2017 10:35:00 +0000 (16:05 +0530)
committerAnurag Chouhan <achouhan@codeaurora.org>
Mon, 3 Apr 2017 07:47:39 +0000 (13:17 +0530)
If host driver fails to probed for the first time, and SSR/PDR
get triggered, as part of PD down uevent is sent to host driver
which inturn set recovery in progress which never gets reset
and the next time on FW Ready host driver is not able
to probe successfully
To fix this add a check if driver is probed or not
before sending the uevent.

Change-Id: Idceab059821c0b0e2a8806ad9fee5b6c75aec8c7
CRs-fixed: 2027920
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
drivers/soc/qcom/icnss.c

index 5b92815..bbf599d 100644 (file)
@@ -2146,7 +2146,8 @@ static int icnss_fw_crashed(struct icnss_priv *priv,
 
        icnss_pm_stay_awake(priv);
 
-       icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_CRASHED, NULL);
+       if (test_bit(ICNSS_DRIVER_PROBED, &priv->state))
+               icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_CRASHED, NULL);
 
        if (event_data->wdog_bite) {
                set_bit(ICNSS_WDOG_BITE, &priv->state);