Statistics
| Branch: | Revision:

root / hw / usb / hcd-xhci.c @ 9d055d8a

History | View | Annotate | Download (87.5 kB)

# Date Author Comment
d95e74ea 09/26/2012 10:24 am Gerd Hoffmann

xhci: tweak limits

Set maxports to 15. This is what the usb3 route string can handle.

Set maxslots to 64. This is more than the number of root ports we
can have, but with additional hubs you can end up with more devices.

Set maxintrs (aka msi vectors) to 16. Should be enougth, especially...

ccaf87a0 09/26/2012 10:24 am Gerd Hoffmann

xhci: route string & usb hub support

Parse route string in slot contexts and
support devices connected via hub.

1d8a4e69 09/26/2012 10:24 am Gerd Hoffmann

xhci: create a memory region for each port

Signed-off-by: Gerd Hoffmann <>

4c47f800 09/11/2012 08:43 am Gerd Hoffmann

xhci: add msix support

Signed-off-by: Gerd Hoffmann <>

2cae4119 09/11/2012 08:43 am Gerd Hoffmann

xhci: move register update into xhci_intr_raise

Now that we have a separate function to raise an IRQ we can move
some comon code into the function.

Signed-off-by: Gerd Hoffmann <>

962d11e1 09/11/2012 08:43 am Gerd Hoffmann

xhci: add XHCIInterrupter

Move all state belonging to the (single) interrupter into a separate
struct. First step in adding support for multiple interrupters.

Signed-off-by: Gerd Hoffmann <>

43d9d604 09/11/2012 08:43 am Gerd Hoffmann

xhci: prepare xhci_runtime_{read,write} for multiple interrupters

Prepare xhci runtime register access function for multiple interrupters.

Signed-off-by: Gerd Hoffmann <>

2d1de850 09/11/2012 08:43 am Gerd Hoffmann

xhci: pick target interrupter

Pick the correct interrupter when queuing an event.

Signed-off-by: Gerd Hoffmann <>

fa8ee89e 09/11/2012 08:43 am Gerd Hoffmann

xhci: support multiple interrupters

Everything is in place, flip the big switch now
and enable support for multiple interrupters.

Signed-off-by: Gerd Hoffmann <>

1b067564 09/11/2012 08:43 am Gerd Hoffmann

xhci: kill xhci_mem_{read,write} dispatcher functions

... and register subregions instead, so we offload the dispatching
to the the memory subsystem which is designed to handle it.

Signed-off-by: Gerd Hoffmann <>

6ee021d4 09/11/2012 08:43 am Gerd Hoffmann

xhci: allow bytewise capability register reads

Some guests need this according to
Alejandro Martinez Ruiz <>

Signed-off-by: Gerd Hoffmann <>

d5a15814 09/11/2012 08:43 am Gerd Hoffmann

xhci: drop buffering

This patch splits the xhci_xfer_data function into three.
The xhci_xfer_data function used to do does two things:

(1) copy transfer data between guest memory and a temporary buffer.
(2) report transfer results to the guest using events....
5c08106f 09/11/2012 08:43 am Gerd Hoffmann

xhci: move device lookup into xhci_setup_packet

Signed-off-by: Gerd Hoffmann <>

01546fa6 09/11/2012 08:43 am Gerd Hoffmann

xhci: implement mfindex

Implement mfindex register and mfindex wrap event.

Signed-off-by: Gerd Hoffmann <>

3d139684 09/11/2012 08:43 am Gerd Hoffmann

xhci: iso xfer support

Add support for iso transfers.

Signed-off-by: Gerd Hoffmann <>

873123fe 09/11/2012 08:43 am Gerd Hoffmann

xhci: trace cc codes in cleartext

Signed-off-by: Gerd Hoffmann <>

d829fde9 09/11/2012 08:43 am Gerd Hoffmann

xhci: add trace_usb_xhci_ep_set_dequeue

Signed-off-by: Gerd Hoffmann <>

8e9f18b6 09/11/2012 08:43 am Gerd Hoffmann

xhci: fix runtime write tracepoint

Signed-off-by: Gerd Hoffmann <>

106b214c 09/11/2012 08:43 am Gerd Hoffmann

xhci: update register layout

Change the register layout to be a bit more sparse and also not depend
on the number of ports. Useful when for making the number of ports
runtime-configurable.

0846e635 09/11/2012 08:43 am Gerd Hoffmann

xhci: update port handling

This patch changes the way xhci ports are linked to USBPorts. The fixed
1:1 relationship between xhci ports and USBPorts is gone. Now each
USBPort represents a physical plug which has usually two xhci ports
assigned: one usb2 and ond usb3 port. usb devices show up at one or the...

c5e9b02d 09/11/2012 08:43 am Gerd Hoffmann

xhci: fix & cleanup msi.

Drop custom write_config function which isn't needed any more.
Make the msi property a bit property so it accepts 'on' & 'off'.
Enable MSI by default.

TODO: add compat property to disable on old machine types.

Signed-off-by: Gerd Hoffmann <>

4c4abe7c 09/11/2012 08:43 am Gerd Hoffmann

xhci: rework interrupt handling

Split xhci_irq_update into a function which handles intx updates
(including lowering the irq line once the guests acks the interrupt)
and one which is used for raising an irq only.

Signed-off-by: Gerd Hoffmann <>

331e9406 09/11/2012 08:43 am Gerd Hoffmann

xhci: rip out background transfer code

original xhci code (the one which used libusb directly) used to use
'background transfers' for iso streams. In upstream qemu the iso
stream buffering is handled by usb-host & usb-redir, so we will
never ever need this. It has been left in as reference, but is dead...

e983395d 08/31/2012 12:57 pm Gerd Hoffmann

usb: unique packet ids

This patch adds IDs to usb packets. Those IDs are (a) supposed to be
unique for the lifecycle of a packet (from packet setup until the packet
is either completed or canceled) and (b) stable across migration.

uhci, ohci, ehci and xhci use the guest physical address of the transfer...

0703a4a7 06/07/2012 11:02 am Gerd Hoffmann

xhci: trace: ring fetch

Signed-off-by: Gerd Hoffmann <>

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

xhci: trace: endpoints

Signed-off-by: Gerd Hoffmann <>

97df650b 06/07/2012 11:02 am Gerd Hoffmann

xhci: trace: transfers

Signed-off-by: Gerd Hoffmann <>

348f1037 06/07/2012 11:02 am Gerd Hoffmann

xhci: trace: slots

Signed-off-by: Gerd Hoffmann <>

64619739 06/07/2012 11:02 am Jan Kiszka

xhci: Clean up reset function

Properly register reset function via the device class.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Gerd Hoffmann <>

2d754a10 06/07/2012 11:02 am Gerd Hoffmann

xhci: trace: mmio reads+writes

Signed-off-by: Gerd Hoffmann <>

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

xhci: trace: run+stop

Signed-off-by: Gerd Hoffmann <>

7acd279f 06/07/2012 11:02 am Gerd Hoffmann

xhci: trace: irq + events

Signed-off-by: Gerd Hoffmann <>

59a70ccd 04/26/2012 01:21 pm David Gibson

usb-xhci: Use PCI DMA helper functions

Shortly before 1.0, we added helper functions / wrappers for doing PCI DMA
from individual devices. This makes what's going on clearer and means that
when we add IOMMU support somewhere in the future, only the general PCI...

215bff17 04/26/2012 01:21 pm Lai Jiangshan

usb-xhci: fix bit test

use & instead of the wrong &&

Signed-off-by: Lai Jiangshan <>
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...