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

Commit ed016bce authored by Hemant Kumar's avatar Hemant Kumar
Browse files

mhi: core: Dump more logs when invalid cookie is received



Dump event ring element, cookie value and bug_ring length
when invalid cookie is received.

Change-Id: I831f10f6e894326b17cb3a405b498cae8111b11d
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent f94ba33e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1078,7 +1078,12 @@ static int parse_rsc_event(struct mhi_controller *mhi_cntrl,
	xfer_len = MHI_TRE_GET_EV_LEN(event);

	/* received out of bound cookie */
	MHI_ASSERT(cookie >= buf_ring->len, "Invalid Cookie 0x%08x\n", cookie);
	if (cookie >= buf_ring->len) {
		MHI_ERR("cookie 0x%08x bufring_len %zu", cookie, buf_ring->len);
		MHI_ERR("Processing Event:0x%llx 0x%08x 0x%08x\n",
			event->ptr, event->dword[0], event->dword[1]);
		panic("invalid cookie");
	}

	buf_info = buf_ring->base + cookie;