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

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

mhi: core: abort system suspends when disabling low power modes



It's possible apps CPU to go into power collapse middle of a
client request to disable MHI low power mode.  This cause
external subsystem to timeout.  Abort any system suspends when
disabling MHI low power modes.

CRs-Fixed: 2426306
Change-Id: I6c90f957ca4c75c54fb96996c450b31942174878
Acked-by: default avatarBhaumik Vasav Bhatt <bbhatt@qti.qualcomm.com>
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 46e7ca64
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1310,6 +1310,10 @@ int of_register_mhi_controller(struct mhi_controller *mhi_cntrl)
	mhi_dev->mhi_cntrl = mhi_cntrl;
	dev_set_name(&mhi_dev->dev, "%04x_%02u.%02u.%02u", mhi_dev->dev_id,
		     mhi_dev->domain, mhi_dev->bus, mhi_dev->slot);

	/* init wake source */
	device_init_wakeup(&mhi_dev->dev, true);

	ret = device_add(&mhi_dev->dev);
	if (ret)
		goto error_add_dev;
+1 −0
Original line number Diff line number Diff line
@@ -1325,6 +1325,7 @@ int __mhi_device_get_sync(struct mhi_controller *mhi_cntrl)
	read_lock_bh(&mhi_cntrl->pm_lock);
	mhi_cntrl->wake_get(mhi_cntrl, true);
	if (MHI_PM_IN_SUSPEND_STATE(mhi_cntrl->pm_state)) {
		pm_wakeup_event(&mhi_cntrl->mhi_dev->dev, 0);
		mhi_cntrl->runtime_get(mhi_cntrl, mhi_cntrl->priv_data);
		mhi_cntrl->runtime_put(mhi_cntrl, mhi_cntrl->priv_data);
	}