From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KU4b6-00070z-OM for qemu-devel@nongnu.org; Fri, 15 Aug 2008 15:04:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KU4b5-00070n-7t for qemu-devel@nongnu.org; Fri, 15 Aug 2008 15:04:27 -0400 Received: from [199.232.76.173] (port=59623 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KU4b5-00070k-2H for qemu-devel@nongnu.org; Fri, 15 Aug 2008 15:04:27 -0400 Received: from hera.kernel.org ([140.211.167.34]:38232) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KU4b4-0001D7-Ax for qemu-devel@nongnu.org; Fri, 15 Aug 2008 15:04:26 -0400 Message-ID: <48A5D32E.2030208@kernel.org> Date: Fri, 15 Aug 2008 12:04:14 -0700 From: Max Krasnyansky MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 5/5] husb: rewrite Linux host USB layer, fully async operation References: <200808151524.54015.paul@codesourcery.com> In-Reply-To: <200808151524.54015.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org 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