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

Commit 2e15b77b authored by Vivek Pernamitta's avatar Vivek Pernamitta
Browse files

mhi: core: Check PCIe link status before accessing MHI registers



Check PCIE link status before accessing MHI registers at DRV
resume to overcome NOC error.

Change-Id: I796e22797d91fba69e258addd0a73b04a7146d80
Signed-off-by: default avatarVivek Pernamitta <vpernami@codeaurora.org>
parent 38055361
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1511,6 +1511,15 @@ int mhi_pm_fast_resume(struct mhi_controller *mhi_cntrl, bool notify_client)
	}

	if (mhi_cntrl->rddm_supported) {

		/* check EP is in proper state */
		if (mhi_cntrl->link_status(mhi_cntrl, mhi_cntrl->priv_data)) {
			MHI_ERR("Unable to access EP Config space\n");
			write_unlock_irq(&mhi_cntrl->pm_lock);
			tasklet_enable(&mhi_cntrl->mhi_event->task);
			return -ETIMEDOUT;
		}

		if (mhi_get_exec_env(mhi_cntrl) == MHI_EE_RDDM &&
		    !mhi_cntrl->power_down) {
			mhi_cntrl->ee = MHI_EE_RDDM;