*ISSUE*
Wireless WAN PC Card modem devices such as the Novatel Merlin V620/S620
and Kyocera KPC650 on a 1xEV-DO network experience a stalled data
connection due to high data rates when operated on Linux kernel 2.4.x
and 2.6.x. This issue does not occur when the cards are connected at
1xRTT data rates.
*BACKGROUND*
The affected modems are PCMCIA cards that use a USB host controller
interface to expose a serial device to the Linux operating system. The
generic usbserial driver can be used to talk to these devices as if they
were serial modems.
There are 2 potential problems that this work-around resolves:
1. The current usbcore and usbserial driver do not correctly recognize
the maximum packet size on the inbound bulk endpoint.
2. The cards themselves are not advertising the correct maximum data
packet size to the usb sub-system on Linux.
By default the linux usb core sees only 64 bytes of capacity. Without
this work-around there is no way to specify what the maximum packet size
on the inbound bulk endpoint should be. If you consider that the MTU on
these cards is set at 1500 and the usb bulk endpoint callbacks are only
reading 64 bytes at a time off of the serial tty, it doesn't take long
to start dropping packets and seriously junkify your connection.
This patch adds a third module parameter so you can specify what you
think the inbound endpoint maximum packet size should be. If the
parameter is not set at module loading time, it defaults to 0 and the
maximum packet size detected by the usb core will be used.
The parameter name is : maxSize.
modprobe usbserial vendor=0x1410 product=0x1110 maxSize=2048
[START PATCH]
--- drivers/usb/serial/usbserial.c Thu Nov 28 15:53:15 2002
+++ drivers/usb/serial/usbserial_junxion.c Wed Jul 6 08:42:25 2005
@@ -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. */
@@ -1255,6 +1256,9 @@
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
+#ifdef CONFIG_USB_SERIAL_GENERIC
+ buffer_size = (endpoint->wMaxPacketSize >
maxSize)?endpoint->wMaxPacketSize:maxSize;
+#endif
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->bulk_in_buffer) {
@@ -1608,4 +1612,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
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel