History | View | Annotate | Download (54.4 kB)
remove double semicolons
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
use libusb for usb-host
Reimplement usb-host on top of libusb.Reasons to do this:
(1) Largely rewritten from scratch, nice opportunity to kill historical cruft. (2) Offload usbfs handling to libusb. (3) Have a single portable code base instead of bsd + linux variants....
usb-host: move legacy cmd line bits
The code handling the "-usbdevice host:..." legacy command linesyntax is moved to the new hw/usb/host-legacy.c file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-host: remove usb_host_device_close
Nobody implements that anyway.
HMP: add QDict to info callback handler
This patch change all info call back function to takeadditional QDict * parameter, which allow those commandtake parameter. Now it is set to NULL at default case.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>...
usb-host: Drop superfluous null test from usb_host_auto_scan()
Coverity points out that port is later passed to usb_host_open(),which dereferences it. It actually can't be null: it always points tousb_host_scan()'s auto port[]. Drop the superfluous port == NULL...
usb-host: Initialize dev->port the obviously safe way
Coverity worries the strcpy() could overrun the destination. Itcan't, because the source always points to usb_host_scan()'s autoport[], which has the same size. Use pstrcpy() anyway, to hush thechecker....
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....
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
usb: Don't allow USB_RET_ASYNC for interrupt packets
It is tempting to use USB_RET_ASYNC for interrupt packets, rather then thecurrent NAK + polling approach, but this causes issues for migration, asan async completed packet will not getting written back to guest memory until...
usb: host-linux: Ignore parsing errors of the device descriptors
The Linux is more tolerant here as well: Just stop parsing the devicedescriptors when an error is detected but do not reset what was foundso far. This allows to run buggy devices with partially invalid...
usb-host: update tracing
Now that we have separate status and length fields in USBPacketupdate the completion tracepoint to log both.
usb-host: fix splitted transfers
USBPacket->actual_length wasn't updated correctly for USBPacketssplitted into multiple urbs. Fix it.
usb-host: scan for usb devices when the vm starts
Commit a844ed842d9a9d929645c09ae0f52f753d7a02e0 leads to usb-hostdetecting devices not right after qemu startup because the guestisn't running yet. Instead they are found on the first of theregular usb device poll runs. Which is too late for seabios to see...
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...
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-host: allow emulated (non-async) control requests without USBPacket
xhci needs this for USB_REQ_SET_ADDRESS due to the wayusb addressing is handled by the xhci hardware.
usb: async control xfer fixup
Need to clear p->result after copying setup data using usb_packet_copy()because we'll reuse the USBPacket for the data transfer.
usb-host: add trace events for iso xfers
Replace iso transfer fprintf's with trace points. Also rename existingtracepoints so they all match usb_host_iso_*.
usb: split endpoint init and reset
Create a new usb_ep_reset() function to reset endpoint state, withoutre-initialiting the queues, so we don't unlink in-flight packets justbecause usb-host has to re-parse the descriptor tables.
usb-host: attach only to running guest
usb-host: live migration support
usb-host: handle guest-issued clear halt
Most important here is to update our internal endpoint state so we knowthe endpoint isn't in halted state any more. Without this usb-hosttries to clear halt again with the next data transfer submitted. Doingthis twice is (a) not correct and (b) confuses some usb devices,...
usb-host: don't dereference invalid iovecs
usb-host assumes the first iovec element is always valid.In case of a zero-length packet this isn't true though.
usb-host: fix zero-length packets
usb-host optimizes away zero-length packets by not entering theprocessing loop at all. Which isn't correct, we should submit azero-length urb to the host devicein that case. This patch makessure we run the processing loop at least once....
usb-host: rewrite usb_linux_update_endp_table
This patch carries a complete rewrite of the usb descriptor parser.Changes / improvements:
Add bootindex support to usb-host and usb-redir
When passing through a usb pendrive seabios will present it in the F12boot menu and will happily boot from it.
This patch adds bootorder support so you can even make it the defaultboot device.
usb-host: trace emulated requests
Add tracepoint to track completion of emulated control requests.
usb-host: trace canceled requests
Add tracepoints to track canceled requests.
usb-host: add usb packet to request tracepoints
Add pointer to USBPacket to all tracepoints tracking requests to make iteasier to identify them when multiple requests are in flight.
usb-host: add property to turn off pipelining
Add a property to usb-host to disable the bulk endpoint pipelining.
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...