diff options
author | flz <flz@FreeBSD.org> | 2005-12-27 23:35:38 +0000 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-12-27 23:35:38 +0000 |
commit | f054cdc2899697011957bde7ec0dff4df47250f0 (patch) | |
tree | 56771737926fd18136fcb1b78067ca9c144774bb /sys/dev | |
parent | c11d01f58c2a77cbed7a38ed8970e0435a2c63d6 (diff) | |
download | FreeBSD-src-f054cdc2899697011957bde7ec0dff4df47250f0.zip FreeBSD-src-f054cdc2899697011957bde7ec0dff4df47250f0.tar.gz |
Add a hid blacklist quirk.
PR: usb/80383
Submitted by: Lonnie Mendez <lmendez19@austin.rr.com>
Tested by: Adam Kropelin <akropel1@rochester.rr.com>, thierry, fenner
Approved by: pjd
MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uhid.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/usb_quirks.c | 9 | ||||
-rw-r--r-- | sys/dev/usb/usb_quirks.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs | 6 |
4 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 634d0e0..8b0e6e9 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -92,6 +92,9 @@ __FBSDID("$FreeBSD$"); /* Report descriptor for broken Wacom Graphire */ #include <dev/usb/ugraphire_rdesc.h> +/* For hid blacklist quirk */ +#include <dev/usb/usb_quirks.h> + #ifdef USB_DEBUG #define DPRINTF(x) if (uhiddebug) logprintf x #define DPRINTFN(n,x) if (uhiddebug>(n)) logprintf x @@ -192,6 +195,8 @@ USB_MATCH(uhid) id = usbd_get_interface_descriptor(uaa->iface); if (id == NULL || id->bInterfaceClass != UICLASS_HID) return (UMATCH_NONE); + if (usbd_get_quirks(uaa->device)->uq_flags & UQ_HID_IGNORE) + return (UMATCH_NONE); #if 0 if (uaa->matchlvl) return (uaa->matchlvl); diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c index 0cf4ece..590c517 100644 --- a/sys/dev/usb/usb_quirks.c +++ b/sys/dev/usb/usb_quirks.c @@ -104,6 +104,15 @@ Static const struct usbd_quirk_entry { ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX, 0x100, { UQ_ASSUME_CM_OVER_DATA }}, + /* Devices which should be ignored by uhid */ + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, + ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE, + ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1, + ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2, + ANY, { UQ_HID_IGNORE }}, { 0, 0, 0, { 0 } } }; diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h index 04ba397..9a2c730 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_NO_OPEN_CLEARSTALL 0x4000 /* don't usbd_clear_endpoint_stall() */ /* in usbd_setup_pipe() */ +#define UQ_HID_IGNORE 0x8000 /* device should be ignored by hid class */ }; diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index a8ed6e7..3bc1002 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -631,7 +631,7 @@ product ALTEC ADA70 0x0070 ADA70 Speakers product ALTEC ASC495 0xff05 ASC495 Speakers /* American Power Conversion products */ -product APC UPSPRO500 0x0002 Back-UPS Pro 500 +product APC UPS 0x0002 Uninterruptible Power Supply /* Anchor products */ product ANCHOR EZUSB 0x2131 EZUSB @@ -1158,6 +1158,10 @@ product MELCO KG54AI 0x0067 WLI-U2-KG54-AI WLAN /* Metricom products */ product METRICOM RICOCHET_GS 0x0001 Ricochet GS +/* MGE UPS Systems */ +product MGE UPS1 0x0001 MGE UPS SYSTEMS PROTECTIONCENTER 1 +product MGE UPS2 0xffff MGE UPS SYSTEMS PROTECTIONCENTER 2 + /* Micro Star International products */ product MSI BT_DONGLE 0x1967 Bluetooth USB dongle product MSI RT2570 0x6861 RT2570 |