|
|
5544c1 |
From 262c9bb1e59c2cd561dad1cf9d47c50f07af0e0f Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
c8dfc6 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Date: Fri, 17 Aug 2012 17:27:08 +0200
|
|
|
5544c1 |
Subject: [PATCH] usb-redir: Never return USB_RET_NAK for async handled
|
|
|
5544c1 |
packets
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
USB_RET_NAK is not a valid response for async handled packets (and will
|
|
Hans de Goede |
c8dfc6 |
trigger an assert as such).
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Also drop the warning when receiving a status of cancelled for packets not
|
|
Hans de Goede |
c8dfc6 |
cancelled by qemu itself, this can happen when a device gets unredirected
|
|
Hans de Goede |
c8dfc6 |
by the usbredir-host while transfers are pending.
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
5544c1 |
(cherry picked from commit 181133404f520fab40a3ad40d935d91cf3cf546c)
|
|
|
5544c1 |
|
|
|
5544c1 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
Hans de Goede |
c8dfc6 |
---
|
|
Hans de Goede |
c8dfc6 |
hw/usb/redirect.c | 9 ++++++---
|
|
Hans de Goede |
c8dfc6 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
|
|
|
5544c1 |
index 10b4fbb..7f3719b 100644
|
|
Hans de Goede |
c8dfc6 |
--- a/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
+++ b/hw/usb/redirect.c
|
|
|
5544c1 |
@@ -1028,11 +1028,14 @@ static int usbredir_handle_status(USBRedirDevice *dev,
|
|
Hans de Goede |
c8dfc6 |
case usb_redir_stall:
|
|
Hans de Goede |
c8dfc6 |
return USB_RET_STALL;
|
|
Hans de Goede |
c8dfc6 |
case usb_redir_cancelled:
|
|
Hans de Goede |
c8dfc6 |
- WARNING("returning cancelled packet to HC?\n");
|
|
Hans de Goede |
c8dfc6 |
- return USB_RET_NAK;
|
|
Hans de Goede |
c8dfc6 |
+ /*
|
|
Hans de Goede |
c8dfc6 |
+ * When the usbredir-host unredirects a device, it will report a status
|
|
Hans de Goede |
c8dfc6 |
+ * of cancelled for all pending packets, followed by a disconnect msg.
|
|
Hans de Goede |
c8dfc6 |
+ */
|
|
Hans de Goede |
c8dfc6 |
+ return USB_RET_IOERROR;
|
|
Hans de Goede |
c8dfc6 |
case usb_redir_inval:
|
|
Hans de Goede |
c8dfc6 |
WARNING("got invalid param error from usb-host?\n");
|
|
Hans de Goede |
c8dfc6 |
- return USB_RET_NAK;
|
|
Hans de Goede |
c8dfc6 |
+ return USB_RET_IOERROR;
|
|
Hans de Goede |
c8dfc6 |
case usb_redir_babble:
|
|
Hans de Goede |
c8dfc6 |
return USB_RET_BABBLE;
|
|
Hans de Goede |
c8dfc6 |
case usb_redir_ioerror:
|
|
Hans de Goede |
c8dfc6 |
--
|
|
|
5544c1 |
1.7.12.1
|
|
Hans de Goede |
c8dfc6 |
|