|
@@ -2553,10 +2553,8 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)
|
|
|
num_sgs = urb->num_mapped_sgs;
|
|
|
temp = urb->transfer_buffer_length;
|
|
|
|
|
|
- xhci_dbg(xhci, "count sg list trbs: \n");
|
|
|
num_trbs = 0;
|
|
|
for_each_sg(urb->sg, sg, num_sgs, i) {
|
|
|
- unsigned int previous_total_trbs = num_trbs;
|
|
|
unsigned int len = sg_dma_len(sg);
|
|
|
|
|
|
/* 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)
|
|
|
num_trbs++;
|
|
|
running_total += TRB_MAX_BUFF_SIZE;
|
|
|
}
|
|
|
- xhci_dbg(xhci, " sg #%d: dma = %#llx, len = %#x (%d), num_trbs = %d\n",
|
|
|
- i, (unsigned long long)sg_dma_address(sg),
|
|
|
- len, len, num_trbs - previous_total_trbs);
|
|
|
-
|
|
|
len = min_t(int, len, temp);
|
|
|
temp -= len;
|
|
|
if (temp == 0)
|
|
|
break;
|
|
|
}
|
|
|
- xhci_dbg(xhci, "\n");
|
|
|
- if (!in_interrupt())
|
|
|
- xhci_dbg(xhci, "ep %#x - urb len = %d, sglist used, "
|
|
|
- "num_trbs = %d\n",
|
|
|
- urb->ep->desc.bEndpointAddress,
|
|
|
- urb->transfer_buffer_length,
|
|
|
- num_trbs);
|
|
|
return num_trbs;
|
|
|
}
|
|
|
|
|
@@ -2772,8 +2759,6 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
|
|
|
trb_buff_len = min_t(int, trb_buff_len, this_sg_len);
|
|
|
if (trb_buff_len > urb->transfer_buffer_length)
|
|
|
trb_buff_len = urb->transfer_buffer_length;
|
|
|
- xhci_dbg(xhci, "First length to xfer from 1st sglist entry = %u\n",
|
|
|
- trb_buff_len);
|
|
|
|
|
|
first_trb = true;
|
|
|
/* 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,
|
|
|
if (usb_urb_dir_in(urb))
|
|
|
field |= TRB_ISP;
|
|
|
|
|
|
- xhci_dbg(xhci, " sg entry: dma = %#x, len = %#x (%d), "
|
|
|
- "64KB boundary at %#x, end dma = %#x\n",
|
|
|
- (unsigned int) addr, trb_buff_len, trb_buff_len,
|
|
|
- (unsigned int) (addr + TRB_MAX_BUFF_SIZE) & ~(TRB_MAX_BUFF_SIZE - 1),
|
|
|
- (unsigned int) addr + trb_buff_len);
|
|
|
if (TRB_MAX_BUFF_SIZE -
|
|
|
(addr & (TRB_MAX_BUFF_SIZE - 1)) < trb_buff_len) {
|
|
|
xhci_warn(xhci, "WARN: sg dma xfer crosses 64KB boundaries!\n");
|