qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/5] husb: rewrite Linux host USB layer, fully a


From: Max Krasnyansky
Subject: Re: [Qemu-devel] [PATCH 5/5] husb: rewrite Linux host USB layer, fully async operation
Date: Fri, 15 Aug 2008 12:04:14 -0700
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Paul Brook wrote:
>> This patch obviously requires UHCI patch. The combo has been tested with
>> various devices. See the UHCI patch description for list of the devices.
>> Most of the testing was done with the KVM flavor of QEMU.
> 
> Have you tested OHCI hosts?
> 

Ah, OHCI. Good question. I have actually played with OHCI. I was pleasantly
surprised that if I just comment out uhci_pci_init() and replace it with
ohci_pci_init() XP happily detected it and internal devices and stuff worked 
fine.

After getting frustrated with UHCI's lack of "cancellation protocol" (UHCI
driver can yank out requests at any time, which is kind of a problem for async
since we have to cancel outstanding URBs) I started looking at and hacking on
OHCI. At first I thought OHCI is much better suited for virtualization because
of the well defined request cancellation rules and non-timer based control and
bulk queue processing. So I added all the async tracking infrastructure to the
OHCI first. While doing that I came up with TD validation logic for UHCI, in
other words I can detect true cancelation and retries fairly easily even with
UHCI. So I moved all the infrastructure to UHCI, to try out the idea, and it
worked great.
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 ? If yes
maybe you can help me out with it ?

Now. What I meant by "This patch obviously requires UHCI patch." is that in
order to get all the benefits of the new async logic we need UHCI patches,
that does not however mean that usb-linux changes by itself break existing
stuff. New usb-linux does not really enforce any constraints or rules on how
requests are submitted. It's all driven by the UHCI or OHCI. Current async
handling in OHCI is very limited (just like it was in UHCI before my patches)
so while it's not completely broken it does not really work well because
everything is async now (besides control) and it used to be sync.
So we'd definitely need to work on OHCI if it's important for some platforms.
I won't have spare cycles though.

Max







reply via email to

[Prev in Thread] Current Thread [Next in Thread]