b0d5facc44682bab109450de825b99fcfbfda7ef
[openwrt/svn-archive/archive.git] / target / linux / generic-2.4 / patches / 801-usb_serial_endpoint_size.patch
1 --- linux-2.4.34-old/drivers/usb/serial/usbserial.c 2007-08-27 15:32:14.000000000 +0200
2 +++ linux-2.4.34-new/drivers/usb/serial/usbserial.c 2007-09-02 14:10:52.000000000 +0200
3 @@ -331,6 +331,7 @@
4 #ifdef CONFIG_USB_SERIAL_GENERIC
5 static __u16 vendor = 0x05f9;
6 static __u16 product = 0xffff;
7 +static int maxSize = 0;
8
9 static struct usb_device_id generic_device_ids[9]; /* Initially all zeroes. */
10
11 @@ -1557,7 +1558,11 @@
12 err("No free urbs available");
13 goto probe_error;
14 }
15 +#ifdef CONFIG_USB_SERIAL_GENERIC
16 + buffer_size = (endpoint->wMaxPacketSize > maxSize) ? endpoint->wMaxPacketSize : maxSize;
17 +#else
18 buffer_size = endpoint->wMaxPacketSize;
19 +#endif
20 port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
21 port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
22 if (!port->bulk_in_buffer) {
23 @@ -1945,4 +1950,7 @@
24
25 MODULE_PARM(product, "h");
26 MODULE_PARM_DESC(product, "User specified USB idProduct");
27 +
28 +MODULE_PARM(maxSize,"i");
29 +MODULE_PARM_DESC(maxSize,"User specified USB endpoint size");
30 #endif