History | View | Annotate | Download (67.9 kB)
usb-ehci: add register names
The mmio register name list only had the names for four port statusregisters. We emulate a EHCI adapter with six ports though, the lasttwo ones are listed as "unknown" in traces. Fix it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-ehci: codestyle fixups
ehci: add assert
Coverity thinks q could be NULL there and warns.I believe it can't be NULL there.Add assert to prove it.
usb-ehci: Use PCI DMA stub functions
This updates the usb-ehci device emulation to use the explicit PCI DMAwrapper to initialize its scatter/gathjer structure. This means thisdriver should not need further changes when the sglist interface isextended to support IOMMUs....
usb: fix port reset
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicitdetach before (re-)attaching in usb_attach(). Some usb host controllersused that behavior though to do a port reset by a detach+attachsequence.
This patch establishes old behavior by adding a new usb_reset() function...
pci: interrupt pin documentation update
Fix up some erroneous comments in code:interrupt pins are named A-D, theinterrupt pin register is always readonlyand isn't zeroed out on reset.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
usb: claim port at device initialization time.
This patch makes qemu assign a port when creating the device, not whenattaching it. For most usb devices this isn't a noticable differencebecause they are in attached state all the time.
The change affects usb-host devices which live in detached state while...
usb-ehci: handle siTDs
This patch adds code to do minimal siTD handling, which is basicallyjust following the next pointer. This is good enougth to handle theinactive siTDs used by FreeBSD. Active siTDs are skipped too as wedon't have split transfer support in qemu, additionally a warning is...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ehci: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: rename pci_register_bar_region() to pci_register_bar()
ehci: iovec support, remove buffer
Map guest memory and pass on a direct pointer instead of copyingthe bits to a indirect buffer. EHCI transfer descriptors canreference multiple (physical guest) pages so we'll actually startseeing usb packets wich carry iovec with more than one element....
usb: use iovecs in USBPacket
Zap data pointer from USBPacket, add a QEMUIOVector instead.Add a bunch of helper functions to manage USBPacket data.Switch over users to the new interface.
Note that USBPacket->len was used for two purposes: First topass in the buffer size and second to return the number of...
ehci doesn't support migration
usb: Move (initial) call of usb_port_location to usb_fill_port
Cleanup / preparation patch for companion controller support. Note thatas a "side-effect" this patch also fixes the milkymist-softusb controllernot having a port_location set for its ports....
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 generalit makes sense to make portops take a port as argument. This also makesadding support for a companion controller easier / cleaner....
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 busop should be a device_detach bus op, as pending async packets from thedevice should be cancelled on detach not on destroy....
usb-ehci: drop unused num-ports state member
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-ehci: Connect Status bit is read only, don't allow changing it by the guest
usb-ehci: cleanup port reset handling
Doing a usb_attach when dev is NULL will just result in theport detach op getting called even though nothing was connected inthe first place.
usb-ehci: Fix handling of PED and PEDC port status bits
The PED bit should only be set for highspeed devices and the PEDC bitshould not be set on "normal" PED bit changes, only on io errors.
usb-ehci: Add support for registering companion controllers
ehci: fix port count.
The ICH4 EHCI controller which we emulate has six ports not four.
ehci: add ich9 controller.
ehci: add freq + maxframes properties
Add properties for the wakeup rate and the max number of frames ehciwill process at once.
The wakeup rate defaults to 1000 which equals the usb frame rate. Thiscan be reduced to make qemu wake up less often when ehci is active....
ehci: switch to nanoseconds
Make ehci use nanoseconds everywhere.Simplifies time calculations.
Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts: hw/usb-uhci.c
usb-ehci: move device/vendor/class id to qdev
usb: Use defines for serial bus release number register for EHCI
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: cancel async packets on unplug
This patch adds USBBusOps struct with (for now) only a single callbackwhich is called when a device is about to be destroyed. The USB Hostadapters are implementing this callback and use it to cancel any asyncrequests which might be in flight before the device actually goes away....
usb-ehci: drop EXECUTING checks.
The state machine doesn't stop in EXECUTING state any more when asyncpackets are in flight, so the checks are not needed any more and canbe dropped.
Also kick out the check for the frame timer. As we don't stop & sleep...
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 borderscorrectly by looking up the address of the next page. Luckily thelinux uses physically contigous memory so the data used to hits the...
usb-ehci: split trace calls to handle arg count limits
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 andclears the page address, which is not what we need when we update theoffset.
Second the offset calculation is wrong in case head isn't page aligned....
usb-ehci: fix error handling.
Set the correct bits for nodev, stall and babble errors.Raise errint irq. Fix state transition from WRITEBACKto the next state.
ehci: fix a number of unused-but-set-variable warnings (new with gcc-4.6)
usb-ehci: multiqueue support
This patch adds support for keeping multiple queues going at the sametime. One slow device will not affect other devices any more.
The patch adds code to manage EHCIQueue structs. It also does a numberof changes to the state machine:...
usb-ehci: trace buffer copy
Add a trace point for buffer copies and drop the DPRINTF's.
No change in behavior.
usb-ehci: add queue data struct
Add EHCIQueue struct, move the fields needed to track the queue stateinto that struct. Pass the new struct instead of ehci state down tofunctions which handle the queue state. Lot of variable references havechanged due to that without an actual functional change....
usb-ehci: trace mmio and usbsts
This patch starts adding trace support to ehci. It tracesupdates of the status register (USBSTS), mmio access andcontroller reset.
It also adds functions to set and clear status register bitsand puts them in use everywhere....
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 fortraceing the queue heads and transfer descriptors as we look at them.
Drop a few DPRINTFs and all DPRINTF_ST lines, they are obsolete now....
usb-ehci: trace port state
Trace usb port operations (attach, detach, reset),drop a few obsolete DPRINTF's.
usb-ehci: improve mmio tracing
Add a separate tracepoint to log how register values change in responseto a mmio write. Especially useful for registers which have read-onlyor clear-on-write bits in them.
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 MarkBurkley, with contributions by Niels de Vos. David S. Ahern continued...