From dc93bfdd234ab8461e6bd8ef2d8eaafd184a61d1 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Gerd Hoffmann Date: Thu, 16 Aug 2012 11:39:08 +0200 Subject: [PATCH 06/18] ehci: raise irq in the frame timer RH-Author: Gerd Hoffmann Message-id: <1345117160-21046-7-git-send-email-kraxel@redhat.com> Patchwork-id: 40928 O-Subject: [RHEL-6.4 qemu-kvm PATCH 06/18] ehci: raise irq in the frame timer Bugzilla: 805172 RH-Acked-by: Paolo Bonzini RH-Acked-by: Hans de Goede RH-Acked-by: Laszlo Ersek With the async schedule being kicked from other places than the frame timer (commit 0f588df8b3688b00e77aabaa32e26ece5f19bd39) it may happen that we call ehci_commit_interrupt() more than once per frame. Move the call from the async schedule handler to the frame timer to restore old irq behavior, which is more correct. Fixes regressions with some linux kernel versions. TODO: implement full Interrupt Threshold Control support. Signed-off-by: Gerd Hoffmann (cherry picked from commit f0ad01f92ca02eee7cadbfd225c5de753ebd5fce) Conflicts: hw/usb-ehci.c --- hw/usb-ehci.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Signed-off-by: Michal Novotny --- hw/usb-ehci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 16d3112..46b51ec 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -1996,8 +1996,6 @@ static void ehci_advance_state(EHCIState *ehci, } } while (again); - - ehci_commit_interrupt(ehci); } static void ehci_advance_async_state(EHCIState *ehci) @@ -2170,6 +2168,7 @@ static void ehci_frame_timer(void *opaque) qemu_bh_schedule(ehci->async_bh); qemu_mod_timer(ehci->frame_timer, expire_time); + ehci_commit_interrupt(ehci); } static void ehci_async_bh(void *opaque) -- 1.7.11.4