diff options
-rw-r--r-- | sys/dev/usb/usbdevs | 3 | ||||
-rw-r--r-- | sys/dev/usb/uvideo.c | 22 |
2 files changed, 18 insertions, 7 deletions
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 755a8bedfd5..8dc163d844d 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$OpenBSD: usbdevs,v 1.737 2021/04/05 16:17:25 landry Exp $ +$OpenBSD: usbdevs,v 1.738 2021/04/05 20:45:49 mglocker Exp $ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ /* @@ -1338,6 +1338,7 @@ product CHICONY RTL8188CUS_3 0xaff9 RTL8188CUS product CHICONY RTL8188CUS_4 0xaffa RTL8188CUS product CHICONY RTL8188CUS_5 0xaffb RTL8188CUS product CHICONY RTL8188CUS_6 0xaffc RTL8188CUS +product CHICONY IRCAMERA 0xb615 Integrated IR Camera /* CH Products */ product CHPRODUCTS PROTHROTTLE 0x00f1 Pro Throttle diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index d18827d5b0c..79297d8935f 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.211 2021/01/27 17:28:19 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.212 2021/04/05 20:45:49 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -307,6 +307,7 @@ struct video_hw_if uvideo_hw_if = { #define UVIDEO_FLAG_ISIGHT_STREAM_HEADER 0x1 #define UVIDEO_FLAG_REATTACH 0x2 #define UVIDEO_FLAG_VENDOR_CLASS 0x4 +#define UVIDEO_FLAG_NOATTACH 0x8 struct uvideo_devs { struct usb_devno uv_dev; char *ucode_name; @@ -382,6 +383,12 @@ struct uvideo_devs { NULL, UVIDEO_FLAG_VENDOR_CLASS }, + { /* Infrared camera not supported */ + { USB_VENDOR_CHICONY, USB_PRODUCT_CHICONY_IRCAMERA }, + NULL, + NULL, + UVIDEO_FLAG_NOATTACH + }, }; #define uvideo_lookup(v, p) \ ((struct uvideo_devs *)usb_lookup(uvideo_devs, v, p)) @@ -480,13 +487,12 @@ uvideo_match(struct device *parent, void *match, void *aux) if (id == NULL) return (UMATCH_NONE); - if (id->bInterfaceClass == UICLASS_VIDEO && - id->bInterfaceSubClass == UISUBCLASS_VIDEOCONTROL) - return (UMATCH_VENDOR_PRODUCT_CONF_IFACE); - - /* quirk devices which we want to attach */ + /* quirk devices */ quirk = uvideo_lookup(uaa->vendor, uaa->product); if (quirk != NULL) { + if (quirk->flags & UVIDEO_FLAG_NOATTACH) + return (UMATCH_NONE); + if (quirk->flags & UVIDEO_FLAG_REATTACH) return (UMATCH_VENDOR_PRODUCT_CONF_IFACE); @@ -496,6 +502,10 @@ uvideo_match(struct device *parent, void *match, void *aux) return (UMATCH_VENDOR_PRODUCT_CONF_IFACE); } + if (id->bInterfaceClass == UICLASS_VIDEO && + id->bInterfaceSubClass == UISUBCLASS_VIDEOCONTROL) + return (UMATCH_VENDOR_PRODUCT_CONF_IFACE); + return (UMATCH_NONE); } |