Message ID | 4FEDD75A.1010705@siemens.com |
---|---|
State | New |
Headers | show |
On 06/29/12 18:27, Jan Kiszka wrote: > Due to queuing/pipelining, there can now be multiple packets per > endpoint in flight. So the assertion in usb_packet_complete became wrong > and can cause bogus QEMU terminations. Seen with a passed-through USB > headset. NAK. The assert doesn't protect against multiple packets in flight, but against packet reorderng. Need to understand why to assert actually triggers. cheers, Gerd
diff --git a/hw/usb/core.c b/hw/usb/core.c index 0e02da7..f4e4bbf 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -407,7 +407,6 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) int ret; usb_packet_check_state(p, USB_PACKET_ASYNC); - assert(QTAILQ_FIRST(&ep->queue) == p); usb_packet_set_state(p, USB_PACKET_COMPLETE); QTAILQ_REMOVE(&ep->queue, p, queue); dev->port->ops->complete(dev->port, p);
Due to queuing/pipelining, there can now be multiple packets per endpoint in flight. So the assertion in usb_packet_complete became wrong and can cause bogus QEMU terminations. Seen with a passed-through USB headset. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- I'm not 100% sure that the assertion that the assertion is no longer needed is actually correct. However, things work fine here without it. hw/usb/core.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)