qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ehci: Kick async schedule on wakeup in the non companion case
@ 2012-07-06 14:53 Hans de Goede
  2012-07-09  8:00 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2012-07-06 14:53 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel, kvm

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>
---
 hw/usb/hcd-ehci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 401ccec..b68a8ce 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -852,10 +852,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[],
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] ehci: Kick async schedule on wakeup in the non companion case
  2012-07-06 14:53 [Qemu-devel] [PATCH] ehci: Kick async schedule on wakeup in the non companion case Hans de Goede
@ 2012-07-09  8:00 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2012-07-09  8:00 UTC (permalink / raw)
  To: Hans de Goede; +Cc: qemu-devel, kvm

On 07/06/12 16:53, Hans de Goede wrote:
> 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.

Added to usb patch queue.

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-09  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 14:53 [Qemu-devel] [PATCH] ehci: Kick async schedule on wakeup in the non companion case Hans de Goede
2012-07-09  8:00 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).