Wake OHCI up on device attach.
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(-)
hw/usb-ohci.c +5 -0
@@ -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);
Signature · 1 line
1.4.3.2