diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-08-17 17:27:08 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-11 07:42:59 +0200 |
commit | 181133404f520fab40a3ad40d935d91cf3cf546c (patch) | |
tree | 676eb47b0ef535bbefc3f233310cf08b5cae1d2d /hw | |
parent | cf1f81691d1998fa8fe5bfcb8b498fb3723cf3c3 (diff) |
usb-redir: Never return USB_RET_NAK for async handled packets
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 <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | 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 10b4fbb3a7..7f3719b19a 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: |