Subject: Re: kern/31884
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Sergey Svishchev <svs@ropnet.ru>
List: netbsd-bugs
Date: 07/01/2006 21:45:02
The following reply was made to PR kern/31884; it has been noted by GNATS.
From: Sergey Svishchev <svs@ropnet.ru>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/31884
Date: Sun, 2 Jul 2006 01:42:58 +0400
The patch does not apply cleanly to -current, here's an updated one:
--- sys/dev/usb/uhidev.c 12 Jun 2006 21:01:58 -0000 1.32
+++ sys/dev/usb/uhidev.c 20 Jun 2006 21:07:51 -0000
@@ -97,6 +97,8 @@
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);
return (UMATCH_IFACECLASS_GENERIC);
}
--- sys/dev/usb/usb_quirks.c 28 Nov 2005 19:37:18 -0000 1.53
+++ sys/dev/usb/usb_quirks.c 1 Jul 2006 21:35:40 -0000
@@ -112,6 +112,7 @@
{ USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY800, ANY, { UQ_BROKEN_BIDIR }},
{ USB_VENDOR_HP, USB_PRODUCT_HP_1220C, ANY, { UQ_BROKEN_BIDIR }},
+ { USB_VENDOR_APC, USB_PRODUCT_APC_UPSPRO500, ANY, { UQ_HID_IGNORE }},
{ 0, 0, 0, { 0 } }
};
--- sys/dev/usb/usb_quirks.h 15 Apr 2001 09:38:01 -0000 1.20
+++ sys/dev/usb/usb_quirks.h 2 Jan 2006 23:25:56 -0000
@@ -54,6 +54,7 @@
#define UQ_AU_INP_ASYNC 0x0800 /* input is async despite claim of adaptive */
#define UQ_ASSUME_CM_OVER_DATA 0x1000 /* modem device breaks on cm over data */
#define UQ_BROKEN_BIDIR 0x2000 /* printer has broken bidir mode */
+#define UQ_HID_IGNORE 0x4000 /* device should be ignored by hid class */
};
extern const struct usbd_quirks usbd_no_quirk;
--
Sergey Svishchev