History | View | Annotate | Download (22.1 kB)
usb: add usb_ep_set_halted
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: make usb_packet_copy operate on combined packets
Likewise usb_packet_skip.Also usb_packet_size.
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.
usb: Fix usb_ep_find_packet_by_id
usb_ep_find_packet_by_id mistakenly only checks the first packet and if thatis not a match, keeps trying the first packet! This patch fixes this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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: 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: Add packet combining functions
Currently we only do pipelining for output endpoints, since to properlysupport short-not-ok semantics we can only have one outstanding inputpacket. Since the ehci and uhci controllers have a limited per td packetsize guests will split large input transfers to into multiple packets,...
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
usb: Enforce iso endpoints never returing USB_RET_ASYNC
ehci was already testing for this, and we depend in various placeson no devices doing this, so lets move the check for this to theusb core.
usb: Rename __usb_packet_complete to usb_packet_complete_one
And make it available for use outside of core.c
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...
usb-core: Add a usb_ep_find_packet_by_id() helper function
usb-core: Allow the first packet of a pipelined ep to complete immediately
This can happen with usb-redir live-migration when the packet gets re-queuedafter the migration and the original queuing from the migration source sidehas already finished.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
usb-core: Don't set packet state to complete on a nak
This way the hcd can re-use the same packet to retry without needingto re-init it.
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...
usb: Halt ep queue en cancel pending packets on a packet error
For controllers which queue up more then 1 packet at a time, we must halt theep queue, and inside the controller code cancel all pending packets on anerror.
There are multiple reasons for this:...
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.
Merge remote-tracking branch 'mjt/mjt-iov2' into staging
usb: fix interface initialization
zero is a valid interface number, so don't use it when resetting theendpoints.
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.
change iov_* function prototypes to be more appropriate
Reorder arguments to be more natural, readable andconsistent with other iov_* functions, and changeargument names, from: iov_from_buf(iov, iov_cnt, buf, iov_off, size)to iov_from_buf(iov, iov_cnt, offset, buf, bytes)...
usb-ehci: add missing usb_packet_init() call
usb_packet_set_state: handle p->ep == NULL
usb_packet_set_state can be called with p->ep = NULL. The tracepointthere tries to log endpoint information, which leads to a segfault.This patch makes usb_packet_set_state handle the NULL pointer properly.
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...
usb: improve packet state sanity checks
Add a new function to check whenever the packet state is as expected,log more informations in case it isn't.