From 68ea9fd7d656aac31b647c15aa0867ba99bd0bb6 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:25 +0000 Subject: [PATCH] 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 Reviewed by: hselasky Approved by: cperciva MFC after: 1 week --- sys/dev/usb/input/uhid.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index bd5af206f0a..333d4374783 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); } -- 2.45.2