Author: hselasky
Date: Tue Jul  5 07:05:18 2011
New Revision: 223781
URL: http://svn.freebsd.org/changeset/base/223781

Log:
  MFC r223728.
  Fix for missing nomatch event.

Modified:
  stable/8/sys/dev/usb/input/uhid.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/usb/input/uhid.c
==============================================================================
--- stable/8/sys/dev/usb/input/uhid.c   Tue Jul  5 06:12:28 2011        
(r223780)
+++ stable/8/sys/dev/usb/input/uhid.c   Tue Jul  5 07:05:18 2011        
(r223781)
@@ -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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to