static int xhci_setup_packet(XHCITransfer *xfer, XHCIPort *port, int ep)

{

    usb_packet_setup(&xfer->packet,

                     xfer->in_xfer ? USB_TOKEN_IN : USB_TOKEN_OUT,

                     xfer->xhci->slots[xfer->slotid-1].devaddr,

                     ep & 0x7f);

    usb_packet_addbuf(&xfer->packet, xfer->data, xfer->data_length);

    DPRINTF("xhci: setup packet pid 0x%x addr %d ep %d\n",

            xfer->packet.pid, xfer->packet.devaddr, xfer->packet.devep);

    return 0;

}

static int xhci_setup_packet(XHCITransfer *xfer, XHCIPort *port, int ep)

{

    usb_packet_setup(&xfer->packet,

                     xfer->in_xfer ? USB_TOKEN_IN : USB_TOKEN_OUT,

                     xfer->xhci->slots[xfer->slotid-1].devaddr,

                     ep & 0x7f);

    usb_packet_addbuf(&xfer->packet, xfer->data, xfer->data_length);

    DPRINTF("xhci: setup packet pid 0x%x addr %d ep %d\n",

            xfer->packet.pid, xfer->packet.devaddr, xfer->packet.devep);

    return 0;

}

static int FUNC_0(XHCITransfer *VAR_0, XHCIPort *VAR_1, int VAR_2)

{

    usb_packet_setup(&VAR_0->packet,

                     VAR_0->in_xfer ? USB_TOKEN_IN : USB_TOKEN_OUT,

                     VAR_0->xhci->slots[VAR_0->slotid-1].devaddr,

                     VAR_2 & 0x7f);

    usb_packet_addbuf(&VAR_0->packet, VAR_0->data, VAR_0->data_length);

    DPRINTF("xhci: setup packet pid 0x%x addr %d VAR_2 %d\n",

            VAR_0->packet.pid, VAR_0->packet.devaddr, VAR_0->packet.devep);

    return 0;

}

static int FUNC_0(XHCITransfer *VAR_0, XHCIPort *VAR_1, int VAR_2)
{ usb_packet_setup(&VAR_0->packet,
VAR_0->in_xfer ? USB_TOKEN_IN : USB_TOKEN_OUT,
VAR_0->xhci->slots[VAR_0->slotid-1].devaddr,
VAR_2 & 0x7f); usb_packet_addbuf(&VAR_0->packet, VAR_0->data, VAR_0->data_length); DPRINTF("xhci: setup packet pid 0x%x addr %d VAR_2 %d\n",
VAR_0->packet.pid, VAR_0->packet.devaddr, VAR_0->packet.devep); return 0; }