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

Commit a473eb26 authored by Michael Adisumarta's avatar Michael Adisumarta
Browse files

msm:ipa: stop UL IPA TX channel at the end of the probe



Stop UL MHIP IPA TX channel at end of the probe
if there is no active tethering. This will make sure no Uplink data is
sent when Device side is not prepared to take data.

Change-Id: Id37c0c7eb8270bdf4806265c75780951ae7394c3
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 7e711cbf
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line Diff line number Diff line
@@ -2322,16 +2322,24 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev,
		}
		}
		if (ul_prod != IPA_CLIENT_MAX) {
		if (ul_prod != IPA_CLIENT_MAX) {
			/* No teth started yet, disable UL channel */
			/* No teth started yet, disable UL channel */
			ipa_ep_idx = ipa3_get_ep_mapping(ul_prod);
			if (ipa_ep_idx == IPA_EP_NOT_ALLOCATED) {
				IPA_MPM_ERR("fail to alloc EP.\n");
				goto fail_stop_channel;
			}
			ret = ipa3_stop_gsi_channel(ipa_ep_idx);
			ret = ipa3_stop_gsi_channel(ipa_ep_idx);
			if (ret) {
			if (ret) {
				IPA_MPM_ERR("MHIP Stop channel err = %d\n",
				IPA_MPM_ERR("MHIP Stop channel err = %d\n",
					ret);
					ret);
				goto fail_stop_channel;
				goto fail_stop_channel;
			}
			}
			ipa_mpm_change_gsi_state(probe_id,
				IPA_MPM_MHIP_CHAN_UL,
				GSI_STOPPED);
		}
		}
		if (is_acted)
		if (is_acted)
			ipa_mpm_vote_unvote_pcie_clk(CLK_OFF, probe_id, true,
			ipa_mpm_vote_unvote_pcie_clk(CLK_OFF, probe_id,
						&is_acted);
							true, &is_acted);
		break;
		break;
	case IPA_MPM_TETH_INPROGRESS:
	case IPA_MPM_TETH_INPROGRESS:
	case IPA_MPM_TETH_CONNECTED:
	case IPA_MPM_TETH_CONNECTED: