From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: hdegoede@redhat.com, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/2] usb-host: fix splitted transfers
Date: Thu, 15 Nov 2012 16:19:23 +0100 [thread overview]
Message-ID: <1352992763-31409-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1352992763-31409-1-git-send-email-kraxel@redhat.com>
USBPacket->actual_length wasn't updated correctly for USBPackets
splitted into multiple urbs. Fix it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/host-linux.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index e3d394f..aa77b77 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -366,8 +366,11 @@ static void async_complete(void *opaque)
if (p) {
switch (aurb->urb.status) {
case 0:
- p->actual_length = aurb->urb.actual_length;
- p->status = USB_RET_SUCCESS; /* Clear previous ASYNC status */
+ p->actual_length += aurb->urb.actual_length;
+ if (!aurb->more) {
+ /* Clear previous ASYNC status */
+ p->status = USB_RET_SUCCESS;
+ }
break;
case -EPIPE:
--
1.7.1
next prev parent reply other threads:[~2012-11-15 15:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 15:19 [Qemu-devel] [PATCH 1/2] usb-host: update tracing Gerd Hoffmann
2012-11-15 15:19 ` Gerd Hoffmann [this message]
2012-11-15 15:23 ` 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=1352992763-31409-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=hdegoede@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).