aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 7113d16e2d3a..bf0b52c6c960 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2676,7 +2676,7 @@ static u32 xhci_v1_0_td_remainder(int running_total, int trb_buff_len,
2676 * running_total. 2676 * running_total.
2677 */ 2677 */
2678 packets_transferred = (running_total + trb_buff_len) / 2678 packets_transferred = (running_total + trb_buff_len) /
2679 le16_to_cpu(urb->ep->desc.wMaxPacketSize); 2679 usb_endpoint_maxp(&urb->ep->desc);
2680 2680
2681 return xhci_td_remainder(total_packet_count - packets_transferred); 2681 return xhci_td_remainder(total_packet_count - packets_transferred);
2682} 2682}
@@ -2706,7 +2706,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
2706 num_trbs = count_sg_trbs_needed(xhci, urb); 2706 num_trbs = count_sg_trbs_needed(xhci, urb);
2707 num_sgs = urb->num_sgs; 2707 num_sgs = urb->num_sgs;
2708 total_packet_count = roundup(urb->transfer_buffer_length, 2708 total_packet_count = roundup(urb->transfer_buffer_length,
2709 le16_to_cpu(urb->ep->desc.wMaxPacketSize)); 2709 usb_endpoint_maxp(&urb->ep->desc));
2710 2710
2711 trb_buff_len = prepare_transfer(xhci, xhci->devs[slot_id], 2711 trb_buff_len = prepare_transfer(xhci, xhci->devs[slot_id],
2712 ep_index, urb->stream_id, 2712 ep_index, urb->stream_id,
@@ -2913,7 +2913,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
2913 2913
2914 running_total = 0; 2914 running_total = 0;
2915 total_packet_count = roundup(urb->transfer_buffer_length, 2915 total_packet_count = roundup(urb->transfer_buffer_length,
2916 le16_to_cpu(urb->ep->desc.wMaxPacketSize)); 2916 usb_endpoint_maxp(&urb->ep->desc));
2917 /* How much data is in the first TRB? */ 2917 /* How much data is in the first TRB? */
2918 addr = (u64) urb->transfer_dma; 2918 addr = (u64) urb->transfer_dma;
2919 trb_buff_len = TRB_MAX_BUFF_SIZE - 2919 trb_buff_len = TRB_MAX_BUFF_SIZE -
@@ -3239,7 +3239,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
3239 td_remain_len = td_len; 3239 td_remain_len = td_len;
3240 /* FIXME: Ignoring zero-length packets, can those happen? */ 3240 /* FIXME: Ignoring zero-length packets, can those happen? */
3241 total_packet_count = roundup(td_len, 3241 total_packet_count = roundup(td_len,
3242 le16_to_cpu(urb->ep->desc.wMaxPacketSize)); 3242 usb_endpoint_maxp(&urb->ep->desc));
3243 burst_count = xhci_get_burst_count(xhci, urb->dev, urb, 3243 burst_count = xhci_get_burst_count(xhci, urb->dev, urb,
3244 total_packet_count); 3244 total_packet_count);
3245 residue = xhci_get_last_burst_packet_count(xhci, 3245 residue = xhci_get_last_burst_packet_count(xhci,