qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Wake OHCI up on device attach.
@ 2006-11-19  1:21 Andrzej Zaborowski
  0 siblings, 0 replies; only message in thread
From: Andrzej Zaborowski @ 2006-11-19  1:21 UTC (permalink / raw)
  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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-11-18 23:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-19  1:21 [Qemu-devel] Wake OHCI up on device attach Andrzej Zaborowski

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).