[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/21] usb-redir: Fix printing of device version
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 16/21] usb-redir: Fix printing of device version |
Date: |
Tue, 28 Feb 2012 11:20:25 +0100 |
From: Hans de Goede <address@hidden>
The device version is in bcd format, which requires some special handling to
print.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
usb-redir.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/usb-redir.c b/usb-redir.c
index a59b347..18204be 100644
--- a/usb-redir.c
+++ b/usb-redir.c
@@ -1049,8 +1049,10 @@ static void usbredir_device_connect(void *priv,
usb_redir_cap_connect_device_version)) {
INFO("attaching %s device %04x:%04x version %d.%d class %02x\n",
speed, device_connect->vendor_id, device_connect->product_id,
- device_connect->device_version_bcd >> 8,
- device_connect->device_version_bcd & 0xff,
+ ((device_connect->device_version_bcd & 0xf000) >> 12) * 10 +
+ ((device_connect->device_version_bcd & 0x0f00) >> 8),
+ ((device_connect->device_version_bcd & 0x00f0) >> 4) * 10 +
+ ((device_connect->device_version_bcd & 0x000f) >> 0),
device_connect->device_class);
} else {
INFO("attaching %s device %04x:%04x class %02x\n", speed,
--
1.7.1
- [Qemu-devel] [PATCH 01/21] usb-hid: fix tablet activation, (continued)
- [Qemu-devel] [PATCH 01/21] usb-hid: fix tablet activation, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 02/21] usb-ehci: fix reset, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 06/21] usb-uhci: implement packet queuing, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 08/21] usb: add tracepoint for usb packet state changes., Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 04/21] usb-uhci: add UHCIQueue, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 07/21] usb-xhci: enable packet queuing, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 18/21] usb-redir: Let the usb-host know about our device filtering, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 05/21] usb-uhci: process uhci_handle_td return code via switch., Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 03/21] usb-uhci: cleanup UHCIAsync allocation & initialization., Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 13/21] libcacard: fix reported ATR length, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 16/21] usb-redir: Fix printing of device version,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 09/21] usb-ehci: sanity-check iso xfers, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 19/21] usb-redir: Limit return values returned by iso packets, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 11/21] libcacard: link with glib for g_strndup, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 10/21] usb-desc: fix user trigerrable segfaults (!config), Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 14/21] usb-ehci: Handle ISO packets failing with an error other then NAK, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 20/21] usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 21/21] usb: Resolve warnings about unassigned bus on usb device creation, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 12/21] usb-ccid: advertise SELF_POWERED, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 17/21] usb-redir: Always clear device state on filter reject, Gerd Hoffmann, 2012/02/28
- [Qemu-devel] [PATCH 15/21] ehci: drop old stuff, Gerd Hoffmann, 2012/02/28