aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/urb.c11
-rw-r--r--include/linux/usb/ch9.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index c14fc082864f..ae334b067c13 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -366,7 +366,16 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
366 if (xfertype == USB_ENDPOINT_XFER_ISOC) { 366 if (xfertype == USB_ENDPOINT_XFER_ISOC) {
367 int n, len; 367 int n, len;
368 368
369 /* FIXME SuperSpeed isoc endpoints have up to 16 bursts */ 369 /* SuperSpeed isoc endpoints have up to 16 bursts of up to
370 * 3 packets each
371 */
372 if (dev->speed == USB_SPEED_SUPER) {
373 int burst = 1 + ep->ss_ep_comp.bMaxBurst;
374 int mult = USB_SS_MULT(ep->ss_ep_comp.bmAttributes);
375 max *= burst;
376 max *= mult;
377 }
378
370 /* "high bandwidth" mode, 1-3 packets/uframe? */ 379 /* "high bandwidth" mode, 1-3 packets/uframe? */
371 if (dev->speed == USB_SPEED_HIGH) { 380 if (dev->speed == USB_SPEED_HIGH) {
372 int mult = 1 + ((max >> 11) & 0x03); 381 int mult = 1 + ((max >> 11) & 0x03);
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 34316ba05f29..b72f305ce6bd 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -585,6 +585,8 @@ struct usb_ss_ep_comp_descriptor {
585#define USB_DT_SS_EP_COMP_SIZE 6 585#define USB_DT_SS_EP_COMP_SIZE 6
586/* Bits 4:0 of bmAttributes if this is a bulk endpoint */ 586/* Bits 4:0 of bmAttributes if this is a bulk endpoint */
587#define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f)) 587#define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f))
588/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
589#define USB_SS_MULT(p) (1 + ((p) & 0x3))
588 590
589/*-------------------------------------------------------------------------*/ 591/*-------------------------------------------------------------------------*/
590 592