ehci: Don't process too much frames in 1 timer tick (v2)
commit8f74ed1e43263293301031a10e440549bab19a6e
authorHans de Goede <hdegoede@redhat.com>
Mon, 10 Sep 2012 10:44:11 +0000 (10 12:44 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Sep 2012 06:09:49 +0000 (12 08:09 +0200)
treed63514e77356995891e55c9d2727bc2d25753528
parentffa1f2e088eb7e3d57f2fc35f21e7bdb23e592c5
ehci: Don't process too much frames in 1 timer tick (v2)

The Linux ehci isoc scheduling code fills the entire schedule ahead of
time minus 80 frames. If we make a large jump in where we are in the
schedule, ie 40 frames, then the scheduler all of a sudden will only have
40 frames left to work in, causing it to fail packet submissions
with error -27 (-EFBIG).

Changes in v2:
-Don't hardcode a maximum number of frames to process in one tick, instead:
 -Process a minimum number of frames to ensure we do eventually catch up
 -Stop (after the minimum number) when the guest has requested an irq

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-ehci.c