From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoB59-00026y-E3 for qemu-devel@nongnu.org; Mon, 09 Jul 2012 06:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoB53-0002vq-4Z for qemu-devel@nongnu.org; Mon, 09 Jul 2012 06:20:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoB52-0002vX-Si for qemu-devel@nongnu.org; Mon, 09 Jul 2012 06:20:37 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q69AKZOO023826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Jul 2012 06:20:35 -0400 From: Gerd Hoffmann Date: Mon, 9 Jul 2012 12:20:29 +0200 Message-Id: <1341829233-24381-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1341829233-24381-1-git-send-email-kraxel@redhat.com> References: <1341829233-24381-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/9] ehci: Kick async schedule on wakeup in the non companion case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede 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 Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index f612610..080f62c 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -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[], -- 1.7.1