summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.4/patches
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2007-09-02 14:18:28 +0000
committerNicolas Thill <nico@openwrt.org>2007-09-02 14:18:28 +0000
commit9f70a0f15cb41f77c8b678f9d5d52ef3c499b298 (patch)
tree44a1413552750554a00cc7e01cece43524830b2b /target/linux/generic-2.4/patches
parent18a03ce770a4f83ddebdf967f85427cf485bcc9d (diff)
downloadmtk-20170518-9f70a0f15cb41f77c8b678f9d5d52ef3c499b298.zip
mtk-20170518-9f70a0f15cb41f77c8b678f9d5d52ef3c499b298.tar.gz
mtk-20170518-9f70a0f15cb41f77c8b678f9d5d52ef3c499b298.tar.bz2
add high-speed usb serial fix from Junxion to 2.4 kernel too (closes: #2274)
SVN-Revision: 8573
Diffstat (limited to 'target/linux/generic-2.4/patches')
-rw-r--r--target/linux/generic-2.4/patches/801-usb_serial_endpoint_size.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/generic-2.4/patches/801-usb_serial_endpoint_size.patch b/target/linux/generic-2.4/patches/801-usb_serial_endpoint_size.patch
new file mode 100644
index 0000000..b0d5fac
--- /dev/null
+++ b/target/linux/generic-2.4/patches/801-usb_serial_endpoint_size.patch
@@ -0,0 +1,30 @@
+--- linux-2.4.34-old/drivers/usb/serial/usbserial.c 2007-08-27 15:32:14.000000000 +0200
++++ linux-2.4.34-new/drivers/usb/serial/usbserial.c 2007-09-02 14:10:52.000000000 +0200
+@@ -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[9]; /* 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) {
+@@ -1945,4 +1950,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