From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GlZTl-0003nN-Mu for qemu-devel@nongnu.org; Sat, 18 Nov 2006 18:20:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GlZTk-0003mQ-K7 for qemu-devel@nongnu.org; Sat, 18 Nov 2006 18:20:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlZTk-0003mK-Fz for qemu-devel@nongnu.org; Sat, 18 Nov 2006 18:20:08 -0500 Received: from [64.233.182.188] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GlZTk-0004ur-0J for qemu-devel@nongnu.org; Sat, 18 Nov 2006 18:20:08 -0500 Received: by nf-out-0910.google.com with SMTP id c31so3274208nfb for ; Sat, 18 Nov 2006 15:20:07 -0800 (PST) From: "Andrzej Zaborowski" Date: Sun, 19 Nov 2006 02:21:10 +0100 Message-Id: <1163899270216-git-send-email-balrog@zabor.org> Sender: andrzej zaborowski Subject: [Qemu-devel] Wake OHCI up on device attach. Reply-To: balrogg@gmail.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel This makes linux detect new devices when they're attached with "usb_add", if anyone cares. OHCI manual (I checked in PXA27x manual to be exact) says a remote wake-up should be sent when a device is attached and the host was suspended. A more general fix (but only UHCI) was posted in http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00576.html --- hw/usb-ohci.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index de113e9..9e4289a 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -295,6 +295,11 @@ static void ohci_attach(USBPort *port1, else port->ctrl &= ~OHCI_PORT_LSDA; port->port.dev = dev; + + /* notify of remote-wakeup */ + if ((s->ctl & OHCI_CTL_HCFS) == OHCI_USB_SUSPEND) + ohci_set_interrupt(s, OHCI_INTR_RD); + /* send the attach message */ usb_send_msg(dev, USB_MSG_ATTACH); dprintf("usb-ohci: Attached port %d\n", port1->index); -- 1.4.3.2