From: Max Krasnyansky <maxk@kernel.org>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 5/5] husb: rewrite Linux host USB layer, fully async operation
Date: Mon, 18 Aug 2008 11:40:09 -0700 [thread overview]
Message-ID: <48A9C209.4080404@kernel.org> (raw)
In-Reply-To: <200808152053.27587.paul@codesourcery.com>
Paul Brook wrote:
>> Given that OHCI is much more complex than UHCI (both the code and the spec)
>> I decided to give up on OHCI, at least for now. I noticed Codesourcery
>> copyright on OHCI. Did you have anything to do with the OHCI implementation?
>
> Yes, I wrote the current OHCI support, based on some initial patches by
> Gianni.
Great. So do you have spare cycles to add decent async support to it ?
> I found OHCI to be much easier to deal with than than UHCI. The low-level bits
> of the USB protocol are fairly nasty. UHCI is a cheap and nasty host
> solution, which directly exposes (and requires faking of) all the nasty low
> level details and timing.
>
> OHCI is a higher level interface which I found makes it much easier to
> actually implement things sanely in a virtual environment.
Four days ago :) I would've completely agreed with you. But once I
figured out a ridiculously simple way to match outstanding transactions
against current QHs and TDs (ED/TD in the OHCI terms) I changed my
opinion. I mean in general OHCI does seem better. But cheap does not
necessarily mean bad. In this case it means _simple_. Last Friday I made
asynchronous ISOC transactions work reliably and both UHCI and usb-linux
code is very generic and does not need any special logic for isoc which
is nice.
Unless I'm missing something OCHI also exposes USB frame timing when it
comes to ISOC and interrupt transactions, and is fairly similar to UHCI
in that regard.
btw With the new UHCI code there is really no need to fake any USB
timing in the UHCI. I simply match transactions by tokens (which encodes
addr/endpoit/size/etc) and use QH/TD structure just to determine how the
frame is composed. Yes there is per frame timer, but all it does it just
updates pending transactions and submits new ones. OHCI also needs a
timer to handle ISOC transactions.
So overall I think UHCI is totally usable and sane now. And what I like
the most is that it's very simple. It's almost 2:1 ratio, code size
wise, with OHCI vs UHCI once I added support for multiple async
transactions to both (like I did not finish OHCI).
>> So we'd definitely need to work on OHCI if it's important for some
>> platforms.
>
> I consider OHCI to be important. x86 is abut the only target foolish enough to
> use UHCI.
I think we need both for ultimate compatibility.
We also need EHCI otherwise XP keeps telling me "dude, you plugged
device XYZ into the wrong port" :).
Max
next prev parent reply other threads:[~2008-08-18 18:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-14 4:22 [Qemu-devel] [PATCH 0/5] Various USB fixes and improvements Max Krasnyansky
2008-08-14 4:22 ` [Qemu-devel] [PATCH 1/5] husb: support for USB host device auto disconnect Max Krasnyansky
2008-08-14 16:28 ` [Qemu-devel] " Anthony Liguori
2008-08-14 19:26 ` Max Krasnyansky
2008-08-14 21:41 ` Max Krasnyansky
2008-08-14 4:22 ` [Qemu-devel] [PATCH 2/5] husb: support for USB host device auto connect Max Krasnyansky
2008-08-14 16:41 ` [Qemu-devel] " Anthony Liguori
2008-08-14 19:38 ` Max Krasnyansky
2008-08-14 20:21 ` Anthony Liguori
2008-08-14 20:34 ` Max Krasnyansky
2008-08-14 20:41 ` Anthony Liguori
2008-08-14 21:14 ` François Revol
2008-08-15 7:46 ` Guido Günther
2008-08-15 18:24 ` Max Krasnyansky
2008-08-15 18:31 ` Javier Guerra
2008-08-18 18:21 ` Max Krasnyansky
2008-08-18 18:52 ` Javier Guerra
2008-08-18 18:56 ` Jamie Lokier
2008-08-17 7:52 ` Avi Kivity
2008-08-18 18:46 ` Max Krasnyansky
2008-08-18 14:11 ` Anthony Liguori
2008-08-18 18:16 ` Max Krasnyansky
2008-08-14 4:22 ` [Qemu-devel] [PATCH 3/5] usb: generic packet handler cleanup and documentation Max Krasnyansky
2008-08-14 4:22 ` [Qemu-devel] [PATCH 4/5] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions Max Krasnyansky
2008-08-14 17:51 ` [Qemu-devel] " Anthony Liguori
2008-08-14 19:49 ` Max Krasnyansky
2008-10-11 23:54 ` [Qemu-devel] " Juergen Lock
2008-10-15 19:54 ` Max Krasnyansky
2008-10-15 22:05 ` andrzej zaborowski
2008-10-16 21:25 ` Juergen Lock
2008-08-14 4:22 ` [Qemu-devel] [PATCH 5/5] husb: rewrite Linux host USB layer, fully async operation Max Krasnyansky
2008-08-15 14:24 ` Paul Brook
2008-08-15 19:04 ` Max Krasnyansky
2008-08-15 19:53 ` Paul Brook
2008-08-18 18:40 ` Max Krasnyansky [this message]
2008-08-14 17:55 ` [Qemu-devel] Re: [PATCH 0/5] Various USB fixes and improvements Anthony Liguori
2008-08-14 19:55 ` Max Krasnyansky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48A9C209.4080404@kernel.org \
--to=maxk@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).