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

Commit 85891835 authored by Elson Roy Serrao's avatar Elson Roy Serrao Committed by Sriharsha Allenki
Browse files

usb: dwc3: Add logging for ep0 map/unmap requests



Log the ep0 dma map/unmap request  in the IPC log buffer
for debugging SMMU faults.

Logs can be accessed using below command
cat /sys/kernel/debug/ipc_logging/a600000.dwc3.ep_events/log.

Change-Id: If5587b8ba59451593968999b59cd61f2a469fe1c
Signed-off-by: default avatarElson Roy Serrao <eserrao@codeaurora.org>
parent ceb47a0e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -139,9 +139,6 @@ void dwc3_dbg_print_reg(struct dwc3 *dwc, const char *name, int reg)

void dwc3_dbg_dma_unmap(struct dwc3 *dwc, u8 ep_num, struct dwc3_request *req)
{
	if (ep_num < 2)
		return;

	ipc_log_string(dwc->dwc_dma_ipc_log_ctxt,
		"%02X-%-3.3s %-25.25s 0x%pK 0x%lx %u 0x%lx %d", ep_num >> 1,
		ep_num & 1 ? "IN":"OUT", "UNMAP", &req->request,
@@ -151,9 +148,6 @@ void dwc3_dbg_dma_unmap(struct dwc3 *dwc, u8 ep_num, struct dwc3_request *req)

void dwc3_dbg_dma_map(struct dwc3 *dwc, u8 ep_num, struct dwc3_request *req)
{
	if (ep_num < 2)
		return;

	ipc_log_string(dwc->dwc_dma_ipc_log_ctxt,
		"%02X-%-3.3s %-25.25s 0x%pK 0x%lx %u 0x%lx", ep_num >> 1,
		ep_num & 1 ? "IN":"OUT", "MAP", &req->request, req->request.dma,
+4 −0
Original line number Diff line number Diff line
@@ -1054,6 +1054,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
		maxpacket = dep->endpoint.maxpacket;
		rem = req->request.length % maxpacket;
		dwc->ep0_bounced = true;
		dbg_ep_map(dep->number, req);

		/* prepare normal TRB */
		dwc3_ep0_prepare_one_trb(dep, req->request.dma,
@@ -1077,6 +1078,8 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
		if (ret)
			return;

		dbg_ep_map(dep->number, req);

		/* prepare normal TRB */
		dwc3_ep0_prepare_one_trb(dep, req->request.dma,
					 req->request.length,
@@ -1096,6 +1099,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
		if (ret)
			return;

		dbg_ep_map(dep->number, req);
		dwc3_ep0_prepare_one_trb(dep, req->request.dma,
				req->request.length, DWC3_TRBCTL_CONTROL_DATA,
				false);