diff options
author | Bin Liu <b-liu@ti.com> | 2016-06-30 19:12:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-17 01:23:57 +0200 |
commit | 19ca682e03fbf0349e6c6ef76c786136176d3ca6 (patch) | |
tree | c069f92d63ba128a2611dc13ed0a0e250e87cfea /drivers/usb/musb/musb_trace.h | |
parent | usb: musb: add tracepoints to dump interrupt events (diff) | |
download | linux-19ca682e03fbf0349e6c6ef76c786136176d3ca6.tar.xz linux-19ca682e03fbf0349e6c6ef76c786136176d3ca6.zip |
usb: musb: host: add urb tracepoints
Add urb tracepoints for host mode.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_trace.h')
-rw-r--r-- | drivers/usb/musb/musb_trace.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_trace.h b/drivers/usb/musb/musb_trace.h index 98acc1e0a7a0..39258f6fdde8 100644 --- a/drivers/usb/musb/musb_trace.h +++ b/drivers/usb/musb/musb_trace.h @@ -23,6 +23,7 @@ #include <linux/types.h> #include <linux/tracepoint.h> +#include <linux/usb.h> #include "musb_core.h" #define MUSB_MSG_MAX 500 @@ -149,6 +150,68 @@ TRACE_EVENT(musb_isr, ) ); +DECLARE_EVENT_CLASS(musb_urb, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb), + TP_STRUCT__entry( + __string(name, dev_name(musb->controller)) + __field(struct urb *, urb) + __field(unsigned int, pipe) + __field(int, status) + __field(unsigned int, flag) + __field(u32, buf_len) + __field(u32, actual_len) + ), + TP_fast_assign( + __assign_str(name, dev_name(musb->controller)); + __entry->urb = urb; + __entry->pipe = urb->pipe; + __entry->status = urb->status; + __entry->flag = urb->transfer_flags; + __entry->buf_len = urb->transfer_buffer_length; + __entry->actual_len = urb->actual_length; + ), + TP_printk("%s: %p, dev%d ep%d%s, flag 0x%x, len %d/%d, status %d", + __get_str(name), __entry->urb, + usb_pipedevice(__entry->pipe), + usb_pipeendpoint(__entry->pipe), + usb_pipein(__entry->pipe) ? "in" : "out", + __entry->flag, + __entry->actual_len, __entry->buf_len, + __entry->status + ) +); + +DEFINE_EVENT(musb_urb, musb_urb_start, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb) +); + +DEFINE_EVENT(musb_urb, musb_urb_gb, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb) +); + +DEFINE_EVENT(musb_urb, musb_urb_rx, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb) +); + +DEFINE_EVENT(musb_urb, musb_urb_tx, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb) +); + +DEFINE_EVENT(musb_urb, musb_urb_enq, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb) +); + +DEFINE_EVENT(musb_urb, musb_urb_deq, + TP_PROTO(struct musb *musb, struct urb *urb), + TP_ARGS(musb, urb) +); + #endif /* __MUSB_TRACE_H */ /* this part has to be here */ |