From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWyM5-0003gQ-5D for qemu-devel@nongnu.org; Fri, 21 Apr 2006 12:19:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWyM3-0003eq-Ek for qemu-devel@nongnu.org; Fri, 21 Apr 2006 12:19:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWyM3-0003en-Cd for qemu-devel@nongnu.org; Fri, 21 Apr 2006 12:19:35 -0400 Received: from [24.93.47.44] (helo=ms-smtp-05.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FWyNd-0005iZ-T3 for qemu-devel@nongnu.org; Fri, 21 Apr 2006 12:21:14 -0400 Received: from [192.168.0.11] (cpe-67-9-160-120.austin.res.rr.com [67.9.160.120]) by ms-smtp-05.texas.rr.com (8.13.4/8.13.4) with ESMTP id k3LGJX5d017126 for ; Fri, 21 Apr 2006 11:19:33 -0500 (CDT) Message-ID: <44490614.50406@austin.rr.com> Date: Fri, 21 Apr 2006 11:19:32 -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> In-Reply-To: <4448FF3F.3030009@austin.rr.com> Content-Type: multipart/mixed; boundary="------------070600050700050804080300" 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. --------------070600050700050804080300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit lo. The attached patch applied on top of your patchset seems to work as far as signaling resume goes. --------------070600050700050804080300 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) @@ -109,7 +111,8 @@ ((s->status & UHCI_STS_USBERR) && (s->intr & (1 << 0))) || ((s->status & UHCI_STS_RD) && (s->intr & (1 << 1))) || (s->status & UHCI_STS_HSERR) || - (s->status & UHCI_STS_HCPERR)) { + (s->status & UHCI_STS_HCPERR) || + ((s->status & UHCI_STS_RD) && (s->intr & (1 << 1)))) { level = 1; } else { level = 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); --------------070600050700050804080300--