qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [usb] signal RHSC in ohci_attach


From: Lonnie Mendez
Subject: [Qemu-devel] [usb] signal RHSC in ohci_attach
Date: Mon, 22 May 2006 11:26:25 -0500
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

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 */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]