Patch "Revert "USB: serial: make bulk_out_size a lower limit"" has been added to the 3.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Revert "USB: serial: make bulk_out_size a lower limit"

to the 3.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-usb-serial-make-bulk_out_size-a-lower-limit.patch
and it can be found in the queue-3.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From bc4b1f486fe69b86769e07c8edce472327a8462b Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@xxxxxxxxxx>
Date: Sun, 15 Feb 2015 11:57:53 +0700
Subject: Revert "USB: serial: make bulk_out_size a lower limit"

From: Johan Hovold <johan@xxxxxxxxxx>

commit bc4b1f486fe69b86769e07c8edce472327a8462b upstream.

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@xxxxxxxxx>
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/usb/serial/usb-serial.c |    5 +++--
 include/linux/usb/serial.h      |    3 +--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- 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_i
 		port = serial->port[i];
 		if (kfifo_alloc(&port->write_fifo, PAGE_SIZE, GFP_KERNEL))
 			goto probe_error;
-		buffer_size = max_t(int, serial->type->bulk_out_size,
-						usb_endpoint_maxp(endpoint));
+		buffer_size = serial->type->bulk_out_size;
+		if (!buffer_size)
+			buffer_size = usb_endpoint_maxp(endpoint);
 		port->bulk_out_size = buffer_size;
 		port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
 
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -190,8 +190,7 @@ static inline void usb_set_serial_data(s
  * @num_ports: the number of different ports this device will have.
  * @bulk_in_size: minimum number of bytes to allocate for bulk-in buffer
  *	(0 = end-point size)
- * @bulk_out_size: minimum number of bytes to allocate for bulk-out buffer
- *	(0 = end-point size)
+ * @bulk_out_size: bytes to allocate for bulk-out buffer (0 = end-point size)
  * @calc_num_ports: pointer to a function to determine how many ports this
  *	device has dynamically.  It will be called after the probe()
  *	callback is called, but before attach()


Patches currently in stable-queue which might be from johan@xxxxxxxxxx are

queue-3.19/revert-usb-serial-make-bulk_out_size-a-lower-limit.patch
queue-3.19/usb-serial-fix-infinite-wait_until_sent-timeout.patch
queue-3.19/usb-serial-cp210x-adding-seletek-device-id-s.patch
queue-3.19/tty-fix-tty_wait_until_sent-on-64-bit-machines.patch
queue-3.19/usb-ftdi_sio-add-jtag-quirk-support-for-cyber-cortex-av-boards.patch
queue-3.19/usb-mxuport-fix-null-deref-when-used-as-a-console.patch
queue-3.19/usb-ftdi_sio-add-pids-for-actisense-usb-devices.patch
queue-3.19/usb-serial-fix-potential-use-after-free-after-failed-probe.patch
queue-3.19/net-irda-fix-wait_until_sent-poll-timeout.patch
queue-3.19/usb-serial-fix-tty-device-error-handling-at-probe.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]