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

Commit 50a54c9e authored by Bhaumik Bhatt's avatar Bhaumik Bhatt
Browse files

mhi: core: Move to error state as soon as RDDM is detected



To reduce the chances of a race where error conditions may end
up being missed, move MHI to an error detected state before
issuing the RDDM entry callback to the controller.

Change-Id: I1f52a87eb35ba944406ec226be6712f0d186ca11
Signed-off-by: default avatarBhaumik Bhatt <bbhatt@codeaurora.org>
parent 0ea391ba
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1660,13 +1660,14 @@ irqreturn_t mhi_intvec_threaded_handlr(int irq_number, void *dev)
		write_unlock_irq(&mhi_cntrl->pm_lock);

		MHI_ERR("RDDM event occurred!\n");
		mhi_cntrl->status_cb(mhi_cntrl, mhi_cntrl->priv_data,
				     MHI_CB_EE_RDDM);
		wake_up_all(&mhi_cntrl->state_event);

		/* notify critical clients with early notifications */
		mhi_control_error(mhi_cntrl);

		mhi_cntrl->status_cb(mhi_cntrl, mhi_cntrl->priv_data,
				     MHI_CB_EE_RDDM);
		wake_up_all(&mhi_cntrl->state_event);

		goto exit_intvec;
	}