From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdtHC-0005SI-V9 for qemu-devel@nongnu.org; Thu, 11 Sep 2008 17:00:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdtHB-0005R3-8q for qemu-devel@nongnu.org; Thu, 11 Sep 2008 17:00:30 -0400 Received: from [199.232.76.173] (port=54191 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdtHB-0005Qr-56 for qemu-devel@nongnu.org; Thu, 11 Sep 2008 17:00:29 -0400 Received: from hs-out-0708.google.com ([64.233.178.241]:52960) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KdtHA-0006UV-Ng for qemu-devel@nongnu.org; Thu, 11 Sep 2008 17:00:29 -0400 Received: by hs-out-0708.google.com with SMTP id k27so218447hsc.2 for ; Thu, 11 Sep 2008 14:00:26 -0700 (PDT) Message-ID: <48C986B6.9050506@codemonkey.ws> Date: Thu, 11 Sep 2008 15:59:34 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1220679623-7934-1-git-send-email-maxk@kernel.org> In-Reply-To: <1220679623-7934-1-git-send-email-maxk@kernel.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] uhci: Change default transaction lifetime to 32 frames Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Krasnyansky Cc: qemu-devel@nongnu.org, aurelien@aurel32.net, kvm@vger.kernel.org Max Krasnyansky wrote: > Transaction lifetime was originally set to 10 frames. That was an arbitrary > number I picked without much thinking :). > I'm changing that to 32 frames because things like interrupt transfers > and such are scheduled at that rate. It seems like 1/32 is accepted as > lowest supported rate. OHCI, for example, defines exactly 32 interrupt > heads. > > While testing USB webcam under XP I noticed that interrupt transactions were > being canceled and then resubmitted on a regular basis, which works but is a > waste of CPU cycles. This change fixes that. > All other devices I have are not affected. > Applied. Thanks. Regards, Anthony Liguori > Signed-off-by: Max Krasnyansky > --- > hw/usb-uhci.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c > index 62c743d..b90cf78 100644 > --- a/hw/usb-uhci.c > +++ b/hw/usb-uhci.c > @@ -781,7 +781,7 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *in > async = uhci_async_find_td(s, addr, td->token); > if (async) { > /* Already submitted */ > - async->valid = 10; > + async->valid = 32; > > if (!async->done) > return 1; >