diff options
author | Andrew Bird <ajb@spheresystems.co.uk> | 2010-07-23 11:04:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:43 -0400 |
commit | 0372a754be9aa43e19fd86c9bc04796d43b55e38 (patch) | |
tree | b0ddb1b60971ce208913a6d8b72ea85b2b398c2e /drivers/usb | |
parent | 567064916e4fe32af81b89e473a1e4f40c64b27b (diff) |
USB: option: add huawei k3765 k4505 devices to work properly
This patch adds the product IDs of Huawei's K3765 and K4505 mobile
broadband usb modems to option.c. It also adds a quirk to the option
probe function so that binding to the device's network interface(class
0xff) is avoided. This is necessary to allow another driver to bind to
that, and to avoid programs like wvdial opening a nonfunctioning tty
during modem discovery.
Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/option.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 051c00ce5d2a..9fc6ea2c681f 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -145,6 +145,8 @@ static void option_instat_callback(struct urb *urb); | |||
145 | #define HUAWEI_PRODUCT_E143D 0x143D | 145 | #define HUAWEI_PRODUCT_E143D 0x143D |
146 | #define HUAWEI_PRODUCT_E143E 0x143E | 146 | #define HUAWEI_PRODUCT_E143E 0x143E |
147 | #define HUAWEI_PRODUCT_E143F 0x143F | 147 | #define HUAWEI_PRODUCT_E143F 0x143F |
148 | #define HUAWEI_PRODUCT_K4505 0x1464 | ||
149 | #define HUAWEI_PRODUCT_K3765 0x1465 | ||
148 | #define HUAWEI_PRODUCT_E14AC 0x14AC | 150 | #define HUAWEI_PRODUCT_E14AC 0x14AC |
149 | #define HUAWEI_PRODUCT_ETS1220 0x1803 | 151 | #define HUAWEI_PRODUCT_ETS1220 0x1803 |
150 | 152 | ||
@@ -480,6 +482,8 @@ static const struct usb_device_id option_ids[] = { | |||
480 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, | 482 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, |
481 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, | 483 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, |
482 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, | 484 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, |
485 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) }, | ||
486 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, | ||
483 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, | 487 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, |
484 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC) }, | 488 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC) }, |
485 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ | 489 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ |
@@ -1015,6 +1019,13 @@ static int option_probe(struct usb_serial *serial, | |||
1015 | serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) | 1019 | serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) |
1016 | return -ENODEV; | 1020 | return -ENODEV; |
1017 | 1021 | ||
1022 | /* Don't bind network interfaces on Huawei K3765 & K4505 */ | ||
1023 | if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID && | ||
1024 | (serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 || | ||
1025 | serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505) && | ||
1026 | serial->interface->cur_altsetting->desc.bInterfaceNumber == 1) | ||
1027 | return -ENODEV; | ||
1028 | |||
1018 | data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL); | 1029 | data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL); |
1019 | 1030 | ||
1020 | if (!data) | 1031 | if (!data) |