USB: option: never bind to a usb-storage interface
authorBjørn Mork <bjorn@mork.no>
Wed, 31 Oct 2012 05:08:38 +0000 (06:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 19:58:11 +0000 (12:58 -0700)
There are many modems in addition to the D-Link DWM 652
exposing the CD interface in modem mode, and some expose
an integrated card reader as well. Always ignore these
interfaces.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/option.c

index e9cffac..2f01b2d 100644 (file)
@@ -1340,13 +1340,8 @@ static int option_probe(struct usb_serial *serial,
                                &serial->interface->cur_altsetting->desc;
        struct usb_device_descriptor *dev_desc = &serial->dev->descriptor;
 
-       /*
-        * D-Link DWM 652 still exposes CD-Rom emulation interface in modem
-        * mode.
-        */
-       if (dev_desc->idVendor == DLINK_VENDOR_ID &&
-               dev_desc->idProduct == DLINK_PRODUCT_DWM_652 &&
-               iface_desc->bInterfaceClass == 0x08)
+       /* Never bind to the CD-Rom emulation interface */
+       if (iface_desc->bInterfaceClass == 0x08)
                return -ENODEV;
 
        /* Bandrich modem and AT command interface is 0xff */