USB: fix typo in wMaxPacketSize validation
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 22 Aug 2016 20:58:53 +0000 (16:58 -0400)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:14:34 +0000 (13:14 +0000)
commit 6c73358c83ce870c0cf32413e5cadb3b9a39c606 upstream.

The maximum value allowed for wMaxPacketSize of a high-speed interrupt
endpoint is 1024 bytes, not 1023.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Fixes: aed9d65ac327 ("USB: validate wMaxPacketValue entries in endpoint descriptors")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/core/config.c

index e1ebea38b55220a42c39352b75bb9112f1efa0cf..3b69ff153cb955fbfd05a1edfdc6ce3ef9e49ea9 100644 (file)
@@ -160,7 +160,7 @@ static const unsigned short high_speed_maxpacket_maxes[4] = {
        [USB_ENDPOINT_XFER_CONTROL] = 64,
        [USB_ENDPOINT_XFER_ISOC] = 1024,
        [USB_ENDPOINT_XFER_BULK] = 512,
-       [USB_ENDPOINT_XFER_INT] = 1023,
+       [USB_ENDPOINT_XFER_INT] = 1024,
 };
 static const unsigned short super_speed_maxpacket_maxes[4] = {
        [USB_ENDPOINT_XFER_CONTROL] = 512,