Statistics
| Branch: | Revision:

root / hw / usb / redirect.c @ 077805fa

History | View | Annotate | Download (64.4 kB)

# Date Author Comment
8beba930 12/04/2012 03:41 pm Hans de Goede

usb: Call wakeup when data becomes available for all devices with int eps

This is necessary for proper interaction with the xhci controller, and it
will allow other hcds to lower there frame timer while waiting for interrupt
data.

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

234e810c 11/21/2012 03:55 pm Hans de Goede

usb-redir: Split usb_handle_interrupt_data into separate in/out functions

No functional changes.

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

723aedd5 11/21/2012 03:55 pm Hans de Goede

usb-redir: Don't handle interrupt output packets async

Instead report them as successfully completed directly on submission, this
has 2 advantages:

1) This matches the timing of interrupt output packets on real hardware,
with the previous async handling, if an ep has an interval of say 500 ms,...

2cb343b4 11/16/2012 12:27 pm Hans de Goede

usb-redir: Only add actually in flight packets to the in flight queue

Packets which are queued up, but not yet handed over to the device, are
not in flight.

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

618fbc95 11/16/2012 12:27 pm Hans de Goede

usb-redir: Set default debug level to warning

The previous default of 0 means that even errors and warnings would not
get printed, which is really not a good default.

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

9a77a0f5 11/08/2012 07:41 pm Hans de Goede

usb: split packet result into actual_length + status

Since with the ehci and xhci controllers a single packet can be larger
then maxpacketsize, it is possible for the result of a single packet
to be both having transferred some data as well as the transfer to have...

e94ca437 11/08/2012 07:41 pm Hans de Goede

usb-redir: Allow packets to have both data and an error-status

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

7e03d178 11/01/2012 04:21 pm Hans de Goede

usb-redir: Add an usbredir_setup_usb_eps() helper function

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

24ac283a 11/01/2012 04:21 pm Hans de Goede

usb-redir: Use reject rather the disconnect on bad ep info

So that the client gets a notification about us disconnecting the device.

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

cdfd3530 11/01/2012 04:21 pm Jan Kiszka

usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller

This follows the logic of host-linux: If a 2.0 device has no ISO
endpoint and no interrupt endpoint with a packet size > 64, we can
attach it also to an 1.1 host controller. In case the redir server does...

95a59dc0 11/01/2012 04:21 pm Hans de Goede

usb-redir: Allow redirecting super speed devices to high speed controllers

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

1b36c4d8 11/01/2012 04:20 pm Hans de Goede

usb-redir: Add support for input pipelining

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

c19a7981 11/01/2012 04:17 pm Hans de Goede

usb-redir: Add support for 32 bits bulk packet length

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

6ba43f1f 10/25/2012 10:08 am Hans de Goede

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

dbbf0195 10/11/2012 10:32 am Hans de Goede

usb-redir: Change usbredir_open_chardev into usbredir_create_parser

As we need to create the parser at more places.

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

5c16f767 10/11/2012 10:32 am Hans de Goede

usb-redir: Don't make migration fail in none seamless case

Instead simple disconnect the device like host redirection does on
migration.

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

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