Statistics
| Branch: | Revision:

root / hw / usb / hcd-ehci.c @ 7046530c

History | View | Annotate | Download (70.8 kB)

# Date Author Comment
eb36a88e 06/07/2012 11:02 am Gerd Hoffmann

ehci: add EHCIPacket

Add a separate EHCIPacket struct and move fields over from EHCIQueue.
Preparing for supporting multiple packets per queue being in flight at
the same time. No functional changes yet.

Fix some codestyle issues along the way.

Signed-off-by: Gerd Hoffmann <>

4224558f 06/07/2012 11:02 am Gerd Hoffmann

ehci: make ehci_execute work on EHCIPacket instead of EHCIQueue

This way it is possible to use ehci_execute to submit others than the
first EHCIPacket of the EHCIQueue.

Signed-off-by: Gerd Hoffmann <>

e59928b3 06/07/2012 11:02 am Gerd Hoffmann

ehci: cache USBDevice in EHCIQueue

Keep a USBDevice pointer in EHCIQueue so we don't have to lookup the
device on each usb packet submission.

Signed-off-by: Gerd Hoffmann <>

cd665715 06/07/2012 11:02 am Gerd Hoffmann

ehci: move ehci_flush_qh

Move ehci_flush_qh() function up in the source code.
No code change.

Signed-off-by: Gerd Hoffmann <>

773dc9cd 06/07/2012 11:02 am Gerd Hoffmann

ehci: add queuing support

Add packet queuing. Follow the qTD chain to see if there are more
packets we can submit. Improves performance on larger transfers,
especially with usb-host, as we don't have to wait for a packet to
finish before sending the next one to the host for processing....

8f6d5e26 06/07/2012 11:02 am Gerd Hoffmann

ehci: tweak queue initialization

Little tweak for the queue initialization, set the QH address in the
allocation function.

Signed-off-by: Gerd Hoffmann <>

ae0138a8 06/07/2012 11:02 am Gerd Hoffmann

ehci: add async field to EHCIQueue

Keep track whenever a EHCIQueue is part of the async or periodic
schedule. This way we don't have to pass around the async flag
everywhere but can look it up from the EHCIQueue struct when needed.

Signed-off-by: Gerd Hoffmann <>

0fb3e299 06/07/2012 11:02 am Gerd Hoffmann

ehci: move async schedule to bottom half

This way we can kick the async schedule independant from the
periodic frame timer.

Signed-off-by: Gerd Hoffmann <>

ae710b99 06/07/2012 11:02 am Gerd Hoffmann

ehci: schedule async bh on async packet completion

When a packet completes which happens to be part of the async schedule
kick the async bottom half for processing,

Signed-off-by: Gerd Hoffmann <>

0f588df8 06/07/2012 11:02 am Gerd Hoffmann

ehci: kick async schedule on wakeup

Kick async schedule when we get a wakeup
notification from a usb device.

Signed-off-by: Gerd Hoffmann <>

7046530c 06/07/2012 11:02 am Gerd Hoffmann

ehci: fix reset

Check for the reset bit first when processing USBCMD register writes.
Also break out of the switch, there is no need to check the other bits.

Signed-off-by: Gerd Hoffmann <>

a31f0531 05/14/2012 08:27 am Jim Meyering

fix some common typos

These were identified using: http://github.com/lyda/misspell-check
and run like this to create a bourne shell script using GNU sed's
-i option:

git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \
-pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'...

e59a8cf1 04/26/2012 01:21 pm Gerd Hoffmann

usb-ehci: remove hack

To answer the question in the comment removed by this patch: I think
this was needed because several places in the ehci emulation did not
check the T bit of link entries correctly and thus might have followed
invalid references. See commit 2a5ff735dc1074171a0cbb1dc228d6d6e907f571...

0cc6a0f1 04/26/2012 01:21 pm Gerd Hoffmann

usb-ehci: add missing usb_packet_init() call

Signed-off-by: Gerd Hoffmann <>

8a771f77 04/26/2012 01:21 pm Hans de Goede

usb-ehci: Ensure frindex writes leave a valid frindex value

frindex is a 14 bits counter, so bits 31-14 should always be 0, and
after the commit titled "usb-ehci: frindex always is a 14 bits counter"
we rely on frindex always being a multiple of 8. I've not seen this in...

c7020c97 04/17/2012 11:23 am Gerd Hoffmann

usb-ehci: drop assert()

Not sure what the purpose of the assert() was, in any case it is bogous.
We can arrive there if transfer descriptors passed to us from the guest
failed to pass sanity checks, i.e. it is guest-triggerable. We deal
with that case by resetting the host controller. Everything is ok, no...

088351a7 04/17/2012 11:23 am Gerd Hoffmann

usb-ehci: fix ehci_child_detach

Looks like a cut+paste bug from ehci_detach. When the device itself is
detached from a ehci port (ehci_detach op) we have to clear the
device pointer for the companion port too. When a device gets removed
from a downstream port of a usb hub (ehci_child_detach op) the ehci port...

58ea88d8 04/17/2012 11:23 am Hans de Goede

usb-ehci: frindex always is a 14 bits counter

frindex always is a 14 bits counter, and not a 13 bits one as we were
emulating. There are some subtle hints to this in the spec, first of all
"Table 2-12. FRINDEX - Frame Index Register" says:
"Bit 13:0 Frame Index. The value in this register increments at the end of...

8e24283b 04/17/2012 11:23 am Hans de Goede

usb-ehci: Drop unused sofv value

The sofv value only ever gets a value assigned and is never used (read)
anywhere, so we can just drop it.

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

f1ae32a1 03/13/2012 11:15 am Gerd Hoffmann

usb: the big rename

Reorganize usb source files. Create a new hw/usb/ directory and move
all usb source code to that place. Also make filenames a bit more
descriptive. Host adapters are prefixed with "hch-" now, usb device
emulations are prefixed with "dev-". Fixup paths Makefile and include...

fcb70eca 03/13/2012 11:15 am Hans de Goede

usb-ehci: drop unused isoch_pause variable

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