qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] usb-redir: Fix usb errors when a combined input pac


From: Hans de Goede
Subject: [Qemu-devel] [PATCH] usb-redir: Fix usb errors when a combined input packet is pending on migrate
Date: Wed, 31 Oct 2012 17:11:43 +0100

Without this the destination usb-redir device will be confused about
in-flight packets after the migration, and eventually an usb transfer
in the guest will timeout because of this.

Signed-off-by: Hans de Goede <address@hidden>
---
 hw/usb/redirect.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index d93f22f..e316963 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -348,6 +348,10 @@ static void 
usbredir_fill_already_in_flight_from_ep(USBRedirDevice *dev,
     static USBPacket *p;
 
     QTAILQ_FOREACH(p, &ep->queue, queue) {
+        /* Skip combined packets, except for the first */
+        if (p->combined && p != p->combined->first) {
+            continue;
+        }
         packet_id_queue_add(&dev->already_in_flight, p->id);
     }
 }
-- 
1.7.12.1




reply via email to

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