From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56038 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pcykz-00066x-Vj for qemu-devel@nongnu.org; Wed, 12 Jan 2011 06:20:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pcykx-0001Z3-PJ for qemu-devel@nongnu.org; Wed, 12 Jan 2011 06:20:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pcykx-0001Yp-Fw for qemu-devel@nongnu.org; Wed, 12 Jan 2011 06:20:47 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0CBKkFP008302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Jan 2011 06:20:46 -0500 From: Gerd Hoffmann Date: Wed, 12 Jan 2011 12:20:03 +0100 Message-Id: <1294831214-4499-22-git-send-email-kraxel@redhat.com> In-Reply-To: <1294831214-4499-1-git-send-email-kraxel@redhat.com> References: <1294831214-4499-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH v4 21/32] usb: hid: change serial number to "42". List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 --- 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