[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/22] usb-redir: When a packet contains data on a s
From: |
Hans de Goede |
Subject: |
[Qemu-devel] [PATCH 16/22] usb-redir: When a packet contains data on a stall, ignore the stall |
Date: |
Mon, 15 Oct 2012 12:38: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 84b9705..99e25d4 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 02/22] uhci: Move checks to continue queuing to uhci_fill_queue(), (continued)
- [Qemu-devel] [PATCH 02/22] uhci: Move checks to continue queuing to uhci_fill_queue(), Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 04/22] ehci: Set int flag on a short input packet, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 07/22] ehci: Detect going in circles when filling the queue, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 08/22] xhci: Add a xhci_ep_nuke_one_xfer helper function, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 05/22] ehci: Improve latency of interrupt delivery and async schedule scanning, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 10/22] usb: Add USB_RET_ADD_TO_QUEUE packet result code, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 09/22] usb: Rename __usb_packet_complete to usb_packet_complete_one, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 13/22] usb: Add an int_req flag to USBPacket, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 16/22] usb-redir: When a packet contains data on a stall, ignore the stall,
Hans de Goede <=
- [Qemu-devel] [PATCH 17/22] usb-redir: Add support for 32 bits bulk packet length, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 12/22] usb: Move short-not-ok handling to the core, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 11/22] usb: Move clearing of queue on halt to the core, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 15/22] combined-packet: Add a workaround for Linux usbfs + live migration, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 14/22] usb: Add packet combining functions, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 22/22] usb-redir: Allow redirecting super speed devices to high speed controllers, Hans de Goede, 2012/10/15
- [Qemu-devel] [PATCH 20/22] usb-redir: Use reject rather the disconnect on bad ep info, Hans de Goede, 2012/10/15