diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-09-10 12:44:10 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-12 08:09:49 +0200 |
commit | ffa1f2e088eb7e3d57f2fc35f21e7bdb23e592c5 (patch) | |
tree | 04aaff7d70346a3ff8bccf85e79f7212487ffac4 /hw/usb/hcd-ehci.c | |
parent | 3e4f910c8d490a1490409a7e381dbbb229f9d272 (diff) | |
download | hqemu-ffa1f2e088eb7e3d57f2fc35f21e7bdb23e592c5.zip hqemu-ffa1f2e088eb7e3d57f2fc35f21e7bdb23e592c5.tar.gz |
ehci: Fix interrupts stopping when Interrupt Threshold Control is 8
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 <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ehci.c')
-rw-r--r-- | hw/usb/hcd-ehci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index f5ba8e1..54273d7 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -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; |