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