]> Git Repo - qemu.git/commitdiff
usb: hid: change serial number to "42".
authorGerd Hoffmann <[email protected]>
Tue, 14 Dec 2010 15:46:40 +0000 (16:46 +0100)
committerGerd Hoffmann <[email protected]>
Tue, 11 Jan 2011 16:01:03 +0000 (17:01 +0100)
It would be nice to have some way to signal our hid devices support
remote wakeup.  There is a descriptor bit for that of course.  Problem
with using is one is that older qemu versions used to set the bit even
though they did *not* support remote wakeup.  Bummer.

This patch changes the serial number of our hid devices from "1" to "42"
to signal "it is safe to enable remote wakeup".  The serial number was
choosen because it isn't used for anything and it is available in sysfs
so it is easy to match it using udev rules like this:

ACTION=="add", SUBSYSTEM=="usb", \
ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", \
RUN+="usb_enable_autosuspend %p"

Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb-hid.c

index 60fa57fd9c4ab2664a126610b689b3d7cb5fd1c4..1fec163d05893b4a1101ee635305a736fbddb468 100644 (file)
@@ -90,7 +90,7 @@ static const USBDescStrings desc_strings = {
     [STR_PRODUCT_MOUSE]    = "QEMU USB Mouse",
     [STR_PRODUCT_TABLET]   = "QEMU USB Tablet",
     [STR_PRODUCT_KEYBOARD] = "QEMU USB Keyboard",
-    [STR_SERIALNUMBER]     = "1",
+    [STR_SERIALNUMBER]     = "42", /* == remote wakeup works */
     [STR_CONFIG_MOUSE]     = "HID Mouse",
     [STR_CONFIG_TABLET]    = "HID Tablet",
     [STR_CONFIG_KEYBOARD]  = "HID Keyboard",
This page took 0.028686 seconds and 4 git commands to generate.