qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 21/30] usb: hid: change serial number to "42".
Date: Fri, 17 Dec 2010 12:26:37 +0100	[thread overview]
Message-ID: <1292585206-24862-22-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1292585206-24862-1-git-send-email-kraxel@redhat.com>

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 <kraxel@redhat.com>
---
 hw/usb-hid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index 60fa57f..1fec163 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -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",
-- 
1.7.1

  parent reply	other threads:[~2010-12-17 11:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17 11:26 [Qemu-devel] [PATCH 00/30] usb descriptor overhaul + more Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 01/30] usb: update MAINTAINERS Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 02/30] usb: data structs and helpers for usb descriptors Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 03/30] usb hid: use new descriptor infrastructure Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 04/30] usb serial: " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 05/30] usb storage: " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 06/30] usb wacom: " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 07/30] usb bluetooth: " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 08/30] usb hub: " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 09/30] usb descriptors: add settable strings Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 10/30] usb storage: serial number support Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 11/30] usb network: use new descriptor infrastructure Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 12/30] usb: move USB_REQ_SET_ADDRESS handling to common code Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 13/30] usb: move USB_REQ_{GET, SET}_CONFIGURATION " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 14/30] usb: move remote wakeup " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 15/30] usb: create USBPortOps, move attach there Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 16/30] usb: rework attach/detach workflow Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 17/30] usb: add usb_wakeup() + wakeup callback to port ops Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 18/30] usb: uhci: remote wakeup support Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 19/30] usb: hub: " Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 20/30] usb: hid: " Gerd Hoffmann
2010-12-17 11:26 ` Gerd Hoffmann [this message]
2010-12-17 11:26 ` [Qemu-devel] [PATCH 22/30] usb: add speed mask to ports Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 23/30] usb: add attach callback Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 24/30] usb: add usb_desc_attach Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 25/30] usb: add device qualifier support Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 26/30] usb storage: high speed support Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 27/30] usb storage: fix status reporting Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 28/30] usb storage: handle long responses Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 29/30] usb: keep track of physical port address Gerd Hoffmann
2010-12-17 11:26 ` [Qemu-devel] [PATCH 30/30] usb: add port property Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292585206-24862-22-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).