]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/dwc3/trace.h
Merge tag 'edac_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
[karo-tx-linux.git] / drivers / usb / dwc3 / trace.h
index 2389dd864ffb3840d148ae8f45c1bd504fa951bf..d24cefd191b558e8452beab674130b7ff49b893d 100644 (file)
@@ -86,21 +86,21 @@ DECLARE_EVENT_CLASS(dwc3_log_ctrl,
        TP_STRUCT__entry(
                __field(__u8, bRequestType)
                __field(__u8, bRequest)
-               __field(__le16, wValue)
-               __field(__le16, wIndex)
-               __field(__le16, wLength)
+               __field(__u16, wValue)
+               __field(__u16, wIndex)
+               __field(__u16, wLength)
        ),
        TP_fast_assign(
                __entry->bRequestType = ctrl->bRequestType;
                __entry->bRequest = ctrl->bRequest;
-               __entry->wValue = ctrl->wValue;
-               __entry->wIndex = ctrl->wIndex;
-               __entry->wLength = ctrl->wLength;
+               __entry->wValue = le16_to_cpu(ctrl->wValue);
+               __entry->wIndex = le16_to_cpu(ctrl->wIndex);
+               __entry->wLength = le16_to_cpu(ctrl->wLength);
        ),
        TP_printk("bRequestType %02x bRequest %02x wValue %04x wIndex %04x wLength %d",
                __entry->bRequestType, __entry->bRequest,
-               le16_to_cpu(__entry->wValue), le16_to_cpu(__entry->wIndex),
-               le16_to_cpu(__entry->wLength)
+               __entry->wValue, __entry->wIndex,
+               __entry->wLength
        )
 );
 
@@ -167,37 +167,41 @@ DEFINE_EVENT(dwc3_log_request, dwc3_gadget_giveback,
 );
 
 DECLARE_EVENT_CLASS(dwc3_log_generic_cmd,
-       TP_PROTO(unsigned int cmd, u32 param),
-       TP_ARGS(cmd, param),
+       TP_PROTO(unsigned int cmd, u32 param, int status),
+       TP_ARGS(cmd, param, status),
        TP_STRUCT__entry(
                __field(unsigned int, cmd)
                __field(u32, param)
+               __field(int, status)
        ),
        TP_fast_assign(
                __entry->cmd = cmd;
                __entry->param = param;
+               __entry->status = status;
        ),
-       TP_printk("cmd '%s' [%d] param %08x",
+       TP_printk("cmd '%s' [%d] param %08x --> status: %s",
                dwc3_gadget_generic_cmd_string(__entry->cmd),
-               __entry->cmd, __entry->param
+               __entry->cmd, __entry->param,
+               dwc3_gadget_generic_cmd_status_string(__entry->status)
        )
 );
 
 DEFINE_EVENT(dwc3_log_generic_cmd, dwc3_gadget_generic_cmd,
-       TP_PROTO(unsigned int cmd, u32 param),
-       TP_ARGS(cmd, param)
+       TP_PROTO(unsigned int cmd, u32 param, int status),
+       TP_ARGS(cmd, param, status)
 );
 
 DECLARE_EVENT_CLASS(dwc3_log_gadget_ep_cmd,
        TP_PROTO(struct dwc3_ep *dep, unsigned int cmd,
-               struct dwc3_gadget_ep_cmd_params *params),
-       TP_ARGS(dep, cmd, params),
+               struct dwc3_gadget_ep_cmd_params *params, int cmd_status),
+       TP_ARGS(dep, cmd, params, cmd_status),
        TP_STRUCT__entry(
                __dynamic_array(char, name, DWC3_MSG_MAX)
                __field(unsigned int, cmd)
                __field(u32, param0)
                __field(u32, param1)
                __field(u32, param2)
+               __field(int, cmd_status)
        ),
        TP_fast_assign(
                snprintf(__get_str(name), DWC3_MSG_MAX, "%s", dep->name);
@@ -205,18 +209,20 @@ DECLARE_EVENT_CLASS(dwc3_log_gadget_ep_cmd,
                __entry->param0 = params->param0;
                __entry->param1 = params->param1;
                __entry->param2 = params->param2;
+               __entry->cmd_status = cmd_status;
        ),
-       TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x",
+       TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x --> status: %s",
                __get_str(name), dwc3_gadget_ep_cmd_string(__entry->cmd),
                __entry->cmd, __entry->param0,
-               __entry->param1, __entry->param2
+               __entry->param1, __entry->param2,
+               dwc3_ep_cmd_status_string(__entry->cmd_status)
        )
 );
 
 DEFINE_EVENT(dwc3_log_gadget_ep_cmd, dwc3_gadget_ep_cmd,
        TP_PROTO(struct dwc3_ep *dep, unsigned int cmd,
-               struct dwc3_gadget_ep_cmd_params *params),
-       TP_ARGS(dep, cmd, params)
+               struct dwc3_gadget_ep_cmd_params *params, int cmd_status),
+       TP_ARGS(dep, cmd, params, cmd_status)
 );
 
 DECLARE_EVENT_CLASS(dwc3_log_trb,
@@ -225,6 +231,8 @@ DECLARE_EVENT_CLASS(dwc3_log_trb,
        TP_STRUCT__entry(
                __dynamic_array(char, name, DWC3_MSG_MAX)
                __field(struct dwc3_trb *, trb)
+               __field(u32, allocated)
+               __field(u32, queued)
                __field(u32, bpl)
                __field(u32, bph)
                __field(u32, size)
@@ -233,13 +241,16 @@ DECLARE_EVENT_CLASS(dwc3_log_trb,
        TP_fast_assign(
                snprintf(__get_str(name), DWC3_MSG_MAX, "%s", dep->name);
                __entry->trb = trb;
+               __entry->allocated = dep->allocated_requests;
+               __entry->queued = dep->queued_requests;
                __entry->bpl = trb->bpl;
                __entry->bph = trb->bph;
                __entry->size = trb->size;
                __entry->ctrl = trb->ctrl;
        ),
-       TP_printk("%s: trb %p buf %08x%08x size %d ctrl %08x (%c%c%c%c:%c%c:%s)",
-               __get_str(name), __entry->trb, __entry->bph, __entry->bpl,
+       TP_printk("%s: %d/%d trb %p buf %08x%08x size %d ctrl %08x (%c%c%c%c:%c%c:%s)",
+               __get_str(name), __entry->queued, __entry->allocated,
+               __entry->trb, __entry->bph, __entry->bpl,
                __entry->size, __entry->ctrl,
                __entry->ctrl & DWC3_TRB_CTRL_HWO ? 'H' : 'h',
                __entry->ctrl & DWC3_TRB_CTRL_LST ? 'L' : 'l',