>From d085fb5b9630e935d7954fe5947b48402e43bdc1 Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Tue, 7 Jan 2014 12:39:47 -0800 Subject: [PATCH] More debugging. Signed-off-by: Sarah Sharp --- drivers/usb/host/xhci-ring.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 2afaf15009e8..228ab8cf868e 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -993,6 +993,9 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) for (i = 0; i < MAX_HC_SLOTS; i++) { if (!xhci->devs[i]) continue; + + xhci_dbg(xhci, "Slot %d output context\n", i); + xhci_dbg_ctx(xhci, xhci->devs[i]->out_ctx, 30); for (j = 0; j < 31; j++) { temp_ep = &xhci->devs[i]->eps[j]; ring = temp_ep->ring; @@ -1001,6 +1004,10 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, "Killing URBs for slot ID %u, " "ep index %u", i, j); + xhci_dbg(xhci, "Dev %i Ep 0x%x:\n", i, + xhci_get_endpoint_address(j)); + xhci_debug_ring(xhci, ring); + xhci_dbg_ring_ptrs(xhci, ring); while (!list_empty(&ring->td_list)) { cur_td = list_first_entry(&ring->td_list, struct xhci_td, @@ -1011,12 +1018,6 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) xhci_giveback_urb_in_irq(xhci, cur_td, -ESHUTDOWN, "killed"); } - if (!list_empty(&temp_ep->cancelled_td_list)) { - xhci_dbg(xhci, "Dev %i Ep 0x%x:\n", i, - xhci_get_endpoint_address(j)); - xhci_debug_ring(xhci, ring); - xhci_dbg_ring_ptrs(xhci, ring); - } while (!list_empty(&temp_ep->cancelled_td_list)) { cur_td = list_first_entry( &temp_ep->cancelled_td_list, @@ -2980,10 +2981,10 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, num_trbs, TRBS_PER_SEGMENT - 1); return -EINVAL; } - xhci_dbg(xhci, "Insert no-op TRBs at 0x%llx\n", - (unsigned long long) + xhci_dbg(xhci, "Insert %i no-op TRBs from 0x%llx for TD with %i TRBs\n", + usable, (unsigned long long) xhci_trb_virt_to_dma(ep_ring->enq_seg, - ep_ring->enqueue)); + ep_ring->enqueue), num_trbs); nop_cmd = cpu_to_le32(TRB_TYPE(TRB_TR_NOOP) | ep_ring->cycle_state); -- 1.8.3.3