Received: from eggs.gnu.org ([208.118.235.92]:53892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVkHS-0004iq-Rt for qemu-devel@nongnu.org; Tue, 06 Nov 2012 09:37:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVkHI-0005wJ-EP for qemu-devel@nongnu.org; Tue, 06 Nov 2012 09:37:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVkHI-0005w7-5l for qemu-devel@nongnu.org; Tue, 06 Nov 2012 09:37:20 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA6EbJEA020443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Nov 2012 09:37:19 -0500 From: Hans de Goede Date: Tue, 6 Nov 2012 15:08:16 +0100 Message-Id: <1352210901-1923-4-git-send-email-hdegoede@redhat.com> In-Reply-To: <1352210901-1923-1-git-send-email-hdegoede@redhat.com> References: <1352210901-1923-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 3/8] 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: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org Packets which have queued up, but not yet handed over to the device, are *not* in flight. Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index b61bb6e..ad601d8 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -352,7 +352,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.12.1