qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] RFC: ehci -> uhci handoff suggestions


From: David S. Ahern
Subject: [Qemu-devel] RFC: ehci -> uhci handoff suggestions
Date: Tue, 25 May 2010 07:40: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

USB 2.0 leverages companion UHCI or OHCI host controllers for full and
low speed devices. I do not see an appropriate means for doing that bus
transition and could use some suggestions.

I've read through the code for the "legacy" path in handling USB devices
(-usbdevice CLI arg and usb_add monitor command), and I am now working
on the new path (now that I know about it).

As I understand the code at this point it is a top down setup: device
added, bus found, device attached.

    --------------------
   |   Qemu USB admin   |   - adding/removing devices
   |     interface      |   - showing device list
    --------------------
             |
    --------------------
   |   USB controller   |
    --------------------
             |
    --------------------
   |  USB device model  |   - emulated devices (e.g., hw/usb-serial)
   |    (or driver )    |   - host devices
    --------------------


ie., key point is the expectation that the bus to which the device is
assigned is known early in the code path.

For USB devices the bus to attach it to should be determined
automatically when the device is attached. Something along the lines of:

    --------------------
   |   Qemu USB admin   |
   |     interface      |
    --------------------
             |
    --------------------      --------------------
   |   EHCI controller  |--->|    UHCI / OHCI     |
    --------------------      --------------------
             |                         |
    --------------------      --------------------
   |  USB device model  |    |  USB device model  |
   |    (or driver )    |    |    (or driver )    |
    --------------------      --------------------
         high speed             full / low speed


To know which bus to attach it to the device needs to be queried/probed
for basic information - something the current architecture does not have.

Suggestions?

David

P.S. I skimmed the USB 3.0 spec and it has the same design: super speed
devices are attached to the new 3.0 controller, high speed to ehci and
low/full to uhci/ohci.



reply via email to

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