From patchwork Wed Oct 31 16:11:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: usb-redir: Fix usb errors when a combined input packet is pending on migrate From: Hans de Goede X-Patchwork-Id: 195940 Message-Id: <1351699903-31933-2-git-send-email-hdegoede@redhat.com> To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org 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 --- 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); } }