Statistics
| Branch: | Revision:

root / hw / usb-ehci.c @ d43ed9ec

History | View | Annotate | Download (67.6 kB)

# Date Author Comment
3631e6c8 07/05/2011 04:09 pm Hans de Goede

usb: Move (initial) call of usb_port_location to usb_fill_port

Cleanup / preparation patch for companion controller support. Note that
as a "side-effect" this patch also fixes the milkymist-softusb controller
not having a port_location set for its ports....

d47e59b8 07/05/2011 04:09 pm Hans de Goede

usb: Make port wakeup and complete ops take a USBPort instead of a Device

This makes them consistent with the attach and detach ops, and in general
it makes sense to make portops take a port as argument. This also makes
adding support for a companion controller easier / cleaner....

4706ab6c 07/05/2011 04:09 pm Hans de Goede

usb: Replace device_destroy bus op with a child_detach port op

Note this fixes 2 things in one go, first of all the device_destroy bus
op should be a device_detach bus op, as pending async packets from the
device should be cancelled on detach not on destroy....

053f9fcf 07/05/2011 04:09 pm Hans de Goede

usb-ehci: drop unused num-ports state member

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

c44fd61c 07/05/2011 04:09 pm Hans de Goede

usb-ehci: Connect Status bit is read only, don't allow changing it by the guest

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

fbf9db64 07/05/2011 04:09 pm Hans de Goede

usb-ehci: cleanup port reset handling

Doing a usb_attach when dev is NULL will just result in the
port detach op getting called even though nothing was connected in
the first place.

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

fbd97532 07/05/2011 04:09 pm Hans de Goede

usb-ehci: Fix handling of PED and PEDC port status bits

The PED bit should only be set for highspeed devices and the PEDC bit
should not be set on "normal" PED bit changes, only on io errors.

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

a0a3167a 07/05/2011 04:09 pm Hans de Goede

usb-ehci: Add support for registering companion controllers

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

5cc194ca 07/05/2011 04:09 pm Gerd Hoffmann

ehci: fix port count.

The ICH4 EHCI controller which we emulate has six ports not four.

Signed-off-by: Gerd Hoffmann <>

3028376e 07/05/2011 04:09 pm Gerd Hoffmann

ehci: add ich9 controller.

Signed-off-by: Gerd Hoffmann <>

16a2dee6 06/23/2011 12:28 pm Gerd Hoffmann

ehci: add freq + maxframes properties

Add properties for the wakeup rate and the max number of frames ehci
will process at once.

The wakeup rate defaults to 1000 which equals the usb frame rate. This
can be reduced to make qemu wake up less often when ehci is active....

adddecb1 06/23/2011 12:28 pm Gerd Hoffmann

ehci: switch to nanoseconds

Make ehci use nanoseconds everywhere.
Simplifies time calculations.

Signed-off-by: Gerd Hoffmann <>

fdba9594 06/22/2011 03:11 pm Anthony Liguori

Merge remote-tracking branch 'mst/for_anthony' into staging

Conflicts:
hw/usb-uhci.c

9047c0b4 06/15/2011 06:32 pm Michael S. Tsirkin

usb-ehci: move device/vendor/class id to qdev

Signed-off-by: Michael S. Tsirkin <>

4001f22f 06/14/2011 01:56 pm Brad Hards

usb: Use defines for serial bus release number register for EHCI

Signed-off-by: Brad Hards <>
Signed-off-by: Gerd Hoffmann <>

07771f6f 06/14/2011 01:56 pm Gerd Hoffmann

usb: cancel async packets on unplug

This patch adds USBBusOps struct with (for now) only a single callback
which is called when a device is about to be destroyed. The USB Host
adapters are implementing this callback and use it to cancel any async
requests which might be in flight before the device actually goes away....

d0539307 06/14/2011 01:56 pm Gerd Hoffmann

usb-ehci: drop EXECUTING checks.

The state machine doesn't stop in EXECUTING state any more when async
packets are in flight, so the checks are not needed any more and can
be dropped.

Also kick out the check for the frame timer. As we don't stop & sleep...

e654887f 06/14/2011 01:56 pm Gerd Hoffmann

usb-ehci: itd handling fixes.

This patch fixes a bunch of issues in the itd descriptor handling.
Most important fix is to handle transfers which cross page borders
correctly by looking up the address of the next page. Luckily the
linux uses physically contigous memory so the data used to hits the...

025b168c 06/14/2011 01:56 pm Gerd Hoffmann

usb-ehci: split trace calls to handle arg count limits

Signed-off-by: Gerd Hoffmann <>

ba7cb5a8 06/14/2011 01:56 pm Gerd Hoffmann

usb-ehci: fix offset writeback in ehci_buffer_rw

Two bugs at once:

First the mask is backwards, so the it used to keeps the offset and
clears the page address, which is not what we need when we update the
offset.

Second the offset calculation is wrong in case head isn't page aligned....

d2bd525f 06/14/2011 01:56 pm Gerd Hoffmann

usb-ehci: fix error handling.

Set the correct bits for nodev, stall and babble errors.
Raise errint irq. Fix state transition from WRITEBACK
to the next state.

Signed-off-by: Gerd Hoffmann <>

8e4faf3d 06/14/2011 01:56 pm Hans de Goede

ehci: fix a number of unused-but-set-variable warnings (new with gcc-4.6)

Signed-off-by: Gerd Hoffmann <>

8ac6d699 06/14/2011 01:56 pm Gerd Hoffmann

usb-ehci: multiqueue support

This patch adds support for keeping multiple queues going at the same
time. One slow device will not affect other devices any more.

The patch adds code to manage EHCIQueue structs. It also does a number
of changes to the state machine:...

f2c88dc1 06/14/2011 01:36 pm Gerd Hoffmann

usb-ehci: trace buffer copy

Add a trace point for buffer copies and drop the DPRINTF's.

No change in behavior.

Signed-off-by: Gerd Hoffmann <>

0122f472 06/14/2011 01:36 pm Gerd Hoffmann

usb-ehci: add queue data struct

Add EHCIQueue struct, move the fields needed to track the queue state
into that struct. Pass the new struct instead of ehci state down to
functions which handle the queue state. Lot of variable references have
changed due to that without an actual functional change....

439a97cc 06/14/2011 01:36 pm Gerd Hoffmann

usb-ehci: trace mmio and usbsts

This patch starts adding trace support to ehci. It traces
updates of the status register (USBSTS), mmio access and
controller reset.

It also adds functions to set and clear status register bits
and puts them in use everywhere....

26d53979 06/14/2011 01:36 pm Gerd Hoffmann

usb-ehci: trace state machine changes

Add functions to get and set the current state of the state machine,
add tracepoints there to trace state transitions. Add support for
traceing the queue heads and transfer descriptors as we look at them.

Drop a few DPRINTFs and all DPRINTF_ST lines, they are obsolete now....

dcbd0b5c 06/14/2011 01:36 pm Gerd Hoffmann

usb-ehci: trace port state

Trace usb port operations (attach, detach, reset),
drop a few obsolete DPRINTF's.

No change in behavior.

Signed-off-by: Gerd Hoffmann <>

c4f8e211 06/14/2011 01:36 pm Gerd Hoffmann

usb-ehci: improve mmio tracing

Add a separate tracepoint to log how register values change in response
to a mmio write. Especially useful for registers which have read-only
or clear-on-write bits in them.

No change in behavior.

Signed-off-by: Gerd Hoffmann <>

94527ead 05/26/2011 12:57 pm Gerd Hoffmann

usb: add ehci adapter

This patch finally merges the EHCI host adapter aka USB 2.0 support.

Based on the ehci bits collected @ git://git.kiszka.org/qemu.git ehci

EHCI has a long out-of-tree history. Project was started by Mark
Burkley, with contributions by Niels de Vos. David S. Ahern continued...