Skip to contentSkip to conversation

usb input-pipelining migration fix

Qemu-devel New Hans de Goede 1 participant 2 messages Oct 31, 2012

lore
Share & tools
lore
#0 lore raw

Ideally this should be merged into the "usb-redir: Add support for input pipelining" commit

Thanks & Regards,

Hans

#1 lore raw

PATCH 1/1 usb-redir: Fix usb errors when a combined input packet is pending on migrate

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.

---
 hw/usb/redirect.c | 4 ++++
 1 file changed, 4 insertions(+)
hw/usb/redirect.c +4 -0
index d93f22f..e316963 100644
@@ -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);
     }
 }
Signature · 1 line
1.7.12.1