ehci: fix overflow in frame timer code
commit3ae7eb88c472799f17beb653f4bc3fb8b124c72e
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 15 May 2017 10:45:43 +0000 (15 12:45 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 29 May 2017 12:03:35 +0000 (29 14:03 +0200)
tree9008a0b5ec8a6829cdb6ba6e9a50a0355d49b05c
parent9964e96dc9999cf7f7c936ee854a795415d19b60
ehci: fix overflow in frame timer code

In case the frame timer doesn't run for a while due to the host being
busy skipped_uframes can become big enough that UFRAME_TIMER_NS *
skipped_uframes overflows.  Which in turn throws off all subsequent
ehci frame timer calculations.

Reported-by: 李林 <8610_28@163.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170515104543.32044-1-kraxel@redhat.com
hw/usb/hcd-ehci.c