From: Gerd Hoffmann Date: Thu, 6 Feb 2014 11:06:55 +0000 (+0100) Subject: xhci iso: allow for some latency X-Git-Tag: qemu-xen-4.5.0-rc1~187^2~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cc03ff9d0a147a399a11c9f513afa5e06ceee453;p=qemu-upstream-4.5-testing.git 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 --- diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 706cdc732..8261d0029 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; } }