Fix for "nomatch" event for ums and ukbd drivers when uhid is loaded.

MFC after:	3 days
This commit is contained in:
Hans Petter Selasky 2011-07-02 20:58:33 +00:00
parent 910f1dcf71
commit 34e5f64b49
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223728

View File

@ -634,6 +634,18 @@ uhid_probe(device_t dev)
if (usb_test_quirk(uaa, UQ_HID_IGNORE))
return (ENXIO);
/*
* Don't attach to mouse and keyboard devices, hence then no
* "nomatch" event is generated and then ums and ukbd won't
* attach properly when loaded.
*/
if ((uaa->info.bInterfaceClass == UICLASS_HID) &&
(uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) &&
((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) ||
(uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) {
return (ENXIO);
}
return (BUS_PROBE_GENERIC);
}