RE: option.ko: ZTE MF636 support

From: Peter Hicks
Date: Sun May 09 2010 - 17:55:55 EST


Hi Nils

On Sun, 2010-05-09 at 16:22 +0200, Nils Radtke wrote:

> Similar symptoms are the long delay on opening of devices 0 and 2.
> /dev/ttyUSB0: status port
> /dev/ttyUSB2: modem port (not working)

Does "echo > /dev/ttyUSB0" return immediately, and "echo > /dev/ttyUSB2"
take around 15 seconds to return?

> What has been your solution to get the ZTE working?

I've blacklisted devices 0, 1 and 2 using the attached patch, taken
against 2.6.34-rc6. It should be quite straightforward to modify this
for your device.

Without the patch, I'm able to use wvdial against ttyUSB3 to dial up,
but the device is unresponsive to anything apart from a PPP LCP
disconnect.

Regards,


Peter

--- drivers/usb/serial/option.orig.c 2010-05-09 22:46:41.761498988 +0100
+++ drivers/usb/serial/option.c 2010-05-09 22:44:49.911498986 +0100
@@ -393,6 +393,13 @@
.reason = OPTION_BLACKLIST_SENDSETUP
};

+static const u8 zte_mf636_no_sendsetup[] = { 0, 1, 2 };
+static const struct option_blacklist_info zte_mf636_blacklist = {
+ .infolen = ARRAY_SIZE(zte_mf636_no_sendsetup),
+ .ifaceinfo = zte_mf636_no_sendsetup,
+ .reason = OPTION_BLACKLIST_SENDSETUP
+};
+
static const struct usb_device_id option_ids[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -609,7 +616,9 @@
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff),
+ .driver_info = (kernel_ulong_t)&zte_mf636_blacklist
+ },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) },