]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ehci: raise irq in the frame timer
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 10 Jul 2012 16:00:50 +0000 (18:00 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 12 Jul 2012 13:00:50 +0000 (15:00 +0200)
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 <kraxel@redhat.com>
hw/usb/hcd-ehci.c

index 080f62c00d7f959e53d5f0f87e22449832458a09..7c5f398a377ee9026f8d411ad6050b4b9c2e99d7 100644 (file)
@@ -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)