summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uts.c
diff options
context:
space:
mode:
authormatthieu <matthieu@openbsd.org>2009-12-05 20:39:31 +0000
committermatthieu <matthieu@openbsd.org>2009-12-05 20:39:31 +0000
commit984f86a3019b5d5d773b94b4eb5af0b8f0cc47eb (patch)
treea69c6d73bd8d41abfeb4c35dcb102e2c87ed5bba /sys/dev/usb/uts.c
parentfix interface tagging listeners in the ipv6 case (diff)
downloadwireguard-openbsd-984f86a3019b5d5d773b94b4eb5af0b8f0cc47eb.tar.xz
wireguard-openbsd-984f86a3019b5d5d773b94b4eb5af0b8f0cc47eb.zip
Ignore HID devices that have the same vendor and product ids than
devices actually supported by this device. The Linux driver confirms they exist. ok miod@ jsg@.
Diffstat (limited to 'sys/dev/usb/uts.c')
-rw-r--r--sys/dev/usb/uts.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index 96ee438f69e..aaa0312a1e0 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.25 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uts.c,v 1.26 2009/12/05 20:39:31 matthieu Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -134,10 +134,16 @@ int
uts_match(struct device *parent, void *match, void *aux)
{
struct usb_attach_arg *uaa = aux;
+ usb_interface_descriptor_t *id;
if (uaa->iface == NULL)
return (UMATCH_NONE);
+ /* Some eGalax touch screens are HID devices. ignore them */
+ id = usbd_get_interface_descriptor(uaa->iface);
+ if (id != NULL && id->bInterfaceClass == UICLASS_HID)
+ return (UMATCH_NONE);
+
return (usb_lookup(uts_devs, uaa->vendor, uaa->product) != NULL) ?
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}