From 4da43c5d8b8ae45176399f922936c2accfc2091a Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Wed, 15 Dec 2010 14:55:05 +0000 Subject: - attach to the startech ICUSB232X, though only the first port can be used on this multiport device. ok jsg@ --- sys/dev/usb/uticom.c | 13 ++++++++----- 1 file 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 . * @@ -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 -- cgit v1.2.3