qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] uhci: Change default transaction lifetime to 32 frames
@ 2008-09-06  5:40 Max Krasnyansky
  2008-09-11 20:59 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Max Krasnyansky @ 2008-09-06  5:40 UTC (permalink / raw)
  To: anthony, aurelien, qemu-devel; +Cc: kvm, Max Krasnyansky

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.

Signed-off-by: Max Krasnyansky <maxk@kernel.org>
---
 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;
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-11 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-06  5:40 [Qemu-devel] [PATCH] uhci: Change default transaction lifetime to 32 frames Max Krasnyansky
2008-09-11 20:59 ` [Qemu-devel] " Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).