qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andrzej Zaborowski" <balrog@zabor.org>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Wake OHCI up on device attach.
Date: Sun, 19 Nov 2006 02:21:10 +0100	[thread overview]
Message-ID: <1163899270216-git-send-email-balrog@zabor.org> (raw)

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

                 reply	other threads:[~2006-11-18 23:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1163899270216-git-send-email-balrog@zabor.org \
    --to=balrog@zabor.org \
    --cc=balrogg@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).