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

Commit abdbe88f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Fix not to update state during pipe reset"

parents 224be368 c4e75e27
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1288,7 +1288,8 @@ static int ipa_mhi_reset_dl_channel(struct ipa_mhi_channel_ctx *channel)
	return 0;
}

static int ipa_mhi_reset_channel(struct ipa_mhi_channel_ctx *channel)
static int ipa_mhi_reset_channel(struct ipa_mhi_channel_ctx *channel,
				 bool update_state)
{
	int res;

@@ -1304,7 +1305,8 @@ static int ipa_mhi_reset_channel(struct ipa_mhi_channel_ctx *channel)

	channel->state = IPA_HW_MHI_CHANNEL_STATE_DISABLE;

	if (ipa_get_transport_type() == IPA_TRANSPORT_TYPE_GSI) {
	if ((ipa_get_transport_type() == IPA_TRANSPORT_TYPE_GSI) &&
		update_state) {
		res = ipa_mhi_read_write_host(IPA_MHI_DMA_TO_HOST,
			&channel->state, channel->channel_context_addr +
				offsetof(struct ipa_mhi_ch_ctx, chstate),
@@ -1468,7 +1470,7 @@ int ipa_mhi_connect_pipe(struct ipa_mhi_connect_params *in, u32 *clnt_hdl)
	return 0;
fail_connect_pipe:
	mutex_unlock(&mhi_client_general_mutex);
	ipa_mhi_reset_channel(channel);
	ipa_mhi_reset_channel(channel, true);
fail_start_channel:
	IPA_ACTIVE_CLIENTS_DEC_EP(in->sys.client);
	return -EPERM;
@@ -1516,7 +1518,7 @@ int ipa_mhi_disconnect_pipe(u32 clnt_hdl)

	IPA_ACTIVE_CLIENTS_INC_EP(ipa_get_client_mapping(clnt_hdl));

	res = ipa_mhi_reset_channel(channel);
	res = ipa_mhi_reset_channel(channel, false);
	if (res) {
		IPA_MHI_ERR("ipa_mhi_reset_channel failed %d\n", res);
		goto fail_reset_channel;