USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep,

                                    uint64_t id)

{

    struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);

    USBPacket *p;



    while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {

        if (p->id == id) {

            return p;

        }

    }



    return NULL;

}

USBPacket *usb_ep_find_packet_by_id(USBDevice *dev, int pid, int ep,

                                    uint64_t id)

{

    struct USBEndpoint *uep = usb_ep_get(dev, pid, ep);

    USBPacket *p;



    while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {

        if (p->id == id) {

            return p;

        }

    }



    return NULL;

}

    while ((p = QTAILQ_FIRST(&uep->queue)) != NULL) {
USBPacket *FUNC_0(USBDevice *dev, int pid, int ep,

                                    uint64_t id)

{

    struct USBEndpoint *VAR_0 = usb_ep_get(dev, pid, ep);

    USBPacket *p;



    while ((p = QTAILQ_FIRST(&VAR_0->queue)) != NULL) {

        if (p->id == id) {

            return p;

        }

    }



    return NULL;

}

USBPacket *FUNC_0(USBDevice *dev, int pid, int ep,
uint64_t id)
{ struct USBEndpoint *VAR_0 = usb_ep_get(dev, pid, ep); USBPacket *p; while ((p = QTAILQ_FIRST(&VAR_0->queue)) != NULL) { if (p->id == id) { return p; } } return NULL; }