aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2011-10-25 07:55:30 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2011-12-22 18:52:44 -0500
commitc4255f67a869adae49d2ef165bcc9436bb7ec0bb (patch)
tree75d3d8aa76d12e6cdbf9ff6f688e6b33c61fd0d4 /drivers/usb
parent3b9783b277e66731891ab42eeaacebbdcdd6e629 (diff)
xhci: Remove useless sg-list debugging.
Remove verbose debugging about scatter-gather lists, as we haven't had an issue with scatter gather list math for about a year now. The debugging didn't help before, and just clutters up the log file when trying to debug other issues. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-ring.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 560b7d7ff0c..4e4f587c144 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2553,10 +2553,8 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)
2553 num_sgs = urb->num_mapped_sgs; 2553 num_sgs = urb->num_mapped_sgs;
2554 temp = urb->transfer_buffer_length; 2554 temp = urb->transfer_buffer_length;
2555 2555
2556 xhci_dbg(xhci, "count sg list trbs: \n");
2557 num_trbs = 0; 2556 num_trbs = 0;
2558 for_each_sg(urb->sg, sg, num_sgs, i) { 2557 for_each_sg(urb->sg, sg, num_sgs, i) {
2559 unsigned int previous_total_trbs = num_trbs;
2560 unsigned int len = sg_dma_len(sg); 2558 unsigned int len = sg_dma_len(sg);
2561 2559
2562 /* Scatter gather list entries may cross 64KB boundaries */ 2560 /* Scatter gather list entries may cross 64KB boundaries */
@@ -2571,22 +2569,11 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)
2571 num_trbs++; 2569 num_trbs++;
2572 running_total += TRB_MAX_BUFF_SIZE; 2570 running_total += TRB_MAX_BUFF_SIZE;
2573 } 2571 }
2574 xhci_dbg(xhci, " sg #%d: dma = %#llx, len = %#x (%d), num_trbs = %d\n",
2575 i, (unsigned long long)sg_dma_address(sg),
2576 len, len, num_trbs - previous_total_trbs);
2577
2578 len = min_t(int, len, temp); 2572 len = min_t(int, len, temp);
2579 temp -= len; 2573 temp -= len;
2580 if (temp == 0) 2574 if (temp == 0)
2581 break; 2575 break;
2582 } 2576 }
2583 xhci_dbg(xhci, "\n");
2584 if (!in_interrupt())
2585 xhci_dbg(xhci, "ep %#x - urb len = %d, sglist used, "
2586 "num_trbs = %d\n",
2587 urb->ep->desc.bEndpointAddress,
2588 urb->transfer_buffer_length,
2589 num_trbs);
2590 return num_trbs; 2577 return num_trbs;
2591} 2578}
2592 2579
@@ -2772,8 +2759,6 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
2772 trb_buff_len = min_t(int, trb_buff_len, this_sg_len); 2759 trb_buff_len = min_t(int, trb_buff_len, this_sg_len);
2773 if (trb_buff_len > urb->transfer_buffer_length) 2760 if (trb_buff_len > urb->transfer_buffer_length)
2774 trb_buff_len = urb->transfer_buffer_length; 2761 trb_buff_len = urb->transfer_buffer_length;
2775 xhci_dbg(xhci, "First length to xfer from 1st sglist entry = %u\n",
2776 trb_buff_len);
2777 2762
2778 first_trb = true; 2763 first_trb = true;
2779 /* Queue the first TRB, even if it's zero-length */ 2764 /* Queue the first TRB, even if it's zero-length */
@@ -2805,11 +2790,6 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
2805 if (usb_urb_dir_in(urb)) 2790 if (usb_urb_dir_in(urb))
2806 field |= TRB_ISP; 2791 field |= TRB_ISP;
2807 2792
2808 xhci_dbg(xhci, " sg entry: dma = %#x, len = %#x (%d), "
2809 "64KB boundary at %#x, end dma = %#x\n",
2810 (unsigned int) addr, trb_buff_len, trb_buff_len,
2811 (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1),
2812 (unsigned int) addr + trb_buff_len);
2813 if (TRB_MAX_BUFF_SIZE - 2793 if (TRB_MAX_BUFF_SIZE -
2814 (addr & (TRB_MAX_BUFF_SIZE - 1)) < trb_buff_len) { 2794 (addr & (TRB_MAX_BUFF_SIZE - 1)) < trb_buff_len) {
2815 xhci_warn(xhci, "WARN: sg dma xfer crosses 64KB boundaries!\n"); 2795 xhci_warn(xhci, "WARN: sg dma xfer crosses 64KB boundaries!\n");