From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 5/6] usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint
Date: Sun, 26 Feb 2012 16:14:47 +0100 [thread overview]
Message-ID: <1330269288-5578-5-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1330269288-5578-1-git-send-email-hdegoede@redhat.com>
We should return USB_RET_NAK, rather then a 0 sized packet, when we've no data
for an interrupt IN endpoint.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
usb-redir.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/usb-redir.c b/usb-redir.c
index c76e55d..ea828a8 100644
--- a/usb-redir.c
+++ b/usb-redir.c
@@ -558,7 +558,9 @@ static int usbredir_handle_interrupt_data(USBRedirDevice *dev,
/* Check interrupt_error for stream errors */
status = dev->endpoint[EP2I(ep)].interrupt_error;
dev->endpoint[EP2I(ep)].interrupt_error = 0;
- return usbredir_handle_status(dev, status, 0);
+ if (status)
+ return usbredir_handle_status(dev, status, 0);
+ return USB_RET_NAK;
}
DPRINTF("interrupt-token-in ep %02X status %d len %d\n", ep,
intp->status, intp->len);
--
1.7.7.6
next prev parent reply other threads:[~2012-02-26 15:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 15:14 [Qemu-devel] [PATCH 1/6] usb-redir: Fix printing of device version Hans de Goede
2012-02-26 15:14 ` [Qemu-devel] [PATCH 2/6] usb-redir: Always clear device state on filter reject Hans de Goede
2012-02-26 15:14 ` [Qemu-devel] [PATCH 3/6] usb-redir: Let the usb-host know about our device filtering Hans de Goede
2012-02-26 15:14 ` [Qemu-devel] [PATCH 4/6] usb-redir: Limit return values returned by iso packets Hans de Goede
2012-02-26 15:14 ` Hans de Goede [this message]
2012-02-27 11:45 ` [Qemu-devel] [PATCH 5/6] usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint Gerd Hoffmann
2012-02-27 12:15 ` Gerd Hoffmann
2012-02-26 15:14 ` [Qemu-devel] [PATCH 6/6] usb-ehci: Handle ISO packets failing with an error other then NAK Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330269288-5578-5-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).