diff options
| author | christos <christos@NetBSD.org> | 2008-10-25 17:35:44 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2008-10-25 17:35:44 +0000 |
| commit | b311f98821cc67d0d4bb0a8d7eca01165529bd71 (patch) | |
| tree | 840ecbdc1f115569993cd0fd941a90928afec5dd /sys/dev | |
| parent | e7901a5f9a2028f00ed8de311ec2af78093e27c8 (diff) | |
The Sierra Wireless USBConnect 881 card presents itself as umass containing
the driver to be installed for it. We don't need this crap. Tell it to become
a modem.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/u3g.c | 37 | ||||
| -rw-r--r-- | sys/dev/usb/usbdevs | 3 |
2 files changed, 39 insertions, 1 deletions
diff --git a/sys/dev/usb/u3g.c b/sys/dev/usb/u3g.c index aa161df2a53..815c5f98f91 100644 --- a/sys/dev/usb/u3g.c +++ b/sys/dev/usb/u3g.c @@ -263,6 +263,32 @@ u3g_huawei_reinit(usbd_device_handle dev) } static int +u3g_sierra_reinit(usbd_device_handle dev) +{ + /* Some Sierra devices presents themselves as a umass device with + * Windows drivers on it. After installation of the driver, it + * reinits into a * 3G serial device. + */ + usb_device_request_t req; + usb_config_descriptor_t *cdesc; + + /* Get the config descriptor */ + cdesc = usbd_get_config_descriptor(dev); + if (cdesc == NULL) + return (UMATCH_NONE); + + req.bmRequestType = UT_VENDOR; + req.bRequest = UR_SET_INTERFACE; + USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); + USETW(req.wIndex, UHF_PORT_CONNECTION); + USETW(req.wLength, 0); + + (void) usbd_do_request(dev, &req, 0); + + return (UMATCH_HIGHEST); /* Match to prevent umass from attaching */ +} + +static int u3g_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -274,6 +300,10 @@ u3g_match(device_t parent, cfdata_t match, void *aux) uaa->product == USB_PRODUCT_NOVATEL2_MC950D_DRIVER) return u3g_novatel_reinit(uaa); + if (uaa->vendor == USB_VENDOR_SIERRA && + uaa->product == USB_PRODUCT_SIERRA_INSTALLER) + return u3g_sierra_reinit(uaa->device); + if (usb_lookup(u3g_devs, uaa->vendor, uaa->product)) return UMATCH_VENDOR_PRODUCT; @@ -330,6 +360,13 @@ u3g_attach(device_t parent, device_t self, void *aux) return; } + if (uaa->vendor == USB_VENDOR_SIERRA && + uaa->product == USB_PRODUCT_SIERRA_INSTALLER) { + /* About to disappear... */ + sc->sc_pseudodev = true; + return; + } + sc->sc_udev = dev; sc->numports = (cdesc->bNumInterface <= U3G_MAXPORTS)?cdesc->bNumInterface:U3G_MAXPORTS; for ( i = 0; i < sc->numports; i++ ) { diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 679da94e29d..0fe6e137b67 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.518 2008/10/22 10:23:51 haad Exp $ +$NetBSD: usbdevs,v 1.519 2008/10/25 17:35:44 christos Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -2057,6 +2057,7 @@ product SIERRA MC8775_2 0x6815 MC8775 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA MC8780 0x6832 MC8780 product SIERRA MC8781 0x6833 MC8781 +product SIERRA INSTALLER 0x0fff Aircard Driver Installer /* Sigmatel products */ product SIGMATEL SIR4116 0x4116 StIR4116 SIR |
