HID gadget bDeviceClass bug with a VIA VL800 USB controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We're using the HID gadget driver as the basis for a multi-touch gadget driver. When connected to a VIA VL800 (3.0) USB controller, Windows 7 says:

"Hardware Id Missing. Windows cannot identify the device plugged into the VIA USB 2 Hub".

The following patch fixes that problem (and works fine with other USB controller drivers, at least Renesas and Intel).

http://www.usb.org/developers/devclass_docs/HID1_11.pdf is quite specific about the HID device class:

"The bDeviceClass and bDeviceSubClass fields in the Device Descriptor should not be used to identify a device as belonging to the HID class. Instead use the bInterfaceClass and bInterfaceSubClass fields in the Interface descriptor."

I couldn't find the original rationale for setting the device class to "misc" (0xEF).

diff --git a/drivers/usb/gadget/hid.c b/drivers/usb/gadget/hid.c
index f888c3e..3493adf 100644
--- a/drivers/usb/gadget/hid.c
+++ b/drivers/usb/gadget/hid.c
@@ -60,9 +60,9 @@ static struct usb_device_descriptor device_desc = {
        /* .bDeviceClass =              USB_CLASS_COMM, */
        /* .bDeviceSubClass =   0, */
        /* .bDeviceProtocol =   0, */
-       .bDeviceClass =         0xEF,
-       .bDeviceSubClass =      2,
-       .bDeviceProtocol =      1,
+       .bDeviceClass =         USB_CLASS_PER_INTERFACE,
+       .bDeviceSubClass =      0,
+       .bDeviceProtocol =      0,
        /* .bMaxPacketSize0 = f(hardware) */


--
Orjan Friberg
FlatFrog Laboratories AB
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux