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

Commit 3bd550d0 authored by Felipe Balbi's avatar Felipe Balbi Committed by Mayank Rana
Browse files

usb: dwc3: trace: print enqueue/dequeue pointers too



By printing enqueue/dequeue pointers, we can make sure that our TRB
handling is correct. We've had a recent situation where we were not
always dequeueing all TRBs in an SG list and this helped figure out
what the problem was.

Change-Id: Ied1c5d57b4f324c40dd219153b49a1e244b6773c
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
Git-commit: 30ad6273adad76017ddad737d45f8931cac554ad
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent f0b846ce
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -227,6 +227,8 @@ DECLARE_EVENT_CLASS(dwc3_log_trb,
		__field(u32, size)
		__field(u32, ctrl)
		__field(u32, type)
		__field(u32, enqueue)
		__field(u32, dequeue)
	),
	TP_fast_assign(
		__assign_str(name, dep->name);
@@ -236,9 +238,12 @@ DECLARE_EVENT_CLASS(dwc3_log_trb,
		__entry->size = trb->size;
		__entry->ctrl = trb->ctrl;
		__entry->type = usb_endpoint_type(dep->endpoint.desc);
		__entry->enqueue = dep->trb_enqueue;
		__entry->dequeue = dep->trb_dequeue;
	),
	TP_printk("%s: trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
		__get_str(name), __entry->trb, __entry->bph, __entry->bpl,
	TP_printk("%s: trb %p (E%d:D%d) buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
		__get_str(name), __entry->trb, __entry->enqueue,
		__entry->dequeue, __entry->bph, __entry->bpl,
		({char *s;
		int pcm = ((__entry->size >> 24) & 3) + 1;
		switch (__entry->type) {