kernel: add a missing dependency for the mv_cesa crypto driver
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-2.6.38 / 801-usb_serial_endpoint_size.patch
1 Index: linux-2.6.38.1/drivers/usb/serial/usb-serial.c
2 ===================================================================
3 --- linux-2.6.38.1.orig/drivers/usb/serial/usb-serial.c 2011-03-23 21:04:47.000000000 +0100
4 +++ linux-2.6.38.1/drivers/usb/serial/usb-serial.c 2011-03-28 16:58:26.673254994 +0200
5 @@ -61,6 +61,7 @@ static struct usb_driver usb_serial_driv
6 drivers depend on it.
7 */
8
9 +static ushort maxSize = 0;
10 static int debug;
11 /* initially all NULL */
12 static struct usb_serial *serial_table[SERIAL_TTY_MINORS];
13 @@ -912,7 +913,8 @@ int usb_serial_probe(struct usb_interfac
14 goto probe_error;
15 }
16 buffer_size = max_t(int, serial->type->bulk_in_size,
17 - le16_to_cpu(endpoint->wMaxPacketSize));
18 + min_t(int, le16_to_cpu(endpoint->wMaxPacketSize),
19 + maxSize));
20 port->bulk_in_size = buffer_size;
21 port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
22 port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
23 @@ -1391,3 +1393,5 @@ MODULE_LICENSE("GPL");
24
25 module_param(debug, bool, S_IRUGO | S_IWUSR);
26 MODULE_PARM_DESC(debug, "Debug enabled or not");
27 +module_param(maxSize, ushort,0);
28 +MODULE_PARM_DESC(maxSize,"User specified USB endpoint size");