From patchwork Fri Nov 16 13:44:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [11/14] usb-redir: Only add actually in flight packets to the in flight queue Date: Fri, 16 Nov 2012 03:44:44 -0000 From: Gerd Hoffmann X-Patchwork-Id: 199603 Message-Id: <1353073487-19233-12-git-send-email-kraxel@redhat.com> 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); + } } }