diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2013-05-08 15:18:05 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-15 17:41:39 (GMT) |
commit | e4f47e3675e6f1f40906b785b934ce963e9f2eb3 (patch) | |
tree | ab22d874a67160c6bcab91dc5c8c312cd54da902 /lib/smp_processor_id.c | |
parent | 4089ffd7665fabfbceb8bbbdce458fcc416f3733 (diff) | |
download | linux-e4f47e3675e6f1f40906b785b934ce963e9f2eb3.tar.xz |
USB: xHCI: override bogus bulk wMaxPacketSize values
This patch shortens the logic in xhci_endpoint_init() by moving common
calculations involving max_packet and max_burst outside the switch
statement, rather than repeating the same code in multiple
case-specific statements. It also replaces two usages of max_packet
which were clearly intended to be max_burst all along.
More importantly, it compensates for a common bug in high-speed bulk
endpoint descriptors. In many devices there is a bulk endpoint having
a wMaxPacketSize value smaller than 512, which is forbidden by the USB
spec. Some xHCI controllers can't handle this and refuse to accept
the endpoint. This patch changes the max_packet value to 512, which
allows the controller to use the endpoint properly.
In practice the bogus maxpacket size doesn't matter, because none of
the transfers sent via these endpoints are longer than the maxpacket
value anyway.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: "Aurélien Leblond" <blablack@gmail.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/smp_processor_id.c')
0 files changed, 0 insertions, 0 deletions