From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <40EE7F2A.70104@9fs.org> Date: Fri, 9 Jul 2004 12:19:06 +0100 From: Nigel Roles User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] TODO lists for Plan 9 References: <56cf6b7b6176d2a7d381d7d8d91e1896@proxima.alt.za> In-Reply-To: <56cf6b7b6176d2a7d381d7d8d91e1896@proxima.alt.za> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: bb0eb0e6-eacd-11e9-9e20-41e7f4b1d025 lucio@proxima.alt.za wrote: >>I think OHCI and UHCI were competing USB 1 interfaces. One was from >>Intel and appears on lots of motherboards; I'm guessing that that's >>UHCI, since that's what Plan 9 currently supports. EHCI must be the >>USB 2 interface I was thinking of. >> >> > >I'm sure there are others whose knowledge is greater than mine, but >they must be asleep as no one has shouted at me yet :-) > >I have both UHCI and OHCI specs (and EHCI, believe or not). I haven't >yet been able to read both (either, really, I only superficially read >the UHCI one) and so I don't know how they differ: Universal (Intel) >and Open (Compaq, of all names, but all USB designers at the time seem >to have had a hand in this one). I have a feeling that OHCI has >superseded UHCI in practice, possibly because of its appearance in all >EHCI implementations. But I'm guessing and my experience is not very >broad. > >As for EHCI, by volume the specification does not seem much greater >than OHCI, but I'm sure there lurks some serious complication >somewhere in its innards. > > > OHCI has not superceded UHCI. It's simply that UHCI came first and was designed by Intel so appeared in the chipsets first. OHCI came later, and took longer to make silicon. VIA in particular made OHCI based chips, so bit by bit OHCI took off. It is a better specification, requiring less activity in the interrupt handlers to decide what to do. Also, bandwidth limiting (if you want to get into that) is easier to do with OHCI. Or, rather, UHCI is missing a level of sophistication compared to OHCI, so the first step in writing a UHCI driver is to introduce some OHCI-like structures to make up the deficit. There is no fundamental reason why UHCI style silicon could not support USB 2.0, if you turn the clock speed up. I imagine, though I don't know, that those organisations keen to promote USB 2.0 just preferred to develop OHCI because the already had silicon IP in that style. I've not looked at EHCI, though I doubt there is much which changes things. I've written an OHCI driver for non PCI (i.e. embedded) silicon for an operating system not unlike Plan 9; it's not mine to give away. The first thing I would lay my hands on is a USB bus analyser. Really, honestly, you will save an order of magnitude in development time and your sanity. Despite the bad impression early drivers gave (i.e. Win95), USB is easy. It does what is says on the tin, and there are few gotchas. The bus just works. However handling hot plugging, and attachment of device specific drivers in a manner which is bomb-proof is harder. Unless things have changed recently, the Plan 9 approach with the namespace and usbd is too simplistic on account of having been developed in the early days of USB when things were very clean. Choosing which of the multiple interfaces and configurations available to use is unfortunately unavoidable, so I have felt for a time that a new driver architecture is required, whether or not the underlying hardware is UHCI, OHCI, EHCI, or just ICKY.