From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJoL9-0007ds-4n for qemu-devel@nongnu.org; Thu, 16 Mar 2006 04:00:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJoL7-0007dK-T1 for qemu-devel@nongnu.org; Thu, 16 Mar 2006 04:00:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJoL7-0007dF-I0 for qemu-devel@nongnu.org; Thu, 16 Mar 2006 04:00:13 -0500 Received: from [24.93.47.40] (helo=ms-smtp-01-eri0.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FJoPj-0001ok-67 for qemu-devel@nongnu.org; Thu, 16 Mar 2006 04:04:59 -0500 Received: from [192.168.0.11] (cpe-67-9-160-120.austin.res.rr.com [67.9.160.120]) by ms-smtp-01-eri0.texas.rr.com (8.13.4/8.13.4) with ESMTP id k2G90ArT028279 for ; Thu, 16 Mar 2006 03:00:11 -0600 (CST) Message-ID: <44192919.6090102@austin.rr.com> Date: Thu, 16 Mar 2006 03:00:09 -0600 From: Lonnie Mendez MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] hw/usb-uhci.c: set hchalt bit of status register when run/stop bit unset Reply-To: 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 Hello list. Linked is a patch that fixes a bug that occurs on Windows XP sp1a - sp2 and perhaps earlier. Windows 2000 seems unaffected. This patch sets the hchalted bit of the status I/O register when the run/stop bit is unset during a write to the usb command I/O register of the emulated uhci host controller. To test simply start Windows XP with '-usb' option and bring up the device manager. The 'generic usb hub' will disappear and appear over and over again. The host controller driver expects hchalted to be set and continues to poll status until it gives up and resets the controller and therefore bus state. Some log output from the transaction below. http://gnome.dnsalias.net/patches/qemu-hchalt.patch uhci readw port=0x0006 val=0x03e5 uhci readw port=0x0000 val=0x0081 uhci writew port=0x0000 val=0x0080 (clears Run/Stop bit) uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 ... doesn't see hchalted being set uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci readw port=0x0002 val=0x0000 uhci writew port=0x0000 val=0x0084 (perform global reset) uhci writew port=0x0000 val=0x0080