svn commit: r241843 - head/sys/dev/usb/input

Eitan Adler eadler at FreeBSD.org
Mon Oct 22 03:00:27 UTC 2012


Author: eadler
Date: Mon Oct 22 03:00:25 2012
New Revision: 241843
URL: http://svn.freebsd.org/changeset/base/241843

Log:
  Make uhid attach to devices that look like keyboards
  or mice if the quirk which prevents higher level
  drivers from attaching is set.
  
  PR:		usb/172458
  Submitted by:	Vitaly Magerya <vmagerya at gmail.com>
  Reviewed by:	hselasky
  Approved by:	cperciva
  MFC after:	1 week

Modified:
  head/sys/dev/usb/input/uhid.c

Modified: head/sys/dev/usb/input/uhid.c
==============================================================================
--- head/sys/dev/usb/input/uhid.c	Mon Oct 22 03:00:20 2012	(r241842)
+++ head/sys/dev/usb/input/uhid.c	Mon Oct 22 03:00:25 2012	(r241843)
@@ -691,10 +691,11 @@ uhid_probe(device_t dev)
 	 */
 	if ((uaa->info.bInterfaceClass == UICLASS_HID) &&
 	    (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) &&
-	    ((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) ||
-	     (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) {
+	    (((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) &&
+	      !usb_test_quirk(uaa, UQ_KBD_IGNORE)) ||
+	     ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) &&
+	      !usb_test_quirk(uaa, UQ_UMS_IGNORE))))
 		return (ENXIO);
-	}
 
 	return (BUS_PROBE_GENERIC);
 }


More information about the svn-src-all mailing list