[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Wake OHCI up on device attach.
From: |
Andrzej Zaborowski |
Subject: |
[Qemu-devel] Wake OHCI up on device attach. |
Date: |
Sun, 19 Nov 2006 02:21:10 +0100 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Wake OHCI up on device attach.,
Andrzej Zaborowski <=