]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bind only modem AT command endpoint to option module.
authorMarius B. Kotsbak <marius@kotsbak.com>
Mon, 21 Mar 2011 22:27:21 +0000 (23:27 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 30 Apr 2011 00:05:06 +0000 (17:05 -0700)
Network interface is handled by upcoming gt_b3730 module.

Removed "GT-B3710" from comment, it is another modem with another USB ID.

Signed-off-by: Marius B. Kotsbak <marius@kotsbak.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/option.c

index d77ff0435896bf098c39fda885d2370de685cc0c..4001f7630a547d3875030a7d773f14bdd2e8ab93 100644 (file)
@@ -972,7 +972,7 @@ static const struct usb_device_id option_ids[] = {
        { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) },
        { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
        { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */
-       { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730/GT-B3710 LTE USB modem.*/
+       { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
        { } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
@@ -1109,6 +1109,12 @@ static int option_probe(struct usb_serial *serial,
                serial->interface->cur_altsetting->desc.bInterfaceNumber == 1)
                return -ENODEV;
 
+       /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */
+       if (serial->dev->descriptor.idVendor == SAMSUNG_VENDOR_ID &&
+               serial->dev->descriptor.idProduct == SAMSUNG_PRODUCT_GT_B3730 &&
+               serial->interface->cur_altsetting->desc.bInterfaceClass != USB_CLASS_CDC_DATA)
+               return -ENODEV;
+
        data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL);
 
        if (!data)