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

Commit b15581c5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Ie587f98d,I5f5d51c5 into msm-next

* changes:
  icnss: Delay Shutdown/reinit sequence for all cases
  icnss: Set crash state for PDR
parents 2bd3e42d 6ec83f80
Loading
Loading
Loading
Loading
+5 −25
Original line number Diff line number Diff line
@@ -767,10 +767,7 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)

	icnss_pm_relax(priv);

	if (test_bit(ICNSS_WDOG_BITE, &priv->state)) {
	icnss_call_driver_shutdown(priv);
		clear_bit(ICNSS_WDOG_BITE, &priv->state);
	}

	clear_bit(ICNSS_PD_RESTART, &priv->state);

@@ -920,8 +917,7 @@ static int icnss_call_driver_remove(struct icnss_priv *priv)
static int icnss_fw_crashed(struct icnss_priv *priv,
			    struct icnss_event_pd_service_down_data *event_data)
{
	icnss_pr_dbg("FW crashed, state: 0x%lx, wdog_bite: %d\n",
		priv->state, event_data->wdog_bite);
	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);
@@ -931,17 +927,9 @@ static int icnss_fw_crashed(struct icnss_priv *priv,
	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);
		goto out;
	}

	icnss_call_driver_shutdown(priv);

	if (event_data->fw_rejuvenate)
		wlfw_rejuvenate_ack_send_sync_msg(priv);

out:
	return 0;
}

@@ -1106,9 +1094,6 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb,

	event_data->crashed = notif->crashed;

	if (notif->crashed == CRASH_STATUS_WDOG_BITE)
		event_data->wdog_bite = true;

	fw_down_data.crashed = !!notif->crashed;
	icnss_call_driver_uevent(priv, ICNSS_UEVENT_FW_DOWN, &fw_down_data);

@@ -1189,21 +1174,21 @@ static int icnss_service_notifier_notify(struct notifier_block *nb,
	if (event_data == NULL)
		return notifier_from_errno(-ENOMEM);

	if (state == NULL) {
	event_data->crashed = true;

	if (state == NULL) {
		priv->stats.recovery.root_pd_crash++;
		goto event_post;
	}

	switch (*state) {
	case ROOT_PD_WDOG_BITE:
		event_data->crashed = true;
		event_data->wdog_bite = true;
		priv->stats.recovery.root_pd_crash++;
		break;
	case ROOT_PD_SHUTDOWN:
		cause = ICNSS_ROOT_PD_SHUTDOWN;
		priv->stats.recovery.root_pd_shutdown++;
		event_data->crashed = false;
		break;
	case USER_PD_STATE_CHANGE:
		if (test_bit(ICNSS_HOST_TRIGGERED_PDR, &priv->state)) {
@@ -1215,11 +1200,9 @@ static int icnss_service_notifier_notify(struct notifier_block *nb,
		}
		break;
	default:
		event_data->crashed = true;
		priv->stats.recovery.root_pd_crash++;
		break;
	}

	icnss_pr_info("PD service down, pd_state: %d, state: 0x%lx: cause: %s\n",
		      *state, priv->state, icnss_pdr_cause[cause]);
event_post:
@@ -2353,9 +2336,6 @@ static int icnss_stats_show_state(struct seq_file *s, struct icnss_priv *priv)
		case ICNSS_WLFW_EXISTS:
			seq_puts(s, "WLAN FW EXISTS");
			continue;
		case ICNSS_WDOG_BITE:
			seq_puts(s, "MODEM WDOG BITE");
			continue;
		case ICNSS_SHUTDOWN_DONE:
			seq_puts(s, "SHUTDOWN DONE");
			continue;
+0 −2
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ enum icnss_driver_event_type {
struct icnss_event_pd_service_down_data {
	bool crashed;
	bool fw_rejuvenate;
	bool wdog_bite;
};

struct icnss_driver_event {
@@ -143,7 +142,6 @@ enum icnss_driver_state {
	ICNSS_PD_RESTART,
	ICNSS_MSA0_ASSIGNED,
	ICNSS_WLFW_EXISTS,
	ICNSS_WDOG_BITE,
	ICNSS_SHUTDOWN_DONE,
	ICNSS_HOST_TRIGGERED_PDR,
};