qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/5] usb-linux.c: fix handling of asynchronous isoch


From: Ian Jackson
Subject: [Qemu-devel] [PATCH 5/5] usb-linux.c: fix handling of asynchronous isochronous completion
Date: Thu, 5 Feb 2009 17:20:33 +0000

When an isochronous URB completes, we need to get the actual transfer
length and status out of the iso_frame_desc[] array rather than the
main urb struct.

Signed-off-by: Ian Jackson <address@hidden>
---
 usb-linux.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/usb-linux.c b/usb-linux.c
index b592514..4c0e164 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -264,8 +264,13 @@ static void async_complete(void *opaque)
 
         p = aurb->packet;
 
-       dprintf("husb: async completed. aurb %p status %d alen %d\n", 
-                aurb, aurb->urb.status, aurb->urb.actual_length);
+       if (aurb->urb.type == USBDEVFS_URB_TYPE_ISO) {
+            aurb->urb.status        = aurb->urb.iso_frame_desc[0].status;
+            aurb->urb.actual_length = 
aurb->urb.iso_frame_desc[0].actual_length;
+        }
+        dprintf("husb: async completed. aurb %p type %d ep 0x%x status %d alen 
%d\n", 
+                aurb, aurb->urb.type, aurb->urb.endpoint,
+                aurb->urb.status, aurb->urb.actual_length);
 
        if (p) {
             switch (aurb->urb.status) {
-- 
1.4.4.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]