mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-19 22:44:11 +03:00
f3016ce71f
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11213 3c298f89-4303-0410-b956-a3cf2f4a3e73
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
Index: linux-2.4.35.4/drivers/usb/serial/usbserial.c
|
|
===================================================================
|
|
--- linux-2.4.35.4.orig/drivers/usb/serial/usbserial.c
|
|
+++ linux-2.4.35.4/drivers/usb/serial/usbserial.c
|
|
@@ -331,6 +331,7 @@ static void generic_shutdown (struct us
|
|
#ifdef CONFIG_USB_SERIAL_GENERIC
|
|
static __u16 vendor = 0x05f9;
|
|
static __u16 product = 0xffff;
|
|
+static int maxSize = 0;
|
|
|
|
static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
|
|
|
|
@@ -1557,7 +1558,11 @@ static void * usb_serial_probe(struct us
|
|
err("No free urbs available");
|
|
goto probe_error;
|
|
}
|
|
+#ifdef CONFIG_USB_SERIAL_GENERIC
|
|
+ buffer_size = (endpoint->wMaxPacketSize > maxSize) ? endpoint->wMaxPacketSize : maxSize;
|
|
+#else
|
|
buffer_size = endpoint->wMaxPacketSize;
|
|
+#endif
|
|
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
|
|
port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
|
|
if (!port->bulk_in_buffer) {
|
|
@@ -1921,4 +1926,7 @@ MODULE_PARM_DESC(vendor, "User specified
|
|
|
|
MODULE_PARM(product, "h");
|
|
MODULE_PARM_DESC(product, "User specified USB idProduct");
|
|
+
|
|
+MODULE_PARM(maxSize,"i");
|
|
+MODULE_PARM_DESC(maxSize,"User specified USB endpoint size");
|
|
#endif
|