Received: from eggs.gnu.org ([208.118.235.92]:60925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTbZ7-0003Ym-NH for qemu-devel@nongnu.org; Wed, 31 Oct 2012 12:54:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTbZ6-0004EH-SW for qemu-devel@nongnu.org; Wed, 31 Oct 2012 12:54:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTbZ6-0004AI-KQ for qemu-devel@nongnu.org; Wed, 31 Oct 2012 12:54:52 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9VGsVpg015963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 31 Oct 2012 12:54:49 -0400 From: Hans de Goede Date: Wed, 31 Oct 2012 17:11:43 +0100 Message-Id: <1351699903-31933-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1351699903-31933-1-git-send-email-hdegoede@redhat.com> References: <1351699903-31933-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH] usb-redir: Fix usb errors when a combined input packet is pending on migrate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org 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); } } -- 1.7.12.1