blob: 035d5bdb31c34b3428f0427670a2573be3852b56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
Index: linux-2.4.35.4/drivers/usb/serial/usbserial.c
===================================================================
--- linux-2.4.35.4.orig/drivers/usb/serial/usbserial.c 2007-12-15 05:19:36.542503478 +0100
+++ linux-2.4.35.4/drivers/usb/serial/usbserial.c 2007-12-15 05:20:13.496609372 +0100
@@ -331,6 +331,7 @@
#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 @@
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(product, "h");
MODULE_PARM_DESC(product, "User specified USB idProduct");
+
+MODULE_PARM(maxSize,"i");
+MODULE_PARM_DESC(maxSize,"User specified USB endpoint size");
#endif
|