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

Commit 6063f4e4 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

mhi: core: Cache last processed event ring element



This helps to debug event ring processing related issue
where IPC verbose log is disabled.

Change-Id: Idca11f6e2ec8143a6f5bd877a2f04a81ddd3ba5b
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 2f31fbf5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -665,6 +665,8 @@ struct mhi_event {
			     struct mhi_event *mhi_event,
			     u32 event_quota);
	struct mhi_controller *mhi_cntrl;
	struct mhi_tre last_cached_tre;
	u64 last_dev_rp;
};

struct mhi_chan {
+5 −0
Original line number Diff line number Diff line
@@ -1415,6 +1415,11 @@ int mhi_process_data_event_ring(struct mhi_controller *mhi_cntrl,
		MHI_VERB("Processing Event:0x%llx 0x%08x 0x%08x\n",
			local_rp->ptr, local_rp->dword[0], local_rp->dword[1]);

		mhi_event->last_cached_tre.ptr = local_rp->ptr;
		mhi_event->last_cached_tre.dword[0] = local_rp->dword[0];
		mhi_event->last_cached_tre.dword[1] = local_rp->dword[1];
		mhi_event->last_dev_rp = (u64)dev_rp;

		chan = MHI_TRE_GET_EV_CHID(local_rp);
		mhi_chan = &mhi_cntrl->mhi_chan[chan];