Statistics
| Branch: | Revision:

root / hw / usb / core.c @ 9d055d8a

History | View | Annotate | Download (20.3 kB)

# Date Author Comment
c13a9e61 09/11/2012 08:42 am Hans de Goede

usb-core: Add a usb_ep_find_packet_by_id() helper function

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

9c1f6765 09/11/2012 08:42 am Hans de Goede

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-queued
after the migration and the original queuing from the migration source side
has already finished.

Signed-off-by: Hans de Goede <>...

cc409974 09/11/2012 08:42 am Hans de Goede

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 needing
to re-init it.

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

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...

0132b4b6 08/31/2012 12:55 pm Hans de Goede

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 the
ep queue, and inside the controller code cancel all pending packets on an
error.

There are multiple reasons for this:...

c19537a1 08/16/2012 09:39 am Gerd Hoffmann

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.

Signed-off-by: Gerd Hoffmann <>

23797df3 07/09/2012 08:35 pm Anthony Liguori

Merge remote-tracking branch 'mjt/mjt-iov2' into staging

  • mjt/mjt-iov2:
    rewrite iov_send_recv() and move it to iov.c
    cleanup qemu_co_sendv(), qemu_co_recvv() and friends
    export iov_send_recv() and use it in iov_send() and iov_recv()
    rename qemu_sendv to iov_send, change proto and move declarations to iov.h...
7c37e6a4 07/09/2012 12:59 pm Gerd Hoffmann

usb: fix interface initialization

zero is a valid interface number, so don't use it when resetting the
endpoints.

Signed-off-by: Gerd Hoffmann <>

19deaa08 07/09/2012 12:59 pm Gerd Hoffmann

usb: split endpoint init and reset

Create a new usb_ep_reset() function to reset endpoint state, without
re-initialiting the queues, so we don't unlink in-flight packets just
because usb-host has to re-parse the descriptor tables.

Signed-off-by: Gerd Hoffmann <>

dcf6f5e1 06/07/2012 07:43 pm Michael Tokarev

change iov_* function prototypes to be more appropriate

Reorder arguments to be more natural, readable and
consistent with other iov_* functions, and change
argument names, from:
iov_from_buf(iov, iov_cnt, buf, iov_off, size)
to
iov_from_buf(iov, iov_cnt, offset, buf, bytes)...

0cc6a0f1 04/26/2012 01:21 pm Gerd Hoffmann

usb-ehci: add missing usb_packet_init() call

Signed-off-by: Gerd Hoffmann <>

f5bf14bf 04/17/2012 11:23 am Gerd Hoffmann

usb_packet_set_state: handle p->ep == NULL

usb_packet_set_state can be called with p->ep = NULL. The tracepoint
there tries to log endpoint information, which leads to a segfault.
This patch makes usb_packet_set_state handle the NULL pointer properly.

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...

5ac2731c 03/13/2012 11:15 am Gerd Hoffmann

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.

Signed-off-by: Gerd Hoffmann <>