aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-02-06 12:06:55 +0100
committerGerd Hoffmann <kraxel@redhat.com>2014-02-18 15:39:13 +0100
commitcc03ff9d0a147a399a11c9f513afa5e06ceee453 (patch)
treed6910e049d5f29be6c150b8d44e4f5ff2c15a430 /hw/usb
parent786ad214c72226fa5bd4ebf18aeb4c6b54d3ba80 (diff)
xhci iso: allow for some latency
Allow the scheduled transfer time be a bit behind, to compensate for latencies. Without this xhci will wait way to often for the mfindex wraparound, assuming the scheduled time is in the future just because qemu is a bit behind in processing the iso transfer requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/hcd-xhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 706cdc732a..8261d00296 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1977,7 +1977,7 @@ static void xhci_calc_iso_kick(XHCIState *xhci, XHCITransfer *xfer,
xfer->mfindex_kick = ((xfer->trbs[0].control >> TRB_TR_FRAMEID_SHIFT)
& TRB_TR_FRAMEID_MASK) << 3;
xfer->mfindex_kick |= mfindex & ~0x3fff;
- if (xfer->mfindex_kick < mfindex) {
+ if (xfer->mfindex_kick + 0x100 < mfindex) {
xfer->mfindex_kick += 0x4000;
}
}