It is possbile for bulk packets to transfer some of the data and to then stall. ATM our usb core allows us to return either data, or an error, not both. For now return the data rather then the stall when this happens, counting on further packets to detect the stall. In the future we should fix the qemu usb core to handle packets completing with some data and an error.
Signed-off-by: Hans de Goede <hdego...@redhat.com> --- hw/usb/redirect.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 022ba42..ae7393f 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1152,6 +1152,10 @@ static int usbredir_handle_status(USBRedirDevice *dev, case usb_redir_success: return actual_len; case usb_redir_stall: + if (actual_len > 0) { + WARNING("got both data and stall, returning data\n"); + return actual_len; + } return USB_RET_STALL; case usb_redir_cancelled: /* -- 1.7.12.1