From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWzRI-0006ef-BV for qemu-devel@nongnu.org; Fri, 21 Apr 2006 13:29:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWzRG-0006eS-Lo for qemu-devel@nongnu.org; Fri, 21 Apr 2006 13:29:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWzRG-0006eP-FV for qemu-devel@nongnu.org; Fri, 21 Apr 2006 13:29:02 -0400 Received: from [24.93.47.40] (helo=ms-smtp-01.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FWzSr-0004zE-Js for qemu-devel@nongnu.org; Fri, 21 Apr 2006 13:30:41 -0400 Received: from [192.168.0.11] (cpe-67-9-160-120.austin.res.rr.com [67.9.160.120]) by ms-smtp-01.texas.rr.com (8.13.4/8.13.4) with ESMTP id k3LHSwrg012178 for ; Fri, 21 Apr 2006 12:28:58 -0500 (CDT) Message-ID: <44491659.30804@austin.rr.com> Date: Fri, 21 Apr 2006 12:28:57 -0500 From: Lonnie Mendez MIME-Version: 1.0 Subject: Re: [Qemu-devel] Large USB patch References: <4447E811.1040403@gmx.de> <4448F1F6.4090609@austin.rr.com> <4448FF3F.3030009@austin.rr.com> <44490614.50406@austin.rr.com> <44490852.2080608@gmx.de> In-Reply-To: <44490852.2080608@gmx.de> Content-Type: multipart/mixed; boundary="------------080609030704010108090602" 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 This is a multi-part message in MIME format. --------------080609030704010108090602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit nix.wie.weg@gmx.de wrote: >you are too fast for me :) > Had to rediff it. Fabrice already put the necessary bits in uhci_update_irq. Right in front of my eyes too. There is some funkiness going on with removing the device in the linux guest once attached. Not sure what it is yet. --------------080609030704010108090602 Content-Type: text/plain; name="qemu-usb-resume.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-usb-resume.diff" --- a/qemu/hw/usb-uhci.c 2006-04-21 11:15:40.000000000 -0500 +++ b/qemu/hw/usb-uhci.c 2006-04-21 11:17:08.000000000 -0500 @@ -32,6 +32,8 @@ // #define DEBUG // #define DEBUG_PACKET +#define UHCI_CMD_FGR (1 << 4) +#define UHCI_CMD_EGSM (1 << 3) #define UHCI_CMD_GRESET (1 << 2) #define UHCI_CMD_HCRESET (1 << 1) #define UHCI_CMD_RS (1 << 0) @@ -188,7 +191,7 @@ /* start frame processing */ qemu_mod_timer(s->frame_timer, qemu_get_clock(vm_clock)); s->status &= ~UHCI_STS_HCHALTED; - } else if (!(val & UHCI_CMD_RS) && !(s->cmd & UHCI_CMD_RS)) { + } else if (!(val & UHCI_CMD_RS)) { s->status |= UHCI_STS_HCHALTED; } if (val & UHCI_CMD_GRESET) { @@ -335,6 +338,14 @@ UHCIState *s = hub->opaque; UHCIPort *port; int i; + + // wakeup the controller if suspended + if (s->cmd & UHCI_CMD_EGSM) { + s->cmd |= UHCI_CMD_FGR; + s->status |= UHCI_STS_RD; + uhci_update_irq(s); + } + if (dev) { if( portnum >= NB_PORTS ) { #ifdef DEBUG @@ -575,8 +586,6 @@ if (!(s->cmd & UHCI_CMD_RS)) { qemu_del_timer(s->frame_timer); - /* set hchalted bit in status - UHCI11D 2.1.2 */ - s->status |= UHCI_STS_HCHALTED; return; } frame_addr = s->fl_base_addr + ((s->frnum & 0x3ff) << 2); --------------080609030704010108090602--