svn commit: r223728 - head/sys/dev/usb/input
Hans Petter Selasky
hselasky at FreeBSD.org
Sat Jul 2 20:58:34 UTC 2011
Author: hselasky
Date: Sat Jul 2 20:58:33 2011
New Revision: 223728
URL: http://svn.freebsd.org/changeset/base/223728
Log:
Fix for "nomatch" event for ums and ukbd drivers when uhid is loaded.
MFC after: 3 days
Modified:
head/sys/dev/usb/input/uhid.c
Modified: head/sys/dev/usb/input/uhid.c
==============================================================================
--- head/sys/dev/usb/input/uhid.c Sat Jul 2 20:26:37 2011 (r223727)
+++ head/sys/dev/usb/input/uhid.c Sat Jul 2 20:58:33 2011 (r223728)
@@ -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);
}
More information about the svn-src-all
mailing list