aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-10-22 03:00:25 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-10-22 03:00:25 +0000
commit68ea9fd7d656aac31b647c15aa0867ba99bd0bb6 (patch)
tree386a2ab07c02bbda42e77a975dc8d07544d60052 /sys
parent73ea379e328a8c15c9ae47f6567b400891675fe2 (diff)
downloadsrc-68ea9fd7d656aac31b647c15aa0867ba99bd0bb6.tar.gz
src-68ea9fd7d656aac31b647c15aa0867ba99bd0bb6.zip
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@gmail.com> Reviewed by: hselasky Approved by: cperciva MFC after: 1 week
Notes
Notes: svn path=/head/; revision=241843
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/input/uhid.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c
index bd5af206f0ac..333d43747833 100644
--- a/sys/dev/usb/input/uhid.c
+++ b/sys/dev/usb/input/uhid.c
@@ -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);
}