Partially revert 1.95. It changed the probe for a mouse device to only

accept a mouse using the boot subclass.  Instead, restore the original
hid_is_collection() test and fallback to testing the interface class,
subclass, and protocol if that fails.

MFC after:	1 week
PR:		usb/118670
This commit is contained in:
John Baldwin 2008-03-12 20:20:36 +00:00
parent 810df80181
commit 4c134f3e80

View file

@ -198,7 +198,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;