qemu-e2k/hw/usb
Hans de Goede 723aedd532 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,
then there would be 500+ ms between the submission and the guest seeing the
completion, as we wont do the write back until the qh gets polled again. And
in the mean time the guest may very well have timed out, as the guest can
reasonable expect a much quicker completion.

2) This fixes interrupt output packets potentially getting send twice
surrounding a migration. As we delay the writeback to guest memory until
the qh gets polled again, there is a window between completion and writeback
where migration can happen, in this case the destination will not know
about the completion, and it will execute the packet *again*

But it does also come with a disadvantage:

1) If the actual interrupt out to the real usb device fails, there is no
way to report this back to the guest.

This patch assumes however that interrupt outs in practice never fail, as
they are only used by specialized drivers, which are unlikely to issue illegal
requests (unlike general class drivers which often issue requests which some
devices don't implement). And that thus the advantages outway the disadvantage.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-21 14:55:54 +01:00
..
bus.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
combined-packet.c usb/combined-packet: Move freeing of combined to usb_combined_packet_remove() 2012-11-08 18:41:47 +01:00
core.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +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 usb-bt: Return NAK instead of STALL when interrupt ep has no data 2012-11-21 14:55:54 +01:00
dev-hid.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-hub.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-network.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-serial.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-smartcard-reader.c usb-smartcard-reader: Properly NAK interrupt eps when we've no events 2012-11-21 14:55:54 +01:00
dev-storage.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-uas.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-wacom.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
hcd-ehci-pci.c ehci: handle dma errors 2012-11-16 11:27:32 +01:00
hcd-ehci-sysbus.c usb/ehci: add sysbus variant 2012-11-01 13:10:10 +01:00
hcd-ehci.c ehci: handle dma errors 2012-11-16 11:27:32 +01:00
hcd-ehci.h ehci: Add support for packets with both data and an error status 2012-11-08 18:41:47 +01:00
hcd-musb.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
hcd-ohci.c Merge remote-tracking branch 'bonzini/scsi-next' into staging 2012-11-14 08:50:45 -06:00
hcd-uhci.c uhci: Fix double unlink 2012-11-21 14:55:54 +01:00
hcd-xhci.c xhci: Fix some DMA host endian bugs 2012-11-09 08:27:55 +01:00
host-bsd.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
host-linux.c usb-host: fix splitted transfers 2012-11-16 11:27:32 +01:00
host-stub.c
libhw.c usb: Fix (another) bug in usb_packet_map() for IOMMU handling 2012-11-16 11:27:05 +01:00
Makefile.objs usb: Add packet combining functions 2012-11-01 15:17:58 +01:00
redirect.c usb-redir: Don't handle interrupt output packets async 2012-11-21 14:55:54 +01:00