Hi,
This patch makes a "Saitek X6-34U" gamepad useful with Linux.
It seems that the device reports itself with device class == 0.
Forcing hid.c to accept it fixes the problem.
The patch is against linux-2.2.19
vendor URL: http://www.mega-world.com/mx-634.htm
logs:
May 1 19:42:49 maxine kernel: usb.c: USB new device connect, assigned
device nu
mber 2
May 1 19:42:49 maxine kernel: Manufacturer: Mega World
May 1 19:42:49 maxine kernel: Product: USB Game Pad
May 1 19:42:49 maxine kernel: usb.c: USB device 2 (prod/vend
0x7b5/0x9902) is n
ot claimed by any active driver.
May 1 19:42:49 maxine kernel: Length = 18
May 1 19:42:49 maxine kernel: DescriptorType = 01
May 1 19:42:49 maxine kernel: USB version = 1.00
May 1 19:42:49 maxine kernel: Vendor:Product = 07b5:9902
May 1 19:42:49 maxine kernel: MaxPacketSize0 = 8
May 1 19:42:49 maxine kernel: NumConfigurations = 1
May 1 19:42:49 maxine kernel: Device version = 1.00
May 1 19:42:49 maxine kernel: Device Class:SubClass:Protocol =
00:00:00
Please CC me, I'm not on the list.
Thanks /
magnus
--- linux-2.2.19-original/drivers/usb/hid.c Sun Mar 25 18:37:37 2001
+++ linux-2.2.19/drivers/usb/hid.c Tue May 1 22:36:38 2001
@@ -1370,6 +1370,17 @@
{ 0, 0 }
};
+#define USB_VENDOR_ID_MEGAWORLD 0x07b5
+#define USB_DEVICE_ID_MEGAWORLD_USB_GAMEPAD 0x9902
+
+struct hid_forcelist {
+ __u16 idVendor;
+ __u16 idProduct;
+} hid_forcelist[] = {
+ { USB_VENDOR_ID_MEGAWORLD, USB_DEVICE_ID_MEGAWORLD_USB_GAMEPAD },
+ { 0, 0 }
+};
+
static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum, char
*name)
{
struct usb_interface_descriptor *interface =
dev->actconfig->interface[ifnum].altsetting + 0;
@@ -1382,7 +1393,11 @@
if ((hid_blacklist[n].idVendor == dev->descriptor.idVendor) &&
(hid_blacklist[n].idProduct == dev->descriptor.idProduct))
return NULL;
- if (interface->bInterfaceClass != USB_INTERFACE_CLASS_HID)
+ for (n = 0; hid_forcelist[n].idVendor; n++)
+ if ((hid_forcelist[n].idVendor == dev->descriptor.idVendor) &&
+ (hid_forcelist[n].idProduct == dev->descriptor.idProduct)) break;
+
+ if (!hid_forcelist[n].idVendor && interface->bInterfaceClass !=
+USB_INTERFACE_CLASS_HID)
return NULL;
if (usb_get_extra_descriptor(interface, USB_DT_HID, &hdesc)