mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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: Hemant Kumar <[email protected]>
This commit is contained in:
parent
96cd181257
commit
c427eba1c5
1 changed files with 6 additions and 1 deletions
|
|
@ -1047,7 +1047,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\n");
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue