From patchwork Thu Feb 6 11:42:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 317425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1E4432C009A for ; Thu, 6 Feb 2014 22:42:54 +1100 (EST) Received: from localhost ([::1]:35794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBNM3-0003Qw-NB for incoming@patchwork.ozlabs.org; Thu, 06 Feb 2014 06:42:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBNLe-0003LD-Gs for qemu-devel@nongnu.org; Thu, 06 Feb 2014 06:42:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBNLV-0005o0-7d for qemu-devel@nongnu.org; Thu, 06 Feb 2014 06:42:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBNLV-0005nh-0l for qemu-devel@nongnu.org; Thu, 06 Feb 2014 06:42:17 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s16BgGeZ009723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Feb 2014 06:42:16 -0500 Received: from nilsson.home.kraxel.org (vpn1-7-101.ams2.redhat.com [10.36.7.101]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s16BgFWc001953; Thu, 6 Feb 2014 06:42:15 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 703EE806EE; Thu, 6 Feb 2014 12:42:14 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 6 Feb 2014 12:42:03 +0100 Message-Id: <1391686923-11688-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1391686923-11688-1-git-send-email-kraxel@redhat.com> References: <1391686923-11688-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/2] xhci iso: allow for some latency X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 2c54b86..6188e77 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; } }