]> git.proxmox.com Git - qemu.git/commit - trace-events
usb-ehci: multiqueue support
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 19 May 2011 15:56:19 +0000 (17:56 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 14 Jun 2011 10:56:40 +0000 (12:56 +0200)
commit8ac6d699c453e0f46e601597e371e9ae58c0237e
treeabdc76d99cdc78c3a0798e40d0df80af9feb93ab
parent0122f47279d18eb79fa63ddc550aa43a98d85faf
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:

 * The state machine will never ever stop in EXECUTING any more.
   Instead it will continue with the next queue (aka HORIZONTALQH) when
   the usb device returns USB_RET_ASYNC.
 * The state machine will stop processing when it figures it walks in
   circles (easy to figure now that we have a EHCIQueue struct for each
   QH we've processed).  The bailout logic should not be needed any
   more.  For now it is still in, but will assert() in case it triggers.
 * The state machine will just skip queues with a async USBPacket in
   flight.
 * The state machine will resume processing as soon as the async
   USBPacket is finished.

The patch also takes care to flush the QH struct back to guest memory
when needed, so we don't get stale data when (re-)loading it from guest
memory in FETCHQH state.

It also makes the writeback code to not touch the first three dwords of
the QH struct as the EHCI must not write them.  This actually fixes a
bug where QH chaining changes (next ptr) by the linux ehci driver where
overwritten by the emulated EHCI.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-ehci.c
trace-events