From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1fmi-0007tT-AX for qemu-devel@nongnu.org; Sun, 26 Feb 2012 10:13:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1fmh-0001rT-0k for qemu-devel@nongnu.org; Sun, 26 Feb 2012 10:13:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1fmg-0001rN-Pg for qemu-devel@nongnu.org; Sun, 26 Feb 2012 10:13:10 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1QFDA20022182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 26 Feb 2012 10:13:10 -0500 From: Hans de Goede Date: Sun, 26 Feb 2012 16:14:46 +0100 Message-Id: <1330269288-5578-4-git-send-email-hdegoede@redhat.com> In-Reply-To: <1330269288-5578-1-git-send-email-hdegoede@redhat.com> References: <1330269288-5578-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 4/6] usb-redir: Limit return values returned by iso packets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org The usbredir protocol uses a status of usb_redir_stall to indicate that an iso data stream has stopped (ie because the urbs failed on resubmit), but iso packets should never return a result of USB_RET_STALL, since iso endpoints cannot stall. So instead simply always return USB_RET_NAK on iso stream errors. Signed-off-by: Hans de Goede --- usb-redir.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usb-redir.c b/usb-redir.c index d10d8de..c76e55d 100644 --- a/usb-redir.c +++ b/usb-redir.c @@ -441,7 +441,7 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p, /* Check iso_error for stream errors, otherwise its an underrun */ status = dev->endpoint[EP2I(ep)].iso_error; dev->endpoint[EP2I(ep)].iso_error = 0; - return usbredir_handle_status(dev, status, 0); + return status ? USB_RET_NAK : 0; } DPRINTF2("iso-token-in ep %02X status %d len %d queue-size: %d\n", ep, isop->status, isop->len, dev->endpoint[EP2I(ep)].bufpq_size); @@ -449,7 +449,7 @@ static int usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p, status = isop->status; if (status != usb_redir_success) { bufp_free(dev, isop, ep); - return usbredir_handle_status(dev, status, 0); + return USB_RET_NAK; } len = isop->len; -- 1.7.7.6