|
Hans de Goede |
c8dfc6 |
From a15db9c6d428a756f6ad4055334e476cd90b31f6 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
|
|
Hans de Goede |
c8dfc6 |
Subject: [PATCH 317/366] usb-redir: Never return USB_RET_NAK for async
|
|
Hans de Goede |
c8dfc6 |
handled 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>
|
|
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
|
|
Hans de Goede |
c8dfc6 |
index 1460515..9ba964e 100644
|
|
Hans de Goede |
c8dfc6 |
--- a/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
+++ b/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
@@ -1055,11 +1055,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 |
--
|
|
Hans de Goede |
c8dfc6 |
1.7.12
|
|
Hans de Goede |
c8dfc6 |
|