From: matthieu Date: Sun, 28 Dec 2014 15:24:08 +0000 (+0000) Subject: Attach USB HID devices from the Generic Destop page, usage pointer to X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ce776e0eec0d95e024fa93c1c9446027a56ed05e;p=openbsd Attach USB HID devices from the Generic Destop page, usage pointer to ums. This is how the USB Tablet from Qemu in libvirt/kvm shows up and it works with ums(4). ok mpi@ --- diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 8fe5004f60d..2576f414d3a 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ums.c,v 1.39 2014/08/21 14:52:56 mpi Exp $ */ +/* $OpenBSD: ums.c,v 1.40 2014/12/28 15:24:08 matthieu Exp $ */ /* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -94,6 +94,10 @@ ums_match(struct device *parent, void *match, void *aux) uhidev_get_report_desc(uha->parent, &desc, &size); + if (hid_is_collection(desc, size, uha->reportid, + HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_POINTER))) + return (UMATCH_IFACECLASS); + if (hid_is_collection(desc, size, uha->reportid, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))) return (UMATCH_IFACECLASS);