Revision 616789cd hw/usb/hcd-ehci.c

b/hw/usb/hcd-ehci.c
747 747

  
748 748
static void ehci_free_packet(EHCIPacket *p)
749 749
{
750
    trace_usb_ehci_packet_action(p->queue, p, "free");
751
    if (p->async == EHCI_ASYNC_INFLIGHT) {
752
        usb_cancel_packet(&p->packet);
753
        usb_packet_unmap(&p->packet, &p->sgl);
754
        qemu_sglist_destroy(&p->sgl);
755
    }
756 750
    if (p->async == EHCI_ASYNC_FINISHED) {
757 751
        int state = ehci_get_state(p->queue->ehci, p->queue->async);
758 752
        /* This is a normal, but rare condition (cancel racing completion) */
......
763 757
        /* state_writeback recurses into us with async == EHCI_ASYNC_NONE!! */
764 758
        return;
765 759
    }
760
    trace_usb_ehci_packet_action(p->queue, p, "free");
761
    if (p->async == EHCI_ASYNC_INFLIGHT) {
762
        usb_cancel_packet(&p->packet);
763
        usb_packet_unmap(&p->packet, &p->sgl);
764
        qemu_sglist_destroy(&p->sgl);
765
    }
766 766
    QTAILQ_REMOVE(&p->queue->packets, p, next);
767 767
    usb_packet_cleanup(&p->packet);
768 768
    g_free(p);

Also available in: Unified diff