From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQigF-00005V-3P for qemu-devel@nongnu.org; Mon, 12 Mar 2007 07:27:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQigC-0008TP-EN for qemu-devel@nongnu.org; Mon, 12 Mar 2007 07:27:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQigC-0008T1-8k for qemu-devel@nongnu.org; Mon, 12 Mar 2007 06:27:04 -0500 Received: from kurt.tools.de ([192.76.135.70]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HQifV-00037t-Oe for qemu-devel@nongnu.org; Mon, 12 Mar 2007 07:26:23 -0400 Message-Id: <200703121126.l2CBQAZH010642@imap.tools.intra> Date: Mon, 12 Mar 2007 12:26:10 +0100 (CET) From: Juergen Keil MIME-Version: 1.0 Content-Type: MULTIPART/mixed; BOUNDARY=Leap_of_Leopards_730_000 Subject: [Qemu-devel] [PATCH] fix usb hid and mass-storage protocol revision Reply-To: Juergen Keil , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-discuss@opensolaris.org --Leap_of_Leopards_730_000 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: yTK3tqJLGkJjD6uLtZKC+g== 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. --Leap_of_Leopards_730_000 Content-Type: TEXT/plain; name="usb10.patch"; charset=us-ascii; x-unix-mode=0777 Content-Description: usb10.patch Content-MD5: fvl2BpIJpC1QFx/D1xLGVg== 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; */ --Leap_of_Leopards_730_000--