The attached patch signals root hub status change interrupt for attach/detach in ohci_attach.

--- qemu/hw/usb-ohci.c  2006-05-22 11:02:16.000000000 -0500
+++ qemu/hw/usb-ohci.c  2006-05-22 11:22:46.000000000 -0500
@@ -252,6 +252,7 @@
 {
     OHCIState *s = port1->opaque;
     OHCIPort *port = &s->rhport[port1->index];
+    uint32_t old_state = port->ctrl;
 
     if (dev) {
         if (port->port.dev) {
@@ -290,6 +291,9 @@
         port->port.dev = NULL;
         dprintf("usb-ohci: Detached port %d\n", port1->index);
     }
+
+    if (old_state != port->ctrl)
+        ohci_set_interrupt(s, OHCI_INTR_RHSC);
 }
 
 /* Reset the controller */
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to