Commit 5afa0a5e authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman

usb: xhci: add endpoint context tracing when an endpoint is added

The configure endpoint command configures all the endpoints that were
flagged to be added or dropped.

To know the content of each of the added endpoints we need to add tracing
to the .add_endpoint() callback, just after initializing all the context
values.
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 90d6d573
...@@ -366,6 +366,11 @@ DEFINE_EVENT(xhci_log_ep_ctx, xhci_handle_cmd_config_ep, ...@@ -366,6 +366,11 @@ DEFINE_EVENT(xhci_log_ep_ctx, xhci_handle_cmd_config_ep,
TP_ARGS(ctx) TP_ARGS(ctx)
); );
DEFINE_EVENT(xhci_log_ep_ctx, xhci_add_endpoint,
TP_PROTO(struct xhci_ep_ctx *ctx),
TP_ARGS(ctx)
);
DECLARE_EVENT_CLASS(xhci_log_slot_ctx, DECLARE_EVENT_CLASS(xhci_log_slot_ctx,
TP_PROTO(struct xhci_slot_ctx *ctx), TP_PROTO(struct xhci_slot_ctx *ctx),
TP_ARGS(ctx), TP_ARGS(ctx),
......
...@@ -1807,6 +1807,7 @@ static int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, ...@@ -1807,6 +1807,7 @@ static int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
struct xhci_container_ctx *in_ctx; struct xhci_container_ctx *in_ctx;
unsigned int ep_index; unsigned int ep_index;
struct xhci_input_control_ctx *ctrl_ctx; struct xhci_input_control_ctx *ctrl_ctx;
struct xhci_ep_ctx *ep_ctx;
u32 added_ctxs; u32 added_ctxs;
u32 new_add_flags, new_drop_flags; u32 new_add_flags, new_drop_flags;
struct xhci_virt_device *virt_dev; struct xhci_virt_device *virt_dev;
...@@ -1897,6 +1898,9 @@ static int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, ...@@ -1897,6 +1898,9 @@ static int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
/* Store the usb_device pointer for later use */ /* Store the usb_device pointer for later use */
ep->hcpriv = udev; ep->hcpriv = udev;
ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
trace_xhci_add_endpoint(ep_ctx);
xhci_debugfs_create_endpoint(xhci, virt_dev, ep_index); xhci_debugfs_create_endpoint(xhci, virt_dev, ep_index);
xhci_dbg(xhci, "add ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n", xhci_dbg(xhci, "add ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment