usb-core bInterval quirk
authorJames P Michels III <james.p.michels@gmail.com>
Sun, 27 Jul 2014 17:28:04 +0000 (13:28 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 20 Feb 2015 00:49:39 +0000 (00:49 +0000)
commitcca4d731e2e9ccebb069b84c8aea70f15834a203
tree54f9c613561cb317ff378bfca951604cf5ab9ebd
parent4fe697c2b34b5740118a477db535f2fb1ab24467
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: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/core/config.c
drivers/usb/core/quirks.c
include/linux/usb/quirks.h