diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 34f7538066..be02308242 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2149,11 +2149,15 @@ static void ehci_frame_timer(void *opaque) if ( !(ehci->usbsts & USBSTS_HALT)) { ehci->frindex += 8; - if (ehci->frindex > 0x00001fff) { - ehci->frindex = 0; + if (ehci->frindex == 0x00002000) { ehci_set_interrupt(ehci, USBSTS_FLR); } + if (ehci->frindex == 0x00004000) { + ehci_set_interrupt(ehci, USBSTS_FLR); + ehci->frindex = 0; + } + ehci->sofv = (ehci->frindex - 1) >> 3; ehci->sofv &= 0x000003ff; }