ehci: Properly cleanup packets on cancel
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
522079dd44
commit
0e7953525f
|
@ -747,6 +747,8 @@ static void ehci_free_packet(EHCIPacket *p)
|
||||||
trace_usb_ehci_packet_action(p->queue, p, "free");
|
trace_usb_ehci_packet_action(p->queue, p, "free");
|
||||||
if (p->async == EHCI_ASYNC_INFLIGHT) {
|
if (p->async == EHCI_ASYNC_INFLIGHT) {
|
||||||
usb_cancel_packet(&p->packet);
|
usb_cancel_packet(&p->packet);
|
||||||
|
usb_packet_unmap(&p->packet, &p->sgl);
|
||||||
|
qemu_sglist_destroy(&p->sgl);
|
||||||
}
|
}
|
||||||
QTAILQ_REMOVE(&p->queue->packets, p, next);
|
QTAILQ_REMOVE(&p->queue->packets, p, next);
|
||||||
usb_packet_cleanup(&p->packet);
|
usb_packet_cleanup(&p->packet);
|
||||||
|
|
Loading…
Reference in New Issue