[Top][All Lists]
[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
- [Qemu-devel] [PATCH 1/5] usb-linux.c: allow full-size control transfers, do not overrun buffer, Ian Jackson, 2009/02/05
- [Qemu-devel] [PATCH 5/5] usb-linux.c: fix handling of asynchronous isochronous completion,
Ian Jackson <=
- [Qemu-devel] [PATCH 3/5] usb-linux.c: somewhat improve some error and debugging messages, Ian Jackson, 2009/02/05
- [Qemu-devel] [PATCH 2/5] usb-linux.c: set urb->type correctly for control and interrupt transfers, Ian Jackson, 2009/02/05
- [Qemu-devel] [PATCH 4/5] usb-linux.c: more improved debugging messages (endpoint table), Ian Jackson, 2009/02/05
- Re: [Qemu-devel] [PATCH 1/5] usb-linux.c: allow full-size control transfers, do not overrun buffer, malc, 2009/02/05