From 63ba67db3107247786b0941d00a69e37ba3375f1 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 20 Mar 2008 13:07:25 +0000 Subject: [PATCH] MFC: Restore the original hid_is_collection() test and fallback to testing the interface class, subclass, and protocol if that fails. --- sys/dev/usb/ums.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index ca3b5d72eb3..40cf972ba4d 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -197,7 +197,10 @@ ums_match(device_t self) if (err) return (UMATCH_NONE); - if (id->bInterfaceClass == UICLASS_HID && + if (hid_is_collection(desc, size, + HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))) + ret = UMATCH_IFACECLASS; + else if (id->bInterfaceClass == UICLASS_HID && id->bInterfaceSubClass == UISUBCLASS_BOOT && id->bInterfaceProtocol == UIPROTO_MOUSE) ret = UMATCH_IFACECLASS; -- 2.45.2