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

Commit e1b2fd35 authored by Ghanim Fodi's avatar Ghanim Fodi Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Update MHI channel state on host after suspend



MHI UL and DL channel state need to be updated on
host after UL and DL channel are suspended.
Otherwise wrong state will be updated.

CRs-Fixed: 2305339e
Change-Id: I6dbc5783619b8527a40630669304cf087aa62638
Signed-off-by: default avatarGhanim Fodi <gfodi@codeaurora.org>
parent 22706e94
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2027,6 +2027,8 @@ static void ipa_mhi_update_host_ch_state(bool update_rp)
			ipa_assert();
			return;
		}
		IPA_MHI_DBG("Updated UL CH=%d state to %s on host\n",
			i, MHI_CH_STATE_STR(channel->state));
	}

	for (i = 0; i < IPA_MHI_MAX_DL_CHANNELS; i++) {
@@ -2062,7 +2064,10 @@ static void ipa_mhi_update_host_ch_state(bool update_rp)
		if (res) {
			IPA_MHI_ERR("ipa_mhi_read_write_host failed\n");
			ipa_assert();
			return;
		}
		IPA_MHI_DBG("Updated DL CH=%d state to %s on host\n",
			i, MHI_CH_STATE_STR(channel->state));
	}
}

@@ -2096,9 +2101,6 @@ static int ipa_mhi_suspend_dl(bool force)
		}
	}

	if (ipa_get_transport_type() == IPA_TRANSPORT_TYPE_GSI)
		ipa_mhi_update_host_ch_state(true);

	return 0;

fail_stop_event_update_dl_channel:
@@ -2151,6 +2153,9 @@ int ipa_mhi_suspend(bool force)
		goto fail_suspend_ul_channel;
	}

	if (ipa_get_transport_type() == IPA_TRANSPORT_TYPE_GSI)
		ipa_mhi_update_host_ch_state(true);

	/*
	 * hold IPA clocks and release them after all
	 * IPA RM resource are released to make sure tag process will not start
+12 −0
Original line number Diff line number Diff line
@@ -849,6 +849,12 @@ int ipa3_qmi_enable_force_clear_datapath_send(
		return -EINVAL;
	}

	if (ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_VIRTUAL ||
		ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_EMULATION) {
		IPAWANDBG("Simulating success on emu/virt mode\n");
		return 0;
	}

	req_desc.max_msg_len =
	QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01;
	req_desc.msg_id = QMI_IPA_ENABLE_FORCE_CLEAR_DATAPATH_REQ_V01;
@@ -898,6 +904,12 @@ int ipa3_qmi_disable_force_clear_datapath_send(
		return -EINVAL;
	}

	if (ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_VIRTUAL ||
		ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_EMULATION) {
		IPAWANDBG("Simulating success on emu/virt mode\n");
		return 0;
	}

	req_desc.max_msg_len =
		QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_MAX_MSG_LEN_V01;
	req_desc.msg_id = QMI_IPA_DISABLE_FORCE_CLEAR_DATAPATH_REQ_V01;