From: Gerd Hoffmann Date: Tue, 10 Jul 2012 16:00:50 +0000 (+0200) Subject: ehci: raise irq in the frame timer X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~3876^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0ad01f92ca02eee7cadbfd225c5de753ebd5fce;p=sdk%2Femulator%2Fqemu.git ehci: raise irq in the frame timer 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 --- diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 080f62c..7c5f398 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2208,8 +2208,6 @@ static void ehci_advance_state(EHCIState *ehci, int async) } } while (again); - - ehci_commit_interrupt(ehci); } static void ehci_advance_async_state(EHCIState *ehci) @@ -2389,6 +2387,8 @@ static void ehci_frame_timer(void *opaque) if (schedules) { qemu_mod_timer(ehci->frame_timer, expire_time); } + + ehci_commit_interrupt(ehci); } static void ehci_async_bh(void *opaque)