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 towrite immediately after an open event will see qemu_chr_be_can_writereturning 0, which not all backends handle well as there is no wakeup...
ehci: Properly report completed but not yet processed packets to the guest
Reported packets which have completed before being cancelled as such to thehost. Note that the new code path this patch adds is untested since it I'vebeen unable to actually trigger the race which needs this code path....
ehci: check for EHCI_ASYNC_FINISHED first in ehci_free_packet
Otherwise we'll see the packet free twice in the trace log even thoughit actually happens only once.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ehci: trace guest bugs
make qemu_queue_{cancel,reset} return the number of packets released,so the caller can figure whenever there have been active packets eventhough there shouldn't have been any. Add tracepoint to log this.
ehci: add doorbell trace events
ehci: Add some additional ehci_trace_guest_bug() calls
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ehci: Fix memory leak in handling of NAK-ed packets
Currently each time we try to execute a NAK-ed packet we redoehci_init_transfer, and usb_packet_map, re-allocing (without freeing) thesg list every time.
This patch fixes this, it does this by introducing another async state, so...
ehci: Handle USB_RET_PROCERR in ehci_fill_queue
USB_RET_PROCERR can be triggered by the guest (by for example requesting morethen BUFFSIZE bytes), so don't assert on it.
ehci: Correct a comment in fetchqtd packet processing
Since my previous comment said "Should never happen", I tried changing thenext line to an assert(0), which did not go well, which as the new commentsexplains is logical if you think about it for a moment....
usb-redir: Never return USB_RET_NAK for async handled packets
USB_RET_NAK is not a valid response for async handled packets (and willtrigger an assert as such).
Also drop the warning when receiving a status of cancelled for packets notcancelled by qemu itself, this can happen when a device gets unredirected...
View revisions
Also available in: Atom