From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiDEl-0000Ui-VJ for qemu-devel@nongnu.org; Mon, 22 May 2006 12:26:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiDEj-0000UV-V7 for qemu-devel@nongnu.org; Mon, 22 May 2006 12:26:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiDEj-0000US-QJ for qemu-devel@nongnu.org; Mon, 22 May 2006 12:26:29 -0400 Received: from [24.93.47.43] (helo=ms-smtp-04.texas.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiDIl-0008Ma-A3 for qemu-devel@nongnu.org; Mon, 22 May 2006 12:30:39 -0400 Received: from [192.168.0.11] (cpe-67-9-160-120.austin.res.rr.com [67.9.160.120]) by ms-smtp-04.texas.rr.com (8.13.6/8.13.6) with ESMTP id k4MGQQDK017894 for ; Mon, 22 May 2006 11:26:27 -0500 (CDT) Message-ID: <4471E631.70007@austin.rr.com> Date: Mon, 22 May 2006 11:26:25 -0500 From: Lonnie Mendez MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050700010205030707050504" Subject: [Qemu-devel] [usb] signal RHSC in ohci_attach 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. --------------050700010205030707050504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The attached patch signals root hub status change interrupt for attach/detach in ohci_attach. --------------050700010205030707050504 Content-Type: text/plain; name="qemu-ohci-rhsc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-ohci-rhsc.diff" --- qemu/hw/usb-ohci.c 2006-05-22 11:02:16.000000000 -0500 +++ qemu/hw/usb-ohci.c 2006-05-22 11:22:46.000000000 -0500 @@ -252,6 +252,7 @@ { OHCIState *s = port1->opaque; OHCIPort *port = &s->rhport[port1->index]; + uint32_t old_state = port->ctrl; if (dev) { if (port->port.dev) { @@ -290,6 +291,9 @@ port->port.dev = NULL; dprintf("usb-ohci: Detached port %d\n", port1->index); } + + if (old_state != port->ctrl) + ohci_set_interrupt(s, OHCI_INTR_RHSC); } /* Reset the controller */ --------------050700010205030707050504--