summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2010-12-15 14:55:04 +0000
committerjasper <jasper@openbsd.org>2010-12-15 14:55:04 +0000
commita0977bbbc6cdd9c21576127b58019d9cfd410500 (patch)
treebec576ba5bc3d9fbaa97de1e3e682d1c4e714393
parentWe run getopt() twice to know if dhcp-sync is used. To make this work (diff)
downloadwireguard-openbsd-a0977bbbc6cdd9c21576127b58019d9cfd410500.tar.xz
wireguard-openbsd-a0977bbbc6cdd9c21576127b58019d9cfd410500.zip
- attach to the startech ICUSB232X, though only the first port can be used
on this multiport device. ok jsg@
-rw-r--r--sys/dev/usb/uticom.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c
index 3419cc14ae2..f88104ec72a 100644
--- a/sys/dev/usb/uticom.c
+++ b/sys/dev/usb/uticom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uticom.c,v 1.8 2010/12/15 11:09:03 jsg Exp $ */
+/* $OpenBSD: uticom.c,v 1.9 2010/12/15 14:55:04 jasper Exp $ */
/*
* Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>.
*
@@ -189,6 +189,11 @@ const struct cfattach uticom_ca = {
uticom_activate,
};
+static const struct usb_devno uticom_devs[] = {
+ { USB_VENDOR_TI, USB_PRODUCT_TI_TUSB3410 },
+ { USB_VENDOR_STARTECH, USB_PRODUCT_STARTECH_ICUSB232X }
+};
+
int
uticom_match(struct device *parent, void *match, void *aux)
{
@@ -197,10 +202,8 @@ uticom_match(struct device *parent, void *match, void *aux)
if (uaa->iface != NULL)
return (UMATCH_NONE);
- if (uaa->vendor == USB_VENDOR_TI &&
- uaa->product == USB_PRODUCT_TI_TUSB3410)
- return (UMATCH_VENDOR_PRODUCT);
- return (0);
+ return (usb_lookup(uticom_devs, uaa->vendor, uaa->product) != NULL ?
+ UMATCH_VENDOR_PRODUCT : UMATCH_NONE);
}
void