Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e6d8704 authored by Yuanyuan Liu's avatar Yuanyuan Liu
Browse files

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: default avatarYuanyuan Liu <yuanliu@codeaurora.org>
parent 6c993445
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1220,8 +1220,7 @@ static int icnss_service_notifier_notify(struct notifier_block *nb,
	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,