diff options
author | James P Michels III <james.p.michels@gmail.com> | 2014-07-27 13:28:04 -0400 |
---|---|---|
committer | Zefan Li <lizefan@huawei.com> | 2015-04-14 17:33:56 +0800 |
commit | 7583c9fa5344a6cc217be4f6ded892648ff0e3f5 (patch) | |
tree | 9cac39e673ced34ed4b02a11c679793a3213e966 /include | |
parent | d6d1536d901f5805565af5dd38d2d0ae766ee875 (diff) |
usb-core bInterval quirk
commit cd83ce9e6195aa3ea15ab4db92892802c20df5d0 upstream.
This patch adds a usb quirk to support devices with interupt endpoints
and bInterval values expressed as microframes. The quirk causes the
parse endpoint function to modify the reported bInterval to a standards
conforming value.
There is currently code in the endpoint parser that checks for
bIntervals that are outside of the valid range (1-16 for USB 2+ high
speed and super speed interupt endpoints). In this case, the code assumes
the bInterval is being reported in 1ms frames. As well, the correction
is only applied if the original bInterval value is out of the 1-16 range.
With this quirk applied to the device, the bInterval will be
accurately adjusted from microframes to an exponent.
Signed-off-by: James P Michels III <james.p.michels@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/quirks.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index d0d2af09dcc6..0972470bb072 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h @@ -36,4 +36,15 @@ /* device can't handle device_qualifier descriptor requests */ #define USB_QUIRK_DEVICE_QUALIFIER 0x00000100 +/* + * For high speed and super speed interupt endpoints, the USB 2.0 and + * USB 3.0 spec require the interval in microframes + * (1 microframe = 125 microseconds) to be calculated as + * interval = 2 ^ (bInterval-1). + * + * Devices with this quirk report their bInterval as the result of this + * calculation instead of the exponent variable used in the calculation. + */ +#define USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL 0x00000080 + #endif /* __LINUX_USB_QUIRKS_H */ |