From: Anurag Chouhan Date: Fri, 24 Mar 2017 10:35:00 +0000 (+0530) Subject: icnss: Send FW CRASHED uevent only if driver is probed X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e79dfec9b298bbbf8e94f4d48ee9be2d32b4a2f7;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git icnss: Send FW CRASHED uevent only if driver is probed 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 --- diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 5b9281596c87..bbf599d79992 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -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);