lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / generic-2.4 / patches / 801-usb_serial_endpoint_size.patch
1 Index: linux-2.4.35.4/drivers/usb/serial/usbserial.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/drivers/usb/serial/usbserial.c
4 +++ linux-2.4.35.4/drivers/usb/serial/usbserial.c
5 @@ -331,6 +331,7 @@ static void generic_shutdown (struct us
6 #ifdef CONFIG_USB_SERIAL_GENERIC
7 static __u16 vendor = 0x05f9;
8 static __u16 product = 0xffff;
9 +static int maxSize = 0;
10
11 static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
12
13 @@ -1557,7 +1558,11 @@ static void * usb_serial_probe(struct us
14 err("No free urbs available");
15 goto probe_error;
16 }
17 +#ifdef CONFIG_USB_SERIAL_GENERIC
18 + buffer_size = (endpoint->wMaxPacketSize > maxSize) ? endpoint->wMaxPacketSize : maxSize;
19 +#else
20 buffer_size = endpoint->wMaxPacketSize;
21 +#endif
22 port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
23 port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
24 if (!port->bulk_in_buffer) {
25 @@ -1921,4 +1926,7 @@ MODULE_PARM_DESC(vendor, "User specified
26
27 MODULE_PARM(product, "h");
28 MODULE_PARM_DESC(product, "User specified USB idProduct");
29 +
30 +MODULE_PARM(maxSize,"i");
31 +MODULE_PARM_DESC(maxSize,"User specified USB endpoint size");
32 #endif
This page took 0.043062 seconds and 5 git commands to generate.