[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/12] usb-redir: When a packet contains data on a s
From: |
Hans de Goede |
Subject: |
[Qemu-devel] [PATCH 01/12] usb-redir: When a packet contains data on a stall, ignore the stall |
Date: |
Mon, 8 Oct 2012 09:51:25 +0200 |
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 <address@hidden>
---
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
- [Qemu-devel] [PATCH 00/12] RFC: usb: input pipelining support and other speedups, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 02/12] usb-redir: Add support for 32 bits bulk packet length, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 01/12] usb-redir: When a packet contains data on a stall, ignore the stall,
Hans de Goede <=
- [Qemu-devel] [PATCH 07/12] uhci: Add support for input queuing, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 08/12] ehci: Get rid of packet tbytes field, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 03/12] usb-host-linux: Only enabling pipeling for output endpoints, Hans de Goede, 2012/10/08
- [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/08
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Gerd Hoffmann, 2012/10/08
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/08
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Gerd Hoffmann, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Gerd Hoffmann, 2012/10/09
- Re: [Qemu-devel] [PATCH 04/12] usb: Add support for input pipelining, Hans de Goede, 2012/10/09