diff options
author | Johan Hovold <johan@kernel.org> | 2015-02-14 23:57:53 -0500 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2015-02-26 11:02:15 -0500 |
commit | bc4b1f486fe69b86769e07c8edce472327a8462b (patch) | |
tree | 778e8c228505ea88a028c695643905918c2b41ce /drivers/usb/serial | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
Revert "USB: serial: make bulk_out_size a lower limit"
This reverts commit 5083fd7bdfe6760577235a724cf6dccae13652c2.
A bulk-out size smaller than the end-point size is indeed valid. The
offending commit broke the usb-debug driver for EHCI debug devices,
which use 8-byte buffers.
Fixes: 5083fd7bdfe6 ("USB: serial: make bulk_out_size a lower limit")
Reported-by: "Li, Elvin" <elvin.li@intel.com>
Cc: stable <stable@vger.kernel.org> # v3.15
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 475723c006f9..19842370a07f 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -940,8 +940,9 @@ static int usb_serial_probe(struct usb_interface *interface, | |||
940 | port = serial->port[i]; | 940 | port = serial->port[i]; |
941 | if (kfifo_alloc(&port->write_fifo, PAGE_SIZE, GFP_KERNEL)) | 941 | if (kfifo_alloc(&port->write_fifo, PAGE_SIZE, GFP_KERNEL)) |
942 | goto probe_error; | 942 | goto probe_error; |
943 | buffer_size = max_t(int, serial->type->bulk_out_size, | 943 | buffer_size = serial->type->bulk_out_size; |
944 | usb_endpoint_maxp(endpoint)); | 944 | if (!buffer_size) |
945 | buffer_size = usb_endpoint_maxp(endpoint); | ||
945 | port->bulk_out_size = buffer_size; | 946 | port->bulk_out_size = buffer_size; |
946 | port->bulk_out_endpointAddress = endpoint->bEndpointAddress; | 947 | port->bulk_out_endpointAddress = endpoint->bEndpointAddress; |
947 | 948 | ||