[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/54] usb-redir: Never return USB_RET_NAK for async
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 17/54] usb-redir: Never return USB_RET_NAK for async handled packets |
Date: |
Thu, 6 Sep 2012 09:12:18 +0200 |
From: Hans de Goede <address@hidden>
USB_RET_NAK is not a valid response for async handled packets (and will
trigger an assert as such).
Also drop the warning when receiving a status of cancelled for packets not
cancelled by qemu itself, this can happen when a device gets unredirected
by the usbredir-host while transfers are pending.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/redirect.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 10b4fbb..7f3719b 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1028,11 +1028,14 @@ static int usbredir_handle_status(USBRedirDevice *dev,
case usb_redir_stall:
return USB_RET_STALL;
case usb_redir_cancelled:
- WARNING("returning cancelled packet to HC?\n");
- return USB_RET_NAK;
+ /*
+ * When the usbredir-host unredirects a device, it will report a status
+ * of cancelled for all pending packets, followed by a disconnect msg.
+ */
+ return USB_RET_IOERROR;
case usb_redir_inval:
WARNING("got invalid param error from usb-host?\n");
- return USB_RET_NAK;
+ return USB_RET_IOERROR;
case usb_redir_babble:
return USB_RET_BABBLE;
case usb_redir_ioerror:
--
1.7.1
- [Qemu-devel] [PATCH 16/54] ehci: Correct a comment in fetchqtd packet processing, (continued)
- [Qemu-devel] [PATCH 16/54] ehci: Correct a comment in fetchqtd packet processing, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 08/54] ehci: Properly cleanup packets on cancel, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 10/54] ehci: check for EHCI_ASYNC_FINISHED first in ehci_free_packet, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 02/54] usb-core: Don't set packet state to complete on a nak, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 14/54] ehci: Fix memory leak in handling of NAK-ed packets, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 07/54] ehci: Update copyright headers to reflect recent work, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 06/54] ehci: Validate qh is not changed unexpectedly by the guest, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 11/54] ehci: trace guest bugs, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 19/54] usb-redir: Get rid of async-struct get member, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 13/54] ehci: Add some additional ehci_trace_guest_bug() calls, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 17/54] usb-redir: Never return USB_RET_NAK for async handled packets,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 40/54] xhci: update port handling, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 39/54] xhci: update register layout, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 28/54] usb-redir: Enable pipelining for bulk endpoints, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 41/54] usb3: superspeed descriptors, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 44/54] usb-storage: usb3 support, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 25/54] usb-redir: Set ep max_packet_size if available, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 30/54] usb-audio: fix usb version, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 43/54] usb3: bos decriptor, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 52/54] xhci: support multiple interrupters, Gerd Hoffmann, 2012/09/06
- [Qemu-devel] [PATCH 21/54] usb-redir: Get rid of unused async-struct dev member, Gerd Hoffmann, 2012/09/06