From 2a0aeb473f9f317d18c0c7db6256743b78bd096c Mon Sep 17 00:00:00 2001
Message-Id: <2a0aeb473f9f317d18c0c7db6256743b78bd096c.1346940159.git.minovotn@redhat.com>
In-Reply-To: <c629acdc74c5b775c5cf7a7a3cb20ac833bcd0cc.1346940159.git.minovotn@redhat.com>
References: <c629acdc74c5b775c5cf7a7a3cb20ac833bcd0cc.1346940159.git.minovotn@redhat.com>
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Thu, 16 Aug 2012 11:39:05 +0200
Subject: [PATCH 03/18] ehci: schedule async bh on async packet completion

RH-Author: Gerd Hoffmann <kraxel@redhat.com>
Message-id: <1345117160-21046-4-git-send-email-kraxel@redhat.com>
Patchwork-id: 40925
O-Subject: [RHEL-6.4 qemu-kvm PATCH 03/18] ehci: schedule async bh on async packet completion
Bugzilla: 805172
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Hans de Goede <hdegoede@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>

When a packet completes which happens to be part of the async schedule
kick the async bottom half for processing,

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit ae710b99050a347cc7ef93e1873bf08c9a97b6be)

Conflicts:

	hw/usb-ehci.c
---
 hw/usb-ehci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 hw/usb-ehci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index 5dbee41..039a6dc 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -1255,6 +1255,8 @@ static void ehci_async_complete_packet(USBPort *port, USBPacket *packet)
     assert(q->async == EHCI_ASYNC_INFLIGHT);
     q->async = EHCI_ASYNC_FINISHED;
     q->usb_status = packet->len;
+
+    qemu_bh_schedule(q->ehci->async_bh);
 }
 
 static void ehci_execute_complete(EHCIQueue *q)
-- 
1.7.11.4

