USB: change bInterval default to 10 ms
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 16 Sep 2016 14:24:26 +0000 (10:24 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 Nov 2016 01:01:41 +0000 (01:01 +0000)
commit0823893b345bd6052ae76ecb9ca06cc39d54c89d
tree551b722846147c8a573889fd2c750d1df1fe2598
parent2932d54120f2642568c77608bc8753e9114f9647
USB: change bInterval default to 10 ms

commit 08c5cd37480f59ea39682f4585d92269be6b1424 upstream.

Some full-speed mceusb infrared transceivers contain invalid endpoint
descriptors for their interrupt endpoints, with bInterval set to 0.
In the past they have worked out okay with the mceusb driver, because
the driver sets the bInterval field in the descriptor to 1,
overwriting whatever value may have been there before.  However, this
approach was never sanctioned by the USB core, and in fact it does not
work with xHCI controllers, because they use the bInterval value that
was present when the configuration was installed.

Currently usbcore uses 32 ms as the default interval if the value in
the endpoint descriptor is invalid.  It turns out that these IR
transceivers don't work properly unless the interval is set to 10 ms
or below.  To work around this mceusb problem, this patch changes the
endpoint-descriptor parsing routine, making the default interval value
be 10 ms rather than 32 ms.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Wade Berrier <wberrier@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