diff options
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index d446886b22b0..d873a0330c9e 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1141,8 +1141,8 @@ static u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, | |||
1141 | if (udev->speed == USB_SPEED_SUPER) | 1141 | if (udev->speed == USB_SPEED_SUPER) |
1142 | return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval); | 1142 | return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval); |
1143 | 1143 | ||
1144 | max_packet = GET_MAX_PACKET(le16_to_cpu(ep->desc.wMaxPacketSize)); | 1144 | max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc)); |
1145 | max_burst = (le16_to_cpu(ep->desc.wMaxPacketSize) & 0x1800) >> 11; | 1145 | max_burst = (usb_endpoint_maxp(&ep->desc) & 0x1800) >> 11; |
1146 | /* A 0 in max burst means 1 transfer per ESIT */ | 1146 | /* A 0 in max burst means 1 transfer per ESIT */ |
1147 | return max_packet * (max_burst + 1); | 1147 | return max_packet * (max_burst + 1); |
1148 | } | 1148 | } |
@@ -1211,7 +1211,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1211 | /* Set the max packet size and max burst */ | 1211 | /* Set the max packet size and max burst */ |
1212 | switch (udev->speed) { | 1212 | switch (udev->speed) { |
1213 | case USB_SPEED_SUPER: | 1213 | case USB_SPEED_SUPER: |
1214 | max_packet = le16_to_cpu(ep->desc.wMaxPacketSize); | 1214 | max_packet = usb_endpoint_maxp(&ep->desc); |
1215 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet)); | 1215 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet)); |
1216 | /* dig out max burst from ep companion desc */ | 1216 | /* dig out max burst from ep companion desc */ |
1217 | max_packet = ep->ss_ep_comp.bMaxBurst; | 1217 | max_packet = ep->ss_ep_comp.bMaxBurst; |
@@ -1223,14 +1223,14 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1223 | */ | 1223 | */ |
1224 | if (usb_endpoint_xfer_isoc(&ep->desc) || | 1224 | if (usb_endpoint_xfer_isoc(&ep->desc) || |
1225 | usb_endpoint_xfer_int(&ep->desc)) { | 1225 | usb_endpoint_xfer_int(&ep->desc)) { |
1226 | max_burst = (le16_to_cpu(ep->desc.wMaxPacketSize) | 1226 | max_burst = (usb_endpoint_maxp(&ep->desc) |
1227 | & 0x1800) >> 11; | 1227 | & 0x1800) >> 11; |
1228 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_BURST(max_burst)); | 1228 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_BURST(max_burst)); |
1229 | } | 1229 | } |
1230 | /* Fall through */ | 1230 | /* Fall through */ |
1231 | case USB_SPEED_FULL: | 1231 | case USB_SPEED_FULL: |
1232 | case USB_SPEED_LOW: | 1232 | case USB_SPEED_LOW: |
1233 | max_packet = GET_MAX_PACKET(le16_to_cpu(ep->desc.wMaxPacketSize)); | 1233 | max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc)); |
1234 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet)); | 1234 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet)); |
1235 | break; | 1235 | break; |
1236 | default: | 1236 | default: |