Since Greg did not like my idea of changing the HID blacklist to ranges of PIDs i offer the minimal change for our devices. I still think the idea of ranges in the blacklist is a good one. It would make the handling more uniform. No special code for Wacom and our devices needed then.

The change puts all Code Mercenaries (VID 0x07c0) IOWarriors (PIDs 0x1500 to 0x15ff) on the blacklist. The range of PIDs has been reserved for IOWarriors. Only 5 PIDs are really used yet.

The diff is from drivers/usb/input/hid-core.c of 2.6.21-rc2

BTW it seems that many devices are on the HID blacklist just to avoid the HID input system picking them up. Why does the HID input system access generic HID devices at all?
--- hid-core.c  2007-02-28 05:59:12.000000000 +0100
+++ hid-core.c.new      2007-03-02 08:54:08.000000000 +0100
@@ -689,10 +689,8 @@
 #define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802
 
 #define USB_VENDOR_ID_CODEMERCS                0x07c0
-#define USB_DEVICE_ID_CODEMERCS_IOW40  0x1500
-#define USB_DEVICE_ID_CODEMERCS_IOW24  0x1501
-#define USB_DEVICE_ID_CODEMERCS_IOW48  0x1502
-#define USB_DEVICE_ID_CODEMERCS_IOW28  0x1503
+#define USB_DEVICE_ID_CODEMERCS_IOW_FIRST      0x1500
+#define USB_DEVICE_ID_CODEMERCS_IOW_LAST       0x15ff
 
 #define USB_VENDOR_ID_DELORME          0x1163
 #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
@@ -788,10 +786,6 @@
        { USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, 
HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, 
HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, 
HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, 
HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, 
HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE 
},
        { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_ULTRAMOUSE, 
HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, 
HID_QUIRK_IGNORE },
@@ -1052,9 +1046,14 @@
        int n, len, insize = 0;
        struct usbhid_device *usbhid;
 
-        /* Ignore all Wacom devices */
-        if (le16_to_cpu(dev->descriptor.idVendor) == USB_VENDOR_ID_WACOM)
-                return NULL;
+       /* Ignore all Wacom devices */
+       if (le16_to_cpu(dev->descriptor.idVendor) == USB_VENDOR_ID_WACOM)
+               return NULL;
+       /* ignore all Code Mercenaries IOWarrior devices */
+       if (le16_to_cpu(dev->descriptor.idVendor) == USB_VENDOR_ID_CODEMERCS)
+               if (le16_to_cpu(dev->descriptor.idProduct) >= 
USB_DEVICE_ID_CODEMERCS_IOW_FIRST &&
+                   le16_to_cpu(dev->descriptor.idProduct) <= 
USB_DEVICE_ID_CODEMERCS_IOW_LAST)
+                       return NULL;
 
        for (n = 0; hid_blacklist[n].idVendor; n++)
                if ((hid_blacklist[n].idVendor == 
le16_to_cpu(dev->descriptor.idVendor)) &&
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to