diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index dd3cc78613a..998fe297d31 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.265 2025/09/06 13:45:41 kirill Exp $ */ +/* $OpenBSD: uvideo.c,v 1.266 2026/06/02 20:33:29 kirill Exp $ */ /* * Copyright (c) 2008 Robert Nagy @@ -386,12 +386,42 @@ const struct uvideo_devs { NULL, UVIDEO_FLAG_ISIGHT_STREAM_HEADER }, + { /* Incorrectly reports as bInterfaceClass=UICLASS_VENDOR */ + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMFUSION_1 }, + NULL, + NULL, + UVIDEO_FLAG_VENDOR_CLASS + }, + { /* Incorrectly reports as bInterfaceClass=UICLASS_VENDOR */ + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMORBITMP_1 }, + NULL, + NULL, + UVIDEO_FLAG_VENDOR_CLASS + }, + { /* Incorrectly reports as bInterfaceClass=UICLASS_VENDOR */ + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMNBPRO }, + NULL, + NULL, + UVIDEO_FLAG_VENDOR_CLASS + }, + { /* Incorrectly reports as bInterfaceClass=UICLASS_VENDOR */ + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMPRO5K_1 }, + NULL, + NULL, + UVIDEO_FLAG_VENDOR_CLASS + }, { /* Incorrectly reports as bInterfaceClass=UICLASS_VENDOR */ { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMOEM_1 }, NULL, NULL, UVIDEO_FLAG_VENDOR_CLASS }, + { /* Incorrectly reports as bInterfaceClass=UICLASS_VENDOR */ + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMOEM_2 }, + NULL, + NULL, + UVIDEO_FLAG_VENDOR_CLASS + }, { /* Infrared camera not supported */ { USB_VENDOR_CHICONY, USB_PRODUCT_CHICONY_IRCAMERA }, NULL, @@ -560,6 +590,9 @@ uvideo_attach(struct device *parent, struct device *self, void *aux) sc->sc_udev = uaa->device; + /* maybe the device has quirks */ + sc->sc_quirk = uvideo_lookup(uaa->vendor, uaa->product); + /* Find the first unclaimed video interface. */ for (i = 0; i < uaa->nifaces; i++) { if (usbd_iface_claimed(sc->sc_udev, i)) @@ -569,6 +602,10 @@ uvideo_attach(struct device *parent, struct device *self, void *aux) continue; if (id->bInterfaceClass == UICLASS_VIDEO) break; + if (sc->sc_quirk != NULL && + sc->sc_quirk->flags & UVIDEO_FLAG_VENDOR_CLASS && + id->bInterfaceClass == UICLASS_VENDOR) + break; } if (i == uaa->nifaces) { printf("%s: can't find video interface\n", DEVNAME(sc)); @@ -613,9 +650,6 @@ uvideo_attach(struct device *parent, struct device *self, void *aux) sc->sc_iface = iad->bFirstInterface; sc->sc_nifaces = iad->bInterfaceCount; - /* maybe the device has quirks */ - sc->sc_quirk = uvideo_lookup(uaa->vendor, uaa->product); - if (sc->sc_quirk && sc->sc_quirk->flags & UVIDEO_FLAG_NOATTACH) { printf("%s: device not supported\n", DEVNAME(sc)); return;