summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-07-06 16:51:11 +0200
committerHans de Goede <hdegoede@redhat.com>2012-07-06 16:56:41 +0200
commit7231db759748201db08f5f8b510bd616ee2c4e25 (patch)
tree89aad9eed47da36ca3290bfce8b9da74ccf908c7
parent5a7dfd0bb07f5bd441cbf21ffc899fcf59022738 (diff)
ehci: Kick async schedule on wakeup in the non companion caseqemu-kvm-1.1-usbredir-live
Commit 0f588df8b3688b00e77aabaa32e26ece5f19bd39, added code to ehci_wakeup to kick the async schedule on wakeup, but the else was positioned wrong making it trigger for devices which are routed to the companion rather then to the ehci controller itself. This patch fixes this. Note that the "programming style" with using the return at the end of the companion block matches how the companion case is handled in the other ports ops, and is done this way for consistency. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--hw/usb/hcd-ehci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index da5e1459a..0c0ca80fb 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -889,10 +889,11 @@ static void ehci_wakeup(USBPort *port)
USBPort *companion = s->companion_ports[port->index];
if (companion->ops->wakeup) {
companion->ops->wakeup(companion);
- } else {
- qemu_bh_schedule(s->async_bh);
}
+ return;
}
+
+ qemu_bh_schedule(s->async_bh);
}
static int ehci_register_companion(USBBus *bus, USBPort *ports[],