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

Commit 5ff2bfe5 authored by Michael Adisumarta's avatar Michael Adisumarta
Browse files

msm:ipa: continue ODL logging on MHIP post modem SSR



Post modem SSR, check if previously ODL was connected and if yes
connect back ODL from mhip probe.

Change-Id: If0a2cc4a6e9c0a9836ea85fa62677f0c8a6f0e44
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 9da451ae
Loading
Loading
Loading
Loading
+13 −6
Original line number Original line Diff line number Diff line
@@ -2441,12 +2441,19 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev,
	}
	}


	atomic_inc(&ipa_mpm_ctx->probe_cnt);
	atomic_inc(&ipa_mpm_ctx->probe_cnt);
	/* Check if ODL pipe is connected to MHIP DPL pipe before probe */
	/* Check if ODL/USB DPL pipe is connected before probe */
	if (probe_id == IPA_MPM_MHIP_CH_ID_2 &&
	if (probe_id == IPA_MPM_MHIP_CH_ID_2) {
		ipa3_is_odl_connected()) {
		if (ipa3_is_odl_connected())
		IPA_MPM_DBG("setting DPL DMA to ODL\n");
			ret = ipa_mpm_set_dma_mode(
		ret = ipa_mpm_set_dma_mode(IPA_CLIENT_MHI_PRIME_DPL_PROD,
				IPA_CLIENT_MHI_PRIME_DPL_PROD,
				IPA_CLIENT_ODL_DPL_CONS, false);
		else if (atomic_read(&ipa_mpm_ctx->adpl_over_usb_available))
			ret = ipa_mpm_set_dma_mode(
				IPA_CLIENT_MHI_PRIME_DPL_PROD,
				IPA_CLIENT_USB_DPL_CONS, false);
				IPA_CLIENT_USB_DPL_CONS, false);
		if (ret)
			IPA_MPM_ERR("DPL DMA to ODL/USB failed, ret = %d\n",
				ret);
	}
	}
	mutex_lock(&ipa_mpm_ctx->md[probe_id].mhi_mutex);
	mutex_lock(&ipa_mpm_ctx->md[probe_id].mhi_mutex);
	ipa_mpm_ctx->md[probe_id].init_complete = true;
	ipa_mpm_ctx->md[probe_id].init_complete = true;