diff options
author | Xenia Ragiadakou <burzalodowa@gmail.com> | 2013-08-13 23:33:56 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2013-08-14 00:14:44 -0400 |
commit | 68ffb01111500c769ceac055bdc2fb000322b2d7 (patch) | |
tree | afe977ee95fc2cdf0248ffbe1722336a2ce3d398 | |
parent | d195fcffe4c82cc813cc43df5f27ab99ab38bc07 (diff) |
xhci: trace debug statements related to ring expansion
This patch defines a new trace event, which is called xhci_dbg_ring_expansion
and belongs to the event class xhci_log_msg, and adds tracepoints that trace
the debug messages associated with the expansion of endpoint ring when there
is not enough space allocated to hold all pending TRBs.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci-trace.h | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index ef27470b99e3..b150360d1e78 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -348,7 +348,8 @@ int xhci_ring_expansion(struct xhci_hcd *xhci, struct xhci_ring *ring, | |||
348 | return -ENOMEM; | 348 | return -ENOMEM; |
349 | 349 | ||
350 | xhci_link_rings(xhci, ring, first, last, num_segs); | 350 | xhci_link_rings(xhci, ring, first, last, num_segs); |
351 | xhci_dbg(xhci, "ring expansion succeed, now has %d segments\n", | 351 | xhci_dbg_trace(xhci, trace_xhci_dbg_ring_expansion, |
352 | "ring expansion succeed, now has %d segments", | ||
352 | ring->num_segs); | 353 | ring->num_segs); |
353 | 354 | ||
354 | return 0; | 355 | return 0; |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index f908e205f7d5..7b35af167e55 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -2904,8 +2904,8 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, | |||
2904 | return -ENOMEM; | 2904 | return -ENOMEM; |
2905 | } | 2905 | } |
2906 | 2906 | ||
2907 | xhci_dbg(xhci, "ERROR no room on ep ring, " | 2907 | xhci_dbg_trace(xhci, trace_xhci_dbg_ring_expansion, |
2908 | "try ring expansion\n"); | 2908 | "ERROR no room on ep ring, try ring expansion"); |
2909 | num_trbs_needed = num_trbs - ep_ring->num_trbs_free; | 2909 | num_trbs_needed = num_trbs - ep_ring->num_trbs_free; |
2910 | if (xhci_ring_expansion(xhci, ep_ring, num_trbs_needed, | 2910 | if (xhci_ring_expansion(xhci, ep_ring, num_trbs_needed, |
2911 | mem_flags)) { | 2911 | mem_flags)) { |
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h index 11025fe6ebba..20364cc8d2fb 100644 --- a/drivers/usb/host/xhci-trace.h +++ b/drivers/usb/host/xhci-trace.h | |||
@@ -62,6 +62,11 @@ DEFINE_EVENT(xhci_log_msg, xhci_dbg_init, | |||
62 | TP_ARGS(vaf) | 62 | TP_ARGS(vaf) |
63 | ); | 63 | ); |
64 | 64 | ||
65 | DEFINE_EVENT(xhci_log_msg, xhci_dbg_ring_expansion, | ||
66 | TP_PROTO(struct va_format *vaf), | ||
67 | TP_ARGS(vaf) | ||
68 | ); | ||
69 | |||
65 | DECLARE_EVENT_CLASS(xhci_log_ctx, | 70 | DECLARE_EVENT_CLASS(xhci_log_ctx, |
66 | TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, | 71 | TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, |
67 | unsigned int ep_num), | 72 | unsigned int ep_num), |