]> Git Repo - qemu.git/commitdiff
ehci: Fix interrupts stopping when Interrupt Threshold Control is 8
authorHans de Goede <[email protected]>
Mon, 10 Sep 2012 10:44:10 +0000 (12:44 +0200)
committerGerd Hoffmann <[email protected]>
Wed, 12 Sep 2012 06:09:49 +0000 (08:09 +0200)
If Interrupt Threshold Control is 8 or a multiple of 8, then
s->usbsts_frindex can become exactly 0x4000, at which point
(s->usbsts_frindex > s->frindex) will never become true, as
s->usbsts_frindex will not be lowered / reset in this case.

This patch fixes this.

Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb/hcd-ehci.c

index f5ba8e14690f97932fd64f5ffb95a4c1f60f94fa..54273d777b6ef608677696c462fd3d347f147e11 100644 (file)
@@ -2413,7 +2413,7 @@ static void ehci_update_frindex(EHCIState *ehci, int frames)
         if (ehci->frindex == 0x00004000) {
             ehci_raise_irq(ehci, USBSTS_FLR);
             ehci->frindex = 0;
-            if (ehci->usbsts_frindex > 0x00004000) {
+            if (ehci->usbsts_frindex >= 0x00004000) {
                 ehci->usbsts_frindex -= 0x00004000;
             } else {
                 ehci->usbsts_frindex = 0;
This page took 0.031862 seconds and 4 git commands to generate.