[brcm-2.4] update to 2.4.37, tested on wrt54gs (#4766)
[openwrt.git] / target / linux / generic-2.4 / patches / 801-usb_serial_endpoint_size.patch
1 --- a/drivers/usb/serial/usbserial.c
2 +++ b/drivers/usb/serial/usbserial.c
3 @@ -331,6 +331,7 @@ static void generic_shutdown (struct us
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[2]; /* Initially all zeroes. */
10
11 @@ -1557,7 +1558,11 @@ static void * usb_serial_probe(struct us
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 @@ -1921,4 +1926,7 @@ MODULE_PARM_DESC(vendor, "User specified
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
This page took 0.042449 seconds and 5 git commands to generate.