From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZME3-0003GL-0E for qemu-devel@nongnu.org; Fri, 16 Nov 2012 08:44:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZMDz-0001bH-UL for qemu-devel@nongnu.org; Fri, 16 Nov 2012 08:44:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZMDz-0001b0-MJ for qemu-devel@nongnu.org; Fri, 16 Nov 2012 08:44:51 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAGDipYV007472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Nov 2012 08:44:51 -0500 From: Gerd Hoffmann Date: Fri, 16 Nov 2012 14:44:44 +0100 Message-Id: <1353073487-19233-12-git-send-email-kraxel@redhat.com> In-Reply-To: <1353073487-19233-1-git-send-email-kraxel@redhat.com> References: <1353073487-19233-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 11/14] usb-redir: Only add actually in flight packets to the in flight queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede Packets which are queued up, but not yet handed over to the device, are *not* in flight. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index be9a232..32ae103 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -342,7 +342,9 @@ static void usbredir_fill_already_in_flight_from_ep(USBRedirDevice *dev, if (p->combined && p != p->combined->first) { continue; } - packet_id_queue_add(&dev->already_in_flight, p->id); + if (p->state == USB_PACKET_ASYNC) { + packet_id_queue_add(&dev->already_in_flight, p->id); + } } } -- 1.7.1