From e551adf576a253051c6feae81956792492ce91b3 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 16 Mar 2010 12:55:44 -0700 Subject: [PATCH] --- yaml --- r: 188789 b: refs/heads/master c: f09a15e6e69884cedec4d1c022089a973aa01f1e h: refs/heads/master i: 188787: f36ef35a4962aaff2648ef6c0950378611d4cacd v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/urb.c | 1 + trunk/include/linux/usb.h | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 76bf09285e42..eb6717acda95 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e549a17f698e266373f6757bd068d1e98397b4c0 +refs/heads/master: f09a15e6e69884cedec4d1c022089a973aa01f1e diff --git a/trunk/drivers/usb/core/urb.c b/trunk/drivers/usb/core/urb.c index 27080561a1c2..45a32dadb406 100644 --- a/trunk/drivers/usb/core/urb.c +++ b/trunk/drivers/usb/core/urb.c @@ -453,6 +453,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) if (urb->interval > (1 << 15)) return -EINVAL; max = 1 << 15; + break; case USB_SPEED_WIRELESS: if (urb->interval > 16) return -EINVAL; diff --git a/trunk/include/linux/usb.h b/trunk/include/linux/usb.h index 8c9f053111bb..ce1323c4e47c 100644 --- a/trunk/include/linux/usb.h +++ b/trunk/include/linux/usb.h @@ -1055,7 +1055,8 @@ typedef void (*usb_complete_t)(struct urb *); * @number_of_packets: Lists the number of ISO transfer buffers. * @interval: Specifies the polling interval for interrupt or isochronous * transfers. The units are frames (milliseconds) for full and low - * speed devices, and microframes (1/8 millisecond) for highspeed ones. + * speed devices, and microframes (1/8 millisecond) for highspeed + * and SuperSpeed devices. * @error_count: Returns the number of ISO transfers that reported errors. * @context: For use in completion functions. This normally points to * request-specific driver context. @@ -1286,9 +1287,16 @@ static inline void usb_fill_bulk_urb(struct urb *urb, * * Initializes a interrupt urb with the proper information needed to submit * it to a device. - * Note that high speed interrupt endpoints use a logarithmic encoding of - * the endpoint interval, and express polling intervals in microframes - * (eight per millisecond) rather than in frames (one per millisecond). + * + * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic + * encoding of the endpoint interval, and express polling intervals in + * microframes (eight per millisecond) rather than in frames (one per + * millisecond). + * + * Wireless USB also uses the logarithmic encoding, but specifies it in units of + * 128us instead of 125us. For Wireless USB devices, the interval is passed + * through to the host controller, rather than being translated into microframe + * units. */ static inline void usb_fill_int_urb(struct urb *urb, struct usb_device *dev, @@ -1305,7 +1313,7 @@ static inline void usb_fill_int_urb(struct urb *urb, urb->transfer_buffer_length = buffer_length; urb->complete = complete_fn; urb->context = context; - if (dev->speed == USB_SPEED_HIGH) + if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) urb->interval = 1 << (interval - 1); else urb->interval = interval;