Skip to content

Commit 0e548f5

Browse files
AlanSterngregkh
authored andcommitted
USB: Accept bulk endpoints with 1024-byte maxpacket
commit fb5ee84 upstream. Some non-compliant high-speed USB devices have bulk endpoints with a 1024-byte maxpacket size. Although such endpoints don't work with xHCI host controllers, they do work with EHCI controllers. We used to accept these invalid sizes (with a warning), but we no longer do because of an unintentional change introduced by commit aed9d65 ("USB: validate wMaxPacketValue entries in endpoint descriptors"). This patch restores the old behavior, so that people with these peculiar devices can use them without patching their kernels by hand. Signed-off-by: Alan Stern <[email protected]> Suggested-by: Elvinas <[email protected]> Fixes: aed9d65 ("USB: validate wMaxPacketValue entries in endpoint descriptors") CC: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 425a025 commit 0e548f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/core/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ static const unsigned short full_speed_maxpacket_maxes[4] = {
191191
static const unsigned short high_speed_maxpacket_maxes[4] = {
192192
[USB_ENDPOINT_XFER_CONTROL] = 64,
193193
[USB_ENDPOINT_XFER_ISOC] = 1024,
194-
[USB_ENDPOINT_XFER_BULK] = 512,
194+
195+
/* Bulk should be 512, but some devices use 1024: we will warn below */
196+
[USB_ENDPOINT_XFER_BULK] = 1024,
195197
[USB_ENDPOINT_XFER_INT] = 1024,
196198
};
197199
static const unsigned short super_speed_maxpacket_maxes[4] = {

0 commit comments

Comments
 (0)