Statistics
| Branch: | Revision:

root / hw / usb / redirect.c @ fa2ddcb4

History | View | Annotate | Download (59.8 kB)

# Date Author Comment
fc3f6e1b 09/13/2012 10:50 am Hans de Goede

usb-redir: Add support for migration

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

09054d19 09/13/2012 10:50 am Hans de Goede

usb-redir: Add chardev open / close debug logging

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

35efba2c 09/13/2012 10:50 am Hans de Goede

usb-redir: Revert usb-redir part of commit 93bfef4c

Commit 93bfef4c6e4b23caea9d51e1099d06433d8835a4 makes qemu-devices
which report the qemu version string to the guest in some way use a
qemu_get_version function which reports a machine-specific version string....

8e60452a 09/13/2012 10:50 am Hans de Goede

usb-redir: Change cancelled packet code into a generic packet-id queue

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

9a8d4067 09/13/2012 10:50 am Hans de Goede

usb-redir: Add an already_in_flight packet-id queue

After a live migration, the usb-hcd will re-queue all packets by
walking over the schedule in the guest memory again, but requests which
were encountered on the migration source before will already be in flight,...

3f4be328 09/13/2012 10:50 am Hans de Goede

usb-redir: Store max_packet_size in endp_data

So that we've a place to migrate it to / from to allow restoring it after
migration.

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

ed9873bf 09/11/2012 08:43 am Hans de Goede

usb-redir: Don't delay handling of open events to a bottom half

There is no need for this, and doing so means that a backend trying to
write immediately after an open event will see qemu_chr_be_can_write
returning 0, which not all backends handle well as there is no wakeup...

cb897117 09/11/2012 08:43 am Hans de Goede

usb-redir: Get rid of async-struct get member

This is a preparation patch for completely getting rid of the async-packet
struct in usb-redir, instead relying on the (new) per ep queues in the
qemu usb core.

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

104981d5 09/11/2012 08:43 am Hans de Goede

usb-redir: Get rid of local shadow copy of packet headers

The shadow copy only serves as an extra check (besides the packet-id) to
ensure the packet we get back is a reply to the packet we think it is.

This check has never triggered in all the time usb-redir is in use now,...

206e7f20 09/11/2012 08:43 am Hans de Goede

usb-redir: Get rid of unused async-struct dev member

This is a preparation patch for completely getting rid of the async-packet
struct in usb-redir, instead relying on the (new) per ep queues in the
qemu usb core.

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

de550a6a 09/11/2012 08:43 am Hans de Goede

usb-redir: Move to core packet id and queue handling

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

2979a361 09/11/2012 08:43 am Hans de Goede

usb-redir: Return babble when getting more bulk data then requested

Babble is the appropriate error in this case (rather then signalling a stall).

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

be4a8928 09/11/2012 08:43 am Hans de Goede

usb-redir: Convert to new libusbredirparser 0.5 API

This gives us support for 64 bit ids which is needed for using XHCI with
the new hcd generated ids.

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

0fde3b7a 09/11/2012 08:43 am Hans de Goede

usb-redir: Set ep max_packet_size if available

This is needed for usb-redir to work properly with the xhci emulation.

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

910c1e6b 09/11/2012 08:43 am Hans de Goede

usb-redir: Add a usbredir_reject_device helper function

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

a508cc42 09/11/2012 08:43 am Hans de Goede

usb-redir: Ensure our peer has the necessary caps when redirecting to XHCI

In order for redirection to work properly when redirecting to an emulated
XHCI controller, the usb-redir-host must support both
usb_redir_cap_ep_info_max_packet_size and usb_redir_cap_64bits_ids,...

6c67446a 09/11/2012 08:43 am Hans de Goede

usb-redir: Enable pipelining for bulk endpoints

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

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

usb-redir: Never return USB_RET_NAK for async handled packets

USB_RET_NAK is not a valid response for async handled packets (and will
trigger an assert as such).

Also drop the warning when receiving a status of cancelled for packets not
cancelled by qemu itself, this can happen when a device gets unredirected...

adae502c 07/09/2012 12:59 pm Hans de Goede

usb-redir: Correctly handle the usb_redir_babble usbredir status

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

93bfef4c 06/19/2012 09:36 pm Crístian Viana

Allow machines to configure the QEMU_VERSION that's exposed via hardware

QEMU exposes its version to the guest's hardware and in some cases that is wrong
(e.g. Windows prints messages about driver updates when you switch
the QEMU version).
There is a new field now on the struct QEmuMachine, hw_version, which may...

1510168e 04/26/2012 01:21 pm Hans de Goede

usb-redir: An interface count of 0 is a valid value

An interface-count of 0 happens when a device is in unconfigured state when
it gets redirected. So we should not use 0 to detect not having received
interface info from our peer.

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

a0625c56 04/26/2012 01:21 pm Hans de Goede

usb-redir: Reset device address and speed on disconnect

Without this disconnected devices look like the last redirected device
in the monitor in "info usb".

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

b15cf49b 04/26/2012 01:21 pm Hans de Goede

usb-redir: Not finding an async urb id is not an error

We clear our pending async urb list on device disconnect and we may still
receive "packet complete" packets from our peer after this, which will then
refer to packet ids no longer in our list.

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

714f9db0 04/17/2012 11:23 am Hans de Goede

usb-redir: Notify our peer when we reject a device due to a speed mismatch

Also cleanup (reset) our device state when we reject a device due to a
speed mismatch.

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

65bb3a5c 04/17/2012 11:23 am Gerd Hoffmann

Add bootindex support to usb-host and usb-redir

When passing through a usb pendrive seabios will present it in the F12
boot menu and will happily boot from it.

This patch adds bootorder support so you can even make it the default
boot device.

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