History | View | Annotate | Download (97.2 kB)
xhci: fix numintrs sanity checks
Make sure numintrs is a power of two, msi requires this.
https://bugzilla.redhat.com/show_bug.cgi?id=918035
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pcie: Add endpoint capability initialization wrapper
Fix the awkward API of mangling the caller specified PCIe type andjust provide an interface to initialize an endpoint device. Thiswill pick either a regular endpoint or integrated endpoint based onthe bus and return pcie_cap_init to doing exactly what is asked....
xhci: fix bad print specifier
This fixes the following compilation error:hw/usb/hcd-xhci.c:1156:17: error: format ‘%llx’ expects argument of type‘long long unsigned int’, but argument 4 has type ‘unsigned int’
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
usb-xhci: usb3 streams
Add streams support to the xhci emulation. No secondary streams yet,only linear stream arays are supported for now.
usb-core: usb3 streams
This patch adds support for usb3 streams to the usb subsystem core.This is just adding a streams field / parameter in a number of places.
xhci: create xhci_detach_slot helper function
xhci: call xhci_detach_slot on root port detach too
xhci: nuke transfe5rs on detach
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
usb: Add an usb_device_ep_stopped USBDevice method
Some usb devices (host or network redirection) can benefit from knowing whenthe guest stops using an endpoint. Redirection may involve submitting packetsindependently from the guest (in combination with a fifo buffer between the...
xhci: call set-address with dummy usbpacket
Due to the way devices are addressed with xhci (done by hardware, notthe guest os) there is no packet when invoking the set-address controlrequest. Create a dummy packet in that case to avoid null pointerdereferences....
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
pci: update all users to look in pci/
update all users so we can remove the makefile hack.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
usb: tag usb host adapters as not hotpluggable.
Hotplugging them simply doesn't work, so tag them accordingly toavoid users trying and then crashing qemu.
For xhci there is nothing fundamental which prevents hotplug fromworking, we'll "only" need a exit() function which cleans up...
xhci: Fix some DMA host endian bugs
The xhci device does correct endian switches on the results of some DMAsbut not all. In particular, there are many DMAs of what are essentiallyarrays of 32-bit integers which never get byteswapped. This causes them...
xhci: Add support for packets with both data and an error status
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: split packet result into actual_length + status
Since with the ehci and xhci controllers a single packet can be largerthen maxpacketsize, it is possible for the result of a single packetto be both having transferred some data as well as the transfer to have...
xhci: add {get,set}_field macros & enum for pls
Add {get,set}_field macros (simliar to ehci) to read and updatesome bits of a word. Put them into use for updating pls (portlink state) values. Also add a enum for pls values.
xhci: s/xhci_update_port/xhci_port_update/
Rename the function for xhci_port_* naming scheme, also dropthe xhci parameter as port carries a pointer to xhci anyway.
xhci: add xhci_port_have_device
Factor out the code which checks whenever a usb device is attachedto the port in question. No functional change.
xhci: add xhci_port_notify
Create a function to notify the guest about portstatus changes and put it into use.
xhci: add xhci_port_reset
Move port reset logic to its own function.
xhci: set pls in xhci_port_update & xhci_port_reset
Set the port link state to the correct values in xhci_port_update andxhci_port_reset functions.
xhci: add port trace points
xhci: allow address slot being called multiple times
win8 guests do that for some reason ...
xhci: fix usb name in caps
Used to be "UTB" not "USB".
xhci: make number of interrupters and slots configurable
Add properties to tweak the numbers of available interrupters and slots.
xhci: allow disabling interrupters
For secondary interrupters this is explicitly allowed in the specs.For the primary interrupter behavior is undefined, lets be friendlyand allow disabling too.
xhci: flush endpoint context unconditinally
Not updating the endpoint context in case the state didn't change iswrong. Other context fields might have changed, for example thedequeue pointer in response to a CR_SET_TR_DEQUEUE command.
xhci: fix function name in error message
usb: Move clearing of queue on halt to the core
hcds which queue up more then one packet at once (uhci, ehci and xhci),must clear the queue after an error which has caused the queue to halt.
Currently this is handled as a special case inside the hcd code, this...
usb: Move short-not-ok handling to the core
After a short-not-ok packet ending short, we should not advance the queue.Move enforcing this to the core, rather then handling it in the hcd code.
This may result in the queue now actually containing multiple input packets...
usb: Add an int_req flag to USBPacket
xhci: Add a xhci_ep_nuke_one_xfer helper function
usb: Add USB_RET_ADD_TO_QUEUE packet result code
This can be used by usb-device code which wishes to process an entire endpointqueue at once, to do this the usb-device code returns USB_RET_ADD_TO_QUEUEfrom its handle_data class method and defines a flush_ep_queue class method...
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
cleanup useless return sentence
This patch cleans up return sentences in the end of void functions.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Amos Kong <akong@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
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 wecan have, but with additional hubs you can end up with more devices.
Set maxintrs (aka msi vectors) to 16. Should be enougth, especially...
xhci: route string & usb hub support
Parse route string in slot contexts andsupport devices connected via hub.
xhci: create a memory region for each port
xhci: add msix support
xhci: move register update into xhci_intr_raise
Now that we have a separate function to raise an IRQ we can movesome comon code into the function.
xhci: add XHCIInterrupter
Move all state belonging to the (single) interrupter into a separatestruct. First step in adding support for multiple interrupters.
xhci: prepare xhci_runtime_{read,write} for multiple interrupters
Prepare xhci runtime register access function for multiple interrupters.
xhci: pick target interrupter
Pick the correct interrupter when queuing an event.
xhci: support multiple interrupters
Everything is in place, flip the big switch nowand enable support for multiple interrupters.
xhci: kill xhci_mem_{read,write} dispatcher functions
... and register subregions instead, so we offload the dispatchingto the the memory subsystem which is designed to handle it.
xhci: allow bytewise capability register reads
Some guests need this according toAlejandro Martinez Ruiz <alex@securiforest.com>
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....
xhci: move device lookup into xhci_setup_packet
xhci: implement mfindex
Implement mfindex register and mfindex wrap event.
xhci: iso xfer support
Add support for iso transfers.
xhci: trace cc codes in cleartext
xhci: add trace_usb_xhci_ep_set_dequeue
xhci: fix runtime write tracepoint
xhci: update register layout
Change the register layout to be a bit more sparse and also not dependon the number of ports. Useful when for making the number of portsruntime-configurable.
xhci: update port handling
This patch changes the way xhci ports are linked to USBPorts. The fixed1:1 relationship between xhci ports and USBPorts is gone. Now eachUSBPort represents a physical plug which has usually two xhci portsassigned: one usb2 and ond usb3 port. usb devices show up at one or the...
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.
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.
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 isostream buffering is handled by usb-host & usb-redir, so we willnever ever need this. It has been left in as reference, but is dead...
usb: unique packet ids
This patch adds IDs to usb packets. Those IDs are (a) supposed to beunique for the lifecycle of a packet (from packet setup until the packetis either completed or canceled) and (b) stable across migration.
uhci, ohci, ehci and xhci use the guest physical address of the transfer...
xhci: trace: ring fetch
xhci: trace: endpoints
xhci: trace: transfers
xhci: trace: slots
xhci: Clean up reset function
Properly register reset function via the device class.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: trace: mmio reads+writes
xhci: trace: run+stop
xhci: trace: irq + events
usb-xhci: Use PCI DMA helper functions
Shortly before 1.0, we added helper functions / wrappers for doing PCI DMAfrom individual devices. This makes what's going on clearer and means thatwhen we add IOMMU support somewhere in the future, only the general PCI...
usb-xhci: fix bit test
use & instead of the wrong &&
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: the big rename
Reorganize usb source files. Create a new hw/usb/ directory and moveall usb source code to that place. Also make filenames a bit moredescriptive. Host adapters are prefixed with "hch-" now, usb deviceemulations are prefixed with "dev-". Fixup paths Makefile and include...