Received: from eggs.gnu.org ([208.118.235.92]:50239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYzFl-0005tT-Nq for qemu-devel@nongnu.org; Thu, 15 Nov 2012 08:13:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYzFi-0002RE-LX for qemu-devel@nongnu.org; Thu, 15 Nov 2012 08:13:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYzFi-0002R7-EA for qemu-devel@nongnu.org; Thu, 15 Nov 2012 08:13:06 -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 qAFDD5Hd029338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 15 Nov 2012 08:13:06 -0500 From: Hans de Goede Date: Thu, 15 Nov 2012 14:14:59 +0100 Message-Id: <1352985300-4712-3-git-send-email-hdegoede@redhat.com> In-Reply-To: <1352985300-4712-1-git-send-email-hdegoede@redhat.com> References: <1352985300-4712-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] 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 are 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 d9236c5..4cd32d6 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