usb/105669: [patch] MetaGeek Wi-Spy device recognized as
keyboard
Henrik Brix Andersen
henrik at brixandersen.dk
Tue Nov 28 05:20:48 PST 2006
The following reply was made to PR usb/105669; it has been noted by GNATS.
From: Henrik Brix Andersen <henrik at brixandersen.dk>
To: bug-followup at FreeBSD.org, henrik at brixandersen.dk
Cc: flz at FreeBSD.org
Subject: Re: usb/105669: [patch] MetaGeek Wi-Spy device recognized as keyboard
Date: Tue, 28 Nov 2006 13:48:02 +0100
Here is an updated patch as discussed with flz on #bsdports. Setting
the UQ_KBD_IGNORE flag now makes both ukbd(4) and uhid(4) ignore the
device.
--- usbdevs.orig Tue Nov 28 12:44:14 2006
+++ usbdevs Tue Nov 28 12:45:10 2006
@@ -804,6 +804,7 @@ product CURITEL PC5740 0x3701 Broadband
/* 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
--- usb_quirks.h.orig Tue Nov 28 12:42:17 2006
+++ usb_quirks.h Tue Nov 28 12:46:04 2006
@@ -55,6 +55,7 @@ struct usbd_quirks {
#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 0x8000 /* device should be ignored by hid class */
+#define UQ_KBD_IGNORE 0x18000 /* device should be ignored by both kbd and hid class */
};
--- usb_quirks.c.orig Tue Nov 28 12:46:30 2006
+++ usb_quirks.c Tue Nov 28 12:47:27 2006
@@ -116,6 +116,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 } }
};
--- ukbd.c.orig Tue Nov 28 12:47:56 2006
+++ ukbd.c Tue Nov 28 12:48:52 2006
@@ -150,6 +150,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);
}
--
Henrik Brix Andersen <henrik at brixandersen.dk>
More information about the freebsd-usb
mailing list