diff options
author | Paul Zimmerman <Paul.Zimmerman@synopsys.com> | 2011-02-28 21:11:27 -0500 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-03-13 21:23:57 -0400 |
commit | 500132a0f26ad7d9916102193cbc6c1b1becb373 (patch) | |
tree | c5b55f5afa88fb5b7820237a9de4c897b0c830e9 /drivers/usb/core | |
parent | ba0a4d9aaae789a6a632968b27c21d49b858b13a (diff) |
USB: Add support for SuperSpeed isoc endpoints
Use the Mult and bMaxBurst values from the endpoint companion
descriptor to calculate the max length of an isoc transfer.
Add USB_SS_MULT macro to access Mult field of bmAttributes, at
Sarah's suggestion.
This patch should be queued for the 2.6.36 and 2.6.37 stable trees, since
those were the first kernels to have isochronous support for SuperSpeed
devices.
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/urb.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index c14fc082864..ae334b067c1 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); |