From bf693df5a081b711b2049ba52c6bec866b74ca35 Mon Sep 17 00:00:00 2001 From: Bhaumik Bhatt Date: Mon, 19 Apr 2021 13:08:42 -0700 Subject: [PATCH] bus: mhi: host: Log data and control events for debug Certain log messages will help improve the debug experience when attempting to solve issues related to tracking data or control packets in MHI. Add logs to improve this aspect. Change-Id: Ic8608d68e37436b23e7c2364cb9e38db22c3844f Signed-off-by: Bhaumik Bhatt Signed-off-by: Lazarus Motha --- drivers/bus/mhi/host/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c index 9e127a060dac..c5172a68db5d 100644 --- a/drivers/bus/mhi/host/main.c +++ b/drivers/bus/mhi/host/main.c @@ -869,6 +869,9 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl, while (dev_rp != local_rp) { enum mhi_pkt_type type = MHI_TRE_GET_EV_TYPE(local_rp); + dev_dbg(dev, "Processing Event:0x%llx 0x%08x 0x%08x\n", + local_rp->ptr, local_rp->dword[0], local_rp->dword[1]); + switch (type) { case MHI_PKT_TYPE_BW_REQ_EVENT: { @@ -1013,6 +1016,7 @@ int mhi_process_data_event_ring(struct mhi_controller *mhi_cntrl, struct mhi_ring *ev_ring = &mhi_event->ring; struct mhi_event_ctxt *er_ctxt = &mhi_cntrl->mhi_ctxt->er_ctxt[mhi_event->er_index]; + struct device *dev = &mhi_cntrl->mhi_dev->dev; int count = 0; u32 chan; struct mhi_chan *mhi_chan; @@ -1033,6 +1037,9 @@ int mhi_process_data_event_ring(struct mhi_controller *mhi_cntrl, while (dev_rp != local_rp && event_quota > 0) { enum mhi_pkt_type type = MHI_TRE_GET_EV_TYPE(local_rp); + dev_dbg(dev, "Processing Event:0x%llx 0x%08x 0x%08x\n", + local_rp->ptr, local_rp->dword[0], local_rp->dword[1]); + chan = MHI_TRE_GET_EV_CHID(local_rp); WARN_ON(chan >= mhi_cntrl->max_chan);