Pārlūkot izejas kodu

icnss2: send ICNSS_UEVENT_FW_DOWN uevent instead ICNSS_UEVENT_FW_CRASH

PD restart triggered as part of host based SSR triggered,
this will call PLD shutdown and HDD shutdown.
While processing HDD shutdown host driver check CDS recovering state
and then ASSERT if it is not set.
To Avoid this ASSERT, fix introduced to set CDS recovering by
sending ICNSS_UEVENT_FW_DOWN uevent to Host driver during firmware
crash.

Change-Id: I4f06404b02bb7ce0018b3f8e1e5253e0ba155095
CRs-Fixed: 3595285
Balaji Pothunoori 1 gadu atpakaļ
vecāks
revīzija
2f4117dcd2
1 mainītis faili ar 10 papildinājumiem un 3 dzēšanām
  1. 10 3
      icnss2/main.c

+ 10 - 3
icnss2/main.c

@@ -1590,15 +1590,22 @@ out:
 static int icnss_fw_crashed(struct icnss_priv *priv,
 			    struct icnss_event_pd_service_down_data *event_data)
 {
+	struct icnss_uevent_fw_down_data fw_down_data = {0};
+
 	icnss_pr_dbg("FW crashed, state: 0x%lx\n", priv->state);
 
 	set_bit(ICNSS_PD_RESTART, &priv->state);
-	clear_bit(ICNSS_FW_READY, &priv->state);
 
 	icnss_pm_stay_awake(priv);
 
-	if (test_bit(ICNSS_DRIVER_PROBED, &priv->state))
-		icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_CRASHED, NULL);
+	if (test_bit(ICNSS_DRIVER_PROBED, &priv->state) &&
+	    test_bit(ICNSS_FW_READY, &priv->state)) {
+		clear_bit(ICNSS_FW_READY, &priv->state);
+		fw_down_data.crashed = true;
+		icnss_call_driver_uevent(priv,
+					 ICNSS_UEVENT_FW_DOWN,
+					 &fw_down_data);
+	}
 
 	if (event_data && event_data->fw_rejuvenate)
 		wlfw_rejuvenate_ack_send_sync_msg(priv);