qemu/hw/usb
Hans de Goede f79738b03b usb: Add an usb_device_ep_stopped USBDevice method
Some usb devices (host or network redirection) can benefit from knowing when
the guest stops using an endpoint. Redirection may involve submitting packets
independently from the guest (in combination with a fifo buffer between the
redirection code and the guest), to ensure that buffers of the real usb device
are timely emptied. This is done for example for isoc traffic and for interrupt
input endpoints. But when the (re)submission of packets is done by the device
code, then how does it know when to stop this?

For isoc endpoints this is handled by detecting a set interface (change alt
setting) command, which works well for isoc endpoints. But for interrupt
endpoints currently the redirection code never stops receiving data from
the device, which is less then ideal.

However the controller emulation is aware when a guest looses interest, as
then the qh for the endpoint gets unlinked (ehci, ohci, uhci) or the endpoint
is explicitly stopped (xhci). This patch adds a new ep_stopped USBDevice
method and modifies the hcd code to call this on queue unlink / ep stop.

This makes it possible for the redirection code to properly stop receiving
interrupt input (*) data when the guest no longer has interest in it.

*) And in the future also buffered bulk input.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-07 12:57:24 +01:00
..
bus.c usb: Add an usb_device_ep_stopped USBDevice method 2013-01-07 12:57:24 +01:00
combined-packet.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
core.c usb: Fix usb_ep_find_packet_by_id 2013-01-07 12:57:24 +01:00
desc.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
desc.h usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-audio.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-bluetooth.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
dev-hid.c hid: Change idle handling to use a timer 2013-01-07 12:57:24 +01:00
dev-hub.c usb: Call wakeup when data becomes available for all devices with int eps 2012-12-04 14:41:54 +01:00
dev-network.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dev-serial.c softmmu: move remaining include files to include/ subdirectories 2012-12-19 08:32:46 +01:00
dev-smartcard-reader.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
dev-storage.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dev-uas.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
dev-wacom.c ui: move files to ui/ and include/ui/ 2012-12-19 08:31:30 +01:00
hcd-ehci-pci.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
hcd-ehci-sysbus.c ehci-sysbus: Attach DMA context. 2012-11-29 08:04:13 +01:00
hcd-ehci.c usb: Add an usb_device_ep_stopped USBDevice method 2013-01-07 12:57:24 +01:00
hcd-ehci.h ehci: Verify a queue's ep direction does not change 2013-01-07 12:57:23 +01:00
hcd-musb.c misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
hcd-ohci.c usb: Add an usb_device_ep_stopped USBDevice method 2013-01-07 12:57:24 +01:00
hcd-uhci.c usb: Add an usb_device_ep_stopped USBDevice method 2013-01-07 12:57:24 +01:00
hcd-xhci.c usb: Add an usb_device_ep_stopped USBDevice method 2013-01-07 12:57:24 +01:00
host-bsd.c monitor: move include files to include/monitor/ 2012-12-19 08:31:32 +01:00
host-linux.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
host-stub.c monitor: move include files to include/monitor/ 2012-12-19 08:31:32 +01:00
libhw.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
Makefile.objs usb: Add packet combining functions 2012-11-01 15:17:58 +01:00
redirect.c usb/redirect.c: unbreak compilation due to include/char/char.h 2012-12-28 16:09:33 +00:00