qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix usb hid and mass-storage protocol revision
@ 2007-03-12 11:26 Juergen Keil
  0 siblings, 0 replies; only message in thread
From: Juergen Keil @ 2007-03-12 11:26 UTC (permalink / raw)
  To: qemu-devel, qemu-discuss

[-- Attachment #1: Type: TEXT/plain, Size: 634 bytes --]


Minor nit:

When booting a Solaris x86 kernel with verbose kernel messages enabled
inside qemu, with an usb hid or usb mass-storage device, then the Solaris 
kernel reports these usb devices as implementing "USB 0.10" protocol.
The comment in the code tells me these device implement v1.0 protocol.

The 16-bit bcdUSB word word in the device descriptor has the protocol
revision swapped and uses a slightly wrong value.  Probably a typo after
copying the descriptor data from the hw/usb-hub.c file, which uses
v1.1 USB protocol.


The attached patch fixes the usb hid and mass-storage protocol revision
to report "USB 1.0" protocol.

[-- Attachment #2: usb10.patch --]
[-- Type: TEXT/plain, Size: 988 bytes --]

diff -ru /tmp/qemu-cvs/hw/usb-hid.c qemu-cvs/hw/usb-hid.c
--- /tmp/qemu-cvs/hw/usb-hid.c	2006-08-29 20:11:47.000000000 +0200
+++ qemu-cvs/hw/usb-hid.c	2007-01-28 12:58:21.779608666 +0100
@@ -45,7 +45,7 @@
 static const uint8_t qemu_mouse_dev_descriptor[] = {
 	0x12,       /*  u8 bLength; */
 	0x01,       /*  u8 bDescriptorType; Device */
-	0x10, 0x00, /*  u16 bcdUSB; v1.0 */
+	0x00, 0x01, /*  u16 bcdUSB; v1.0 */
 
 	0x00,	    /*  u8  bDeviceClass; */
 	0x00,	    /*  u8  bDeviceSubClass; */
diff -ru /tmp/qemu-cvs/hw/usb-msd.c qemu-cvs/hw/usb-msd.c
--- /tmp/qemu-cvs/hw/usb-msd.c	2006-08-29 20:11:47.000000000 +0200
+++ qemu-cvs/hw/usb-msd.c	2007-01-28 12:58:06.636790927 +0100
@@ -66,7 +66,7 @@
 static const uint8_t qemu_msd_dev_descriptor[] = {
 	0x12,       /*  u8 bLength; */
 	0x01,       /*  u8 bDescriptorType; Device */
-	0x10, 0x00, /*  u16 bcdUSB; v1.0 */
+	0x00, 0x01, /*  u16 bcdUSB; v1.0 */
 
 	0x00,	    /*  u8  bDeviceClass; */
 	0x00,	    /*  u8  bDeviceSubClass; */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-12 11:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-12 11:26 [Qemu-devel] [PATCH] fix usb hid and mass-storage protocol revision Juergen Keil

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).