Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2011 07:05:18 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r223781 - stable/8/sys/dev/usb/input
Message-ID:  <201107050705.p6575I9v052636@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107050705.p6575I9v052636>