1b1995d
From 91338d1b4df14f7454d1b52200d2ae4eb957fa72 Mon Sep 17 00:00:00 2001
1b1995d
From: Hans de Goede <hdegoede@redhat.com>
1b1995d
Date: Sun, 26 Feb 2012 15:28:51 +0100
1b1995d
Subject: [PATCH 124/140] usb-redir: Limit return values returned by iso
1b1995d
 packets
1b1995d
1b1995d
The usbredir protocol uses a status of usb_redir_stall to indicate that
1b1995d
an iso data stream has stopped (ie because the urbs failed on resubmit),
1b1995d
but iso packets should never return a result of USB_RET_STALL, since iso
1b1995d
endpoints cannot stall. So instead simply always return USB_RET_NAK on
1b1995d
iso stream errors.
1b1995d
1b1995d
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1b1995d
---
1b1995d
 usb-redir.c |    4 ++--
1b1995d
 1 file changed, 2 insertions(+), 2 deletions(-)
1b1995d
1b1995d
diff --git a/usb-redir.c b/usb-redir.c
1b1995d
index d10d8de..c76e55d 100644
1b1995d
--- a/usb-redir.c
1b1995d
+++ b/usb-redir.c
1b1995d
@@ -441,7 +441,7 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
1b1995d
             /* Check iso_error for stream errors, otherwise its an underrun */
1b1995d
             status = dev->endpoint[EP2I(ep)].iso_error;
1b1995d
             dev->endpoint[EP2I(ep)].iso_error = 0;
1b1995d
-            return usbredir_handle_status(dev, status, 0);
1b1995d
+            return status ? USB_RET_NAK : 0;
1b1995d
         }
1b1995d
         DPRINTF2("iso-token-in ep %02X status %d len %d queue-size: %d\n", ep,
1b1995d
                  isop->status, isop->len, dev->endpoint[EP2I(ep)].bufpq_size);
1b1995d
@@ -449,7 +449,7 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
1b1995d
         status = isop->status;
1b1995d
         if (status != usb_redir_success) {
1b1995d
             bufp_free(dev, isop, ep);
1b1995d
-            return usbredir_handle_status(dev, status, 0);
1b1995d
+            return USB_RET_NAK;
1b1995d
         }
1b1995d
 
1b1995d
         len = isop->len;
1b1995d
-- 
1b1995d
1.7.9.3
1b1995d