From: Hans de Goede Date: Thu, 15 Nov 2012 13:14:59 +0000 (+0100) Subject: usb-redir: Only add actually in flight packets to the in flight queue X-Git-Tag: cpu-hotplug-port-v2~37^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2cb343b442c98b45d1187f5691c45b3c114f3b04;p=people%2Faperard%2Fqemu-dm.git usb-redir: Only add actually in flight packets to the in flight queue 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 --- diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index be9a232059..32ae1034cc 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); + } } }