[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] RFC: ehci -> uhci handoff suggestions
From: |
David S. Ahern |
Subject: |
Re: [Qemu-devel] RFC: ehci -> uhci handoff suggestions |
Date: |
Wed, 26 May 2010 07:06:15 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4 |
On 05/26/2010 06:48 AM, Gerd Hoffmann wrote:
>
> Hi,
>
>>> USB devices can support both 1.1 and 2.0, right? Who decides which
>>> protocol is used then? I think the OS can speak 1.1 to the device even
>>> in case a ehci controller is present (but unused by the OS), right?
>>
>> AFAIK the OS must tell the EHCI that it should hand the device off to
>> the UHCI/OHCI companion before it can use it there.
>
> Huh? Compatibility-wise it makes sense to do it the other way around
> (i.e. have it @ UHCI/OHCI by default and move to EHCI on request), so a
> OS which knows nothing about EHCI can cope.
>
>> If they should be accessed via the EHCI or a companion controller
>> depends on what the OS requests. And USB 2.0 says that any device that
>> supports High Speed must also support Full Speed and therefore be
>> accessible using the companion (at least that's what I understand).
>
> Hmm, ok, so no shortcut even for emulated devices. Not that it would
> have helped much as we have to cover host devices anyway.
>
> Also I think one ehci controller can have multiple uhci companion
> controllers. At least lspci on my T60 suggests that:
>
> 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
> Controller #1 (rev 02)
> 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
> Controller #2 (rev 02)
> 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
> Controller #3 (rev 02)
> 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
> Controller #4 (rev 02)
> 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI
> Controller (rev 02)
>
> cheers,
> Gerd
>
Yes, that is the ehci feature to be implemented.
My understanding is that the port routing happens internally to the host
controller based on device speed - section 4.2 (pag 64) of:
http://www.intel.com/technology/usb/download/ehci-r10.pdf
ehci does have more overhead from an emulation perspective, so it would
be best to keep mice, keyboard, serial ports, etc on the uhci/ohci bus
and have storage devices and webcams and such on ehci. And any
transition should happen automagically within the device model.
David