diff options
author | flz <flz@FreeBSD.org> | 2006-11-28 21:13:07 +0000 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2006-11-28 21:13:07 +0000 |
commit | 59f18dfbe9c3652a764b89ec5648fec11acf566f (patch) | |
tree | 2a562110182d3640a586b0b1b5e8ef4de2939cb0 /sys/dev/usb | |
parent | dfdf4ba0350b06f7b9cc2ebd169498996be114eb (diff) | |
download | FreeBSD-src-59f18dfbe9c3652a764b89ec5648fec11acf566f.zip FreeBSD-src-59f18dfbe9c3652a764b89ec5648fec11acf566f.tar.gz |
Add a quirk for devices recognized as usb keyboards not to be hooked by
ukbd(4).
PR: usb/105669
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ukbd.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/usb_quirks.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/usb_quirks.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 9a5baf4..4b45833 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -151,6 +151,9 @@ USB_MATCH(ukbd) if ((*sw->probe)(unit, (void *)arg, 0)) return (UMATCH_NONE); + if (usbd_get_quirks(uaa->device)->uq_flags & UQ_KBD_IGNORE) + return (UMATCH_NONE); + return (UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO); } diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c index 901a6ca..508b653 100644 --- a/sys/dev/usb/usb_quirks.c +++ b/sys/dev/usb/usb_quirks.c @@ -119,6 +119,9 @@ static const struct usbd_quirk_entry { ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2, ANY, { UQ_HID_IGNORE }}, + /* Devices which should be ignored by both ukbd and uhid */ + { USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_WISPY, + ANY, { UQ_KBD_IGNORE }}, { 0, 0, 0, { 0 } } }; diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h index a9a93c4..cb140b9 100644 --- a/sys/dev/usb/usb_quirks.h +++ b/sys/dev/usb/usb_quirks.h @@ -56,6 +56,7 @@ struct usbd_quirks { #define UQ_BROKEN_BIDIR 0x2000 /* printer has broken bidir mode */ #define UQ_OPEN_CLEARSTALL 0x4000 /* device needs clear endpoint stall */ #define UQ_HID_IGNORE 0x8000 /* device should be ignored by hid class */ +#define UQ_KBD_IGNORE 0x18000 /* device should be ignored by both kbd and hid class */ }; diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index bc0a706..78d2e55 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -836,6 +836,7 @@ product CURITEL PC5740 0x3701 Broadband wireless modem /* Cypress Semiconductor products */ product CYPRESS MOUSE 0x0001 mouse product CYPRESS THERMO 0x0002 thermometer +product CYPRESS WISPY 0x0bad MetaGeek Wi-Spy product CYPRESS FMRADIO 0x1002 FM Radio product CYPRESS SLIM_HUB 0x6560 Slim Hub |