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

Commit a514a94b authored by Sujeev Dias's avatar Sujeev Dias Committed by Gerrit - the friendly Code Review server
Browse files

mhi: core: check MHI host state instead of MHI dev state for LPM exit state



When a client request to disable MHI low power mode, it's
important MHI host only return after exiting MHI low power modes.
Otherwise, clients may get un-clocked register access when
accessing physical link. By checking host state, we're guaranteed
to return only after exiting low power states.

CRs-Fixed: 2320851
Change-Id: I45f5f8463fba2c35ccd6c9e67e749d9d4fc3d904
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent f9d0d705
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1033,7 +1033,7 @@ int __mhi_device_get_sync(struct mhi_controller *mhi_cntrl)
	read_unlock_bh(&mhi_cntrl->pm_lock);

	ret = wait_event_timeout(mhi_cntrl->state_event,
				 mhi_cntrl->dev_state == MHI_STATE_M0 ||
				 mhi_cntrl->pm_state == MHI_PM_M0 ||
				 MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state),
				 msecs_to_jiffies(mhi_cntrl->timeout_ms));