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

Commit 9736d2f1 authored by Andrei Danaila's avatar Andrei Danaila Committed by Matt Wagantall
Browse files

msm: mhi: Stale doorebell in MHI Host



A timing window exists where M3 state transition is pending and
the doorbell does not get written out. The M3 process is then
cancelled, and no M0 event takes place to flush the doorbell out.

Remove setting the pending M3 flag until the transition is no
longer cancelable.

CRs-Fixed: 733632
Change-Id: I3b4dfe23d0ea4af69d2810a171c61dc60a6c2f8d
Signed-off-by: default avatarAndrei Danaila <adanaila@codeaurora.org>
parent 4ee8ae19
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -970,7 +970,6 @@ int mhi_initiate_m3(struct mhi_device_ctxt *mhi_dev_ctxt)
		mhi_log(MHI_MSG_INFO,
			"Triggering wake out of M2\n");
		write_lock_irqsave(&mhi_dev_ctxt->xfer_lock, flags);
		mhi_dev_ctxt->flags.pending_M3 = 1;
		mhi_assert_device_wake(mhi_dev_ctxt);
		write_unlock_irqrestore(&mhi_dev_ctxt->xfer_lock, flags);
		r = wait_event_interruptible_timeout(*mhi_dev_ctxt->M0_event,