]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: dwc3: debug: decode uFrame from event too
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 11 Apr 2018 07:31:53 +0000 (10:31 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:00:59 +0000 (10:00 +0300)
XferNotReady and XferInProgress give us the uFrame number we're
currently in. Printing that out on tracepoints may help us find bugs
in transfer scheduling.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/debug.h

index 0be6a554be5765107bdabf2fb5e3f1471e07bc72..c66d216dcc3041ddecc2e7af10301ce188fc030c 100644 (file)
@@ -493,14 +493,18 @@ dwc3_ep_event_string(char *str, const struct dwc3_event_depevt *event,
        case DWC3_DEPEVT_XFERINPROGRESS:
                len = strlen(str);
 
-               sprintf(str + len, "Transfer In Progress (%c%c%c)",
+               sprintf(str + len, "Transfer In Progress [%d] (%c%c%c)",
+                               event->parameters,
                                status & DEPEVT_STATUS_SHORT ? 'S' : 's',
                                status & DEPEVT_STATUS_IOC ? 'I' : 'i',
                                status & DEPEVT_STATUS_LST ? 'M' : 'm');
                break;
        case DWC3_DEPEVT_XFERNOTREADY:
-               strcat(str, "Transfer Not Ready");
-               strcat(str, status & DEPEVT_STATUS_TRANSFER_ACTIVE ?
+               len = strlen(str);
+
+               sprintf(str + len, "Transfer Not Ready [%d]%s",
+                               event->parameters,
+                               status & DEPEVT_STATUS_TRANSFER_ACTIVE ?
                                " (Active)" : " (Not Active)");
 
                /* Control Endpoints */