summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-05-14 12:00:05 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-05-14 12:00:05 +0000
commite58dea0638ed14f747e547f4c6ee5161aaf156cc (patch)
tree42fb4065bf34e841e35a90e65d12f0cd10bb9c10 /sys/dev/usb
parent8ae05df04c7122306d1cf9d2eacde3fab73f75fb (diff)
Add a quirk to force the Wi-spy spectrum analyser to attach as ugen.
It claims to be a HID device, but it's not really one. ok miod@, jsg@.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/uhidev.c4
-rw-r--r--sys/dev/usb/usb_quirks.c3
-rw-r--r--sys/dev/usb/usb_quirks.h3
3 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index 6c8a77ea356..ef45c247404 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.13 2006/03/07 04:41:19 krw Exp $ */
+/* $OpenBSD: uhidev.c,v 1.14 2006/05/14 12:00:04 matthieu Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -96,6 +96,8 @@ USB_MATCH(uhidev)
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_BAD_HID)
+ return (UMATCH_NONE);
if (uaa->matchlvl)
return (uaa->matchlvl);
return (UMATCH_IFACECLASS_GENERIC);
diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c
index 96c725cf847..37ee03df535 100644
--- a/sys/dev/usb/usb_quirks.c
+++ b/sys/dev/usb/usb_quirks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_quirks.c,v 1.21 2006/03/31 04:35:39 drahn Exp $ */
+/* $OpenBSD: usb_quirks.c,v 1.22 2006/05/14 12:00:04 matthieu Exp $ */
/* $NetBSD: usb_quirks.c,v 1.45 2003/05/10 17:47:14 hamajima Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $ */
@@ -127,6 +127,7 @@ Static const struct usbd_quirk_entry {
{ USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY760, ANY, { UQ_BROKEN_BIDIR }},
{ USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY920, ANY, { UQ_BROKEN_BIDIR }},
{ USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY800, ANY, { UQ_BROKEN_BIDIR }},
+ { USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPY, ANY, { UQ_BAD_HID }},
{ 0, 0, 0, { 0 } }
};
diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h
index 99ae4757537..1abeb9f691c 100644
--- a/sys/dev/usb/usb_quirks.h
+++ b/sys/dev/usb/usb_quirks.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_quirks.h,v 1.9 2001/10/31 04:24:44 nate Exp $ */
+/* $OpenBSD: usb_quirks.h,v 1.10 2006/05/14 12:00:04 matthieu Exp $ */
/* $NetBSD: usb_quirks.h,v 1.20 2001/04/15 09:38:01 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.h,v 1.9 1999/11/12 23:31:03 n_hibma Exp $ */
@@ -55,6 +55,7 @@ struct usbd_quirks {
#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_BAD_HID 0x4000 /* device claims uhid, but isn't */
};
extern const struct usbd_quirks usbd_no_quirk;