2009-05-15 13:36:04 +03:00
|
|
|
--- a/drivers/usb/serial/usbserial.c
|
|
|
|
+++ b/drivers/usb/serial/usbserial.c
|
2008-05-19 16:44:11 +03:00
|
|
|
@@ -331,6 +331,7 @@ static void generic_shutdown (struct us
|
2007-09-02 17:18:28 +03:00
|
|
|
#ifdef CONFIG_USB_SERIAL_GENERIC
|
|
|
|
static __u16 vendor = 0x05f9;
|
|
|
|
static __u16 product = 0xffff;
|
|
|
|
+static int maxSize = 0;
|
|
|
|
|
2008-01-06 21:28:07 +02:00
|
|
|
static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
|
2007-09-02 17:18:28 +03:00
|
|
|
|
2008-05-19 16:44:11 +03:00
|
|
|
@@ -1557,7 +1558,11 @@ static void * usb_serial_probe(struct us
|
2007-09-02 17:18:28 +03:00
|
|
|
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) {
|
2008-05-19 16:44:11 +03:00
|
|
|
@@ -1921,4 +1926,7 @@ MODULE_PARM_DESC(vendor, "User specified
|
2007-09-02 17:18:28 +03:00
|
|
|
|
|
|
|
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
|