From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmx7-0005jx-Mb for qemu-devel@nongnu.org; Tue, 18 Feb 2014 10:51:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFmx1-0007Zo-KT for qemu-devel@nongnu.org; Tue, 18 Feb 2014 10:51:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmx1-0007ZX-CS for qemu-devel@nongnu.org; Tue, 18 Feb 2014 10:51:15 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1IFpAqO031268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Feb 2014 10:51:13 -0500 From: Gerd Hoffmann Date: Tue, 18 Feb 2014 16:50:52 +0100 Message-Id: <1392738654-4698-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1392738654-4698-1-git-send-email-kraxel@redhat.com> References: <1392738654-4698-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/7] xhci iso: allow for some latency List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 --- hw/usb/hcd-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 706cdc7..8261d00 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; } } -- 1.8.3.1