summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_cue.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/if_cue.c')
-rw-r--r--sys/dev/usb/if_cue.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index f832e61..905b34a 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -84,14 +84,12 @@ static const char rcsid[] =
#endif
/*
- * Various supported device vendors/types and their names.
+ * Various supported device vendors/products.
*/
static struct cue_type cue_devs[] = {
- { USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE,
- "CATC Netmate USB Ethernet" },
- { USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE2,
- "CATC Netmate USB Ethernet" },
- { 0, 0, NULL }
+ { USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE },
+ { USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE2 },
+ { 0, 0 }
};
static struct usb_qdat cue_qdat;
@@ -431,12 +429,11 @@ USB_MATCH(cue)
dd = &uaa->device->ddesc;
t = cue_devs;
- while(t->cue_name != NULL) {
+ while(t->cue_vid) {
if (uaa->vendor == t->cue_vid &&
uaa->product == t->cue_did) {
USETW(dd->bcdDevice, 0x220);
uaa->device->quirks = usbd_find_quirk(dd);
- device_set_desc(self, t->cue_name);
return(UMATCH_VENDOR_PRODUCT);
}
t++;
@@ -467,6 +464,13 @@ USB_ATTACH(cue)
sc->cue_udev = uaa->device;
sc->cue_unit = device_get_unit(self);
+ if (usbd_set_config_no(sc->cue_udev, CUE_CONFIG_NO, 0)) {
+ printf("cue%d: getting interface handle failed\n",
+ sc->cue_unit);
+ splx(s);
+ USB_ATTACH_ERROR_RETURN;
+ }
+
id = usbd_get_interface_descriptor(uaa->iface);
usbd_devinfo(uaa->device, 0, devinfo);
OpenPOWER on IntegriCloud