aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/xhci-mem.c4
-rw-r--r--drivers/usb/host/xhci-trace.h36
2 files changed, 33 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index acbd3d7b8828..8a62eee9eee1 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -886,12 +886,12 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
886 886
887 dev = xhci->devs[slot_id]; 887 dev = xhci->devs[slot_id];
888 888
889 trace_xhci_free_virt_device(dev);
890
891 xhci->dcbaa->dev_context_ptrs[slot_id] = 0; 889 xhci->dcbaa->dev_context_ptrs[slot_id] = 0;
892 if (!dev) 890 if (!dev)
893 return; 891 return;
894 892
893 trace_xhci_free_virt_device(dev);
894
895 if (dev->tt_info) 895 if (dev->tt_info)
896 old_active_eps = dev->tt_info->active_eps; 896 old_active_eps = dev->tt_info->active_eps;
897 897
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index 410544ffe78f..88b427434bd8 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -171,6 +171,37 @@ DEFINE_EVENT(xhci_log_trb, xhci_dbc_gadget_ep_queue,
171 TP_ARGS(ring, trb) 171 TP_ARGS(ring, trb)
172); 172);
173 173
174DECLARE_EVENT_CLASS(xhci_log_free_virt_dev,
175 TP_PROTO(struct xhci_virt_device *vdev),
176 TP_ARGS(vdev),
177 TP_STRUCT__entry(
178 __field(void *, vdev)
179 __field(unsigned long long, out_ctx)
180 __field(unsigned long long, in_ctx)
181 __field(u8, fake_port)
182 __field(u8, real_port)
183 __field(u16, current_mel)
184
185 ),
186 TP_fast_assign(
187 __entry->vdev = vdev;
188 __entry->in_ctx = (unsigned long long) vdev->in_ctx->dma;
189 __entry->out_ctx = (unsigned long long) vdev->out_ctx->dma;
190 __entry->fake_port = (u8) vdev->fake_port;
191 __entry->real_port = (u8) vdev->real_port;
192 __entry->current_mel = (u16) vdev->current_mel;
193 ),
194 TP_printk("vdev %p ctx %llx | %llx fake_port %d real_port %d current_mel %d",
195 __entry->vdev, __entry->in_ctx, __entry->out_ctx,
196 __entry->fake_port, __entry->real_port, __entry->current_mel
197 )
198);
199
200DEFINE_EVENT(xhci_log_free_virt_dev, xhci_free_virt_device,
201 TP_PROTO(struct xhci_virt_device *vdev),
202 TP_ARGS(vdev)
203);
204
174DECLARE_EVENT_CLASS(xhci_log_virt_dev, 205DECLARE_EVENT_CLASS(xhci_log_virt_dev,
175 TP_PROTO(struct xhci_virt_device *vdev), 206 TP_PROTO(struct xhci_virt_device *vdev),
176 TP_ARGS(vdev), 207 TP_ARGS(vdev),
@@ -208,11 +239,6 @@ DEFINE_EVENT(xhci_log_virt_dev, xhci_alloc_virt_device,
208 TP_ARGS(vdev) 239 TP_ARGS(vdev)
209); 240);
210 241
211DEFINE_EVENT(xhci_log_virt_dev, xhci_free_virt_device,
212 TP_PROTO(struct xhci_virt_device *vdev),
213 TP_ARGS(vdev)
214);
215
216DEFINE_EVENT(xhci_log_virt_dev, xhci_setup_device, 242DEFINE_EVENT(xhci_log_virt_dev, xhci_setup_device,
217 TP_PROTO(struct xhci_virt_device *vdev), 243 TP_PROTO(struct xhci_virt_device *vdev),
218 TP_ARGS(vdev) 244 TP_ARGS(vdev)