diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-12-19 19:56:04 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-12-22 19:12:42 -0500 |
commit | 79688acfb5e124fcf586add00af32a2a1a532c64 (patch) | |
tree | 404ae896ab4dfefc16a1bc802da0108cc7ee0496 /drivers/usb | |
parent | 1ba6108f5fc02f04784e7206ed08d10805035507 (diff) |
xhci: Be less verbose during URB cancellation.
With devices that can need up to 128 segments (with 64 TRBs per
segment), we can't afford to print out the entire endpoint ring every
time an URB is canceled. Instead, print the offset of the TRB, along
with device pathname and endpoint number.
Only print DMA addresses, since virtual addresses of internal structures
are not useful. Change the cancellation code to be more clear about
what steps of the cancellation it is in the process of doing (queueing
the request, handling the stop endpoint command, turning the TDs into
no-ops, or moving the dequeue pointers).
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 15 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 19 |
2 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 1fdb7e1cca3f..f34a268c6ccd 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -552,12 +552,9 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, | |||
552 | cpu_to_le32(TRB_CYCLE); | 552 | cpu_to_le32(TRB_CYCLE); |
553 | cur_trb->generic.field[3] |= cpu_to_le32( | 553 | cur_trb->generic.field[3] |= cpu_to_le32( |
554 | TRB_TYPE(TRB_TR_NOOP)); | 554 | TRB_TYPE(TRB_TR_NOOP)); |
555 | xhci_dbg(xhci, "Cancel TRB %p (0x%llx dma) " | 555 | xhci_dbg(xhci, "TRB to noop at offset 0x%llx\n", |
556 | "in seg %p (0x%llx dma)\n", | 556 | (unsigned long long) |
557 | cur_trb, | 557 | xhci_trb_virt_to_dma(cur_seg, cur_trb)); |
558 | (unsigned long long)xhci_trb_virt_to_dma(cur_seg, cur_trb), | ||
559 | cur_seg, | ||
560 | (unsigned long long)cur_seg->dma); | ||
561 | } | 558 | } |
562 | if (cur_trb == cur_td->last_trb) | 559 | if (cur_trb == cur_td->last_trb) |
563 | break; | 560 | break; |
@@ -697,9 +694,9 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci, | |||
697 | */ | 694 | */ |
698 | list_for_each(entry, &ep->cancelled_td_list) { | 695 | list_for_each(entry, &ep->cancelled_td_list) { |
699 | cur_td = list_entry(entry, struct xhci_td, cancelled_td_list); | 696 | cur_td = list_entry(entry, struct xhci_td, cancelled_td_list); |
700 | xhci_dbg(xhci, "Cancelling TD starting at %p, 0x%llx (dma).\n", | 697 | xhci_dbg(xhci, "Removing canceled TD starting at 0x%llx (dma).\n", |
701 | cur_td->first_trb, | 698 | (unsigned long long)xhci_trb_virt_to_dma( |
702 | (unsigned long long)xhci_trb_virt_to_dma(cur_td->start_seg, cur_td->first_trb)); | 699 | cur_td->start_seg, cur_td->first_trb)); |
703 | ep_ring = xhci_urb_to_transfer_ring(xhci, cur_td->urb); | 700 | ep_ring = xhci_urb_to_transfer_ring(xhci, cur_td->urb); |
704 | if (!ep_ring) { | 701 | if (!ep_ring) { |
705 | /* This shouldn't happen unless a driver is mucking | 702 | /* This shouldn't happen unless a driver is mucking |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 0968b856ef0a..f3d0b8d96440 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -1333,9 +1333,6 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
1333 | goto done; | 1333 | goto done; |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | xhci_dbg(xhci, "Cancel URB %p\n", urb); | ||
1337 | xhci_dbg(xhci, "Event ring:\n"); | ||
1338 | xhci_debug_ring(xhci, xhci->event_ring); | ||
1339 | ep_index = xhci_get_endpoint_index(&urb->ep->desc); | 1336 | ep_index = xhci_get_endpoint_index(&urb->ep->desc); |
1340 | ep = &xhci->devs[urb->dev->slot_id]->eps[ep_index]; | 1337 | ep = &xhci->devs[urb->dev->slot_id]->eps[ep_index]; |
1341 | ep_ring = xhci_urb_to_transfer_ring(xhci, urb); | 1338 | ep_ring = xhci_urb_to_transfer_ring(xhci, urb); |
@@ -1344,12 +1341,18 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
1344 | goto done; | 1341 | goto done; |
1345 | } | 1342 | } |
1346 | 1343 | ||
1347 | xhci_dbg(xhci, "Endpoint ring:\n"); | ||
1348 | xhci_debug_ring(xhci, ep_ring); | ||
1349 | |||
1350 | urb_priv = urb->hcpriv; | 1344 | urb_priv = urb->hcpriv; |
1351 | 1345 | i = urb_priv->td_cnt; | |
1352 | for (i = urb_priv->td_cnt; i < urb_priv->length; i++) { | 1346 | if (i < urb_priv->length) |
1347 | xhci_dbg(xhci, "Cancel URB %p, dev %s, ep 0x%x, " | ||
1348 | "starting at offset 0x%llx\n", | ||
1349 | urb, urb->dev->devpath, | ||
1350 | urb->ep->desc.bEndpointAddress, | ||
1351 | (unsigned long long) xhci_trb_virt_to_dma( | ||
1352 | urb_priv->td[i]->start_seg, | ||
1353 | urb_priv->td[i]->first_trb)); | ||
1354 | |||
1355 | for (; i < urb_priv->length; i++) { | ||
1353 | td = urb_priv->td[i]; | 1356 | td = urb_priv->td[i]; |
1354 | list_add_tail(&td->cancelled_td_list, &ep->cancelled_td_list); | 1357 | list_add_tail(&td->cancelled_td_list, &ep->cancelled_td_list); |
1355 | } | 1358 | } |