ehci: Kick async schedule on wakeup in the non companion case
authorHans de Goede <hdegoede@redhat.com>
Fri, 6 Jul 2012 14:53:39 +0000 (16:53 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 9 Jul 2012 09:59:54 +0000 (11:59 +0200)
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>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-ehci.c

index f6126107f82e03a846eddca37ee8db59eaeb3d93..080f62c00d7f959e53d5f0f87e22449832458a09 100644 (file)
@@ -905,10 +905,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[],