diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 634d0e0f5ef..8b0e6e9f75d 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 +/* For hid blacklist quirk */ +#include + #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 0cf4ece99ac..590c517cf62 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 04ba3979d51..9a2c730b0f3 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 a8ed6e759c6..3bc1002c4cb 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