static void ohci_reset(OHCIState *ohci)

{

    OHCIPort *port;

    int i;



    ohci->ctl = 0;

    ohci->old_ctl = 0;

    ohci->status = 0;

    ohci->intr_status = 0;

    ohci->intr = OHCI_INTR_MIE;



    ohci->hcca = 0;

    ohci->ctrl_head = ohci->ctrl_cur = 0;

    ohci->bulk_head = ohci->bulk_cur = 0;

    ohci->per_cur = 0;

    ohci->done = 0;

    ohci->done_count = 7;



    /* FSMPS is marked TBD in OCHI 1.0, what gives ffs?

     * I took the value linux sets ...

     */

    ohci->fsmps = 0x2778;

    ohci->fi = 0x2edf;

    ohci->fit = 0;

    ohci->frt = 0;

    ohci->frame_number = 0;

    ohci->pstart = 0;

    ohci->lst = OHCI_LS_THRESH;



    ohci->rhdesc_a = OHCI_RHA_NPS | ohci->num_ports;

    ohci->rhdesc_b = 0x0; /* Impl. specific */

    ohci->rhstatus = 0;



    for (i = 0; i < ohci->num_ports; i++)

      {

        port = &ohci->rhport[i];

        port->ctrl = 0;

        if (port->port.dev)

            ohci_attach(&port->port, port->port.dev);

      }

    if (ohci->async_td) {

        usb_cancel_packet(&ohci->usb_packet);

        ohci->async_td = 0;

    }

    dprintf("usb-ohci: Reset %s\n", ohci->name);

}

static void ohci_reset(OHCIState *ohci)

{

    OHCIPort *port;

    int i;



    ohci->ctl = 0;

    ohci->old_ctl = 0;

    ohci->status = 0;

    ohci->intr_status = 0;

    ohci->intr = OHCI_INTR_MIE;



    ohci->hcca = 0;

    ohci->ctrl_head = ohci->ctrl_cur = 0;

    ohci->bulk_head = ohci->bulk_cur = 0;

    ohci->per_cur = 0;

    ohci->done = 0;

    ohci->done_count = 7;



    





    ohci->fsmps = 0x2778;

    ohci->fi = 0x2edf;

    ohci->fit = 0;

    ohci->frt = 0;

    ohci->frame_number = 0;

    ohci->pstart = 0;

    ohci->lst = OHCI_LS_THRESH;



    ohci->rhdesc_a = OHCI_RHA_NPS | ohci->num_ports;

    ohci->rhdesc_b = 0x0; 

    ohci->rhstatus = 0;



    for (i = 0; i < ohci->num_ports; i++)

      {

        port = &ohci->rhport[i];

        port->ctrl = 0;

        if (port->port.dev)

            ohci_attach(&port->port, port->port.dev);

      }

    if (ohci->async_td) {

        usb_cancel_packet(&ohci->usb_packet);

        ohci->async_td = 0;

    }

    dprintf("usb-ohci: Reset %s\n", ohci->name);

}

static void ohci_reset(OHCIState *ohci)
static void FUNC_0(OHCIState *VAR_0)

{

    OHCIPort *port;

    int VAR_1;



    VAR_0->ctl = 0;

    VAR_0->old_ctl = 0;

    VAR_0->status = 0;

    VAR_0->intr_status = 0;

    VAR_0->intr = OHCI_INTR_MIE;



    VAR_0->hcca = 0;

    VAR_0->ctrl_head = VAR_0->ctrl_cur = 0;

    VAR_0->bulk_head = VAR_0->bulk_cur = 0;

    VAR_0->per_cur = 0;

    VAR_0->done = 0;

    VAR_0->done_count = 7;



    





    VAR_0->fsmps = 0x2778;

    VAR_0->fi = 0x2edf;

    VAR_0->fit = 0;

    VAR_0->frt = 0;

    VAR_0->frame_number = 0;

    VAR_0->pstart = 0;

    VAR_0->lst = OHCI_LS_THRESH;



    VAR_0->rhdesc_a = OHCI_RHA_NPS | VAR_0->num_ports;

    VAR_0->rhdesc_b = 0x0; 

    VAR_0->rhstatus = 0;



    for (VAR_1 = 0; VAR_1 < VAR_0->num_ports; VAR_1++)

      {

        port = &VAR_0->rhport[VAR_1];

        port->ctrl = 0;

        if (port->port.dev)

            ohci_attach(&port->port, port->port.dev);

      }

    if (VAR_0->async_td) {

        usb_cancel_packet(&VAR_0->usb_packet);

        VAR_0->async_td = 0;

    }

    dprintf("usb-VAR_0: Reset %s\n", VAR_0->name);

}

static void FUNC_0(OHCIState *VAR_0)
{ OHCIPort *port; int VAR_1; VAR_0->ctl = 0; VAR_0->old_ctl = 0; VAR_0->status = 0; VAR_0->intr_status = 0; VAR_0->intr = OHCI_INTR_MIE; VAR_0->hcca = 0; VAR_0->ctrl_head = VAR_0->ctrl_cur = 0; VAR_0->bulk_head = VAR_0->bulk_cur = 0; VAR_0->per_cur = 0; VAR_0->done = 0; VAR_0->done_count = 7; VAR_0->fsmps = 0x2778; VAR_0->fi = 0x2edf; VAR_0->fit = 0; VAR_0->frt = 0; VAR_0->frame_number = 0; VAR_0->pstart = 0; VAR_0->lst = OHCI_LS_THRESH; VAR_0->rhdesc_a = OHCI_RHA_NPS | VAR_0->num_ports; VAR_0->rhdesc_b = 0x0; VAR_0->rhstatus = 0; for (VAR_1 = 0; VAR_1 < VAR_0->num_ports; VAR_1++) { port = &VAR_0->rhport[VAR_1]; port->ctrl = 0; if (port->port.dev)
ohci_attach(&port->port, port->port.dev); } if (VAR_0->async_td) { usb_cancel_packet(&VAR_0->usb_packet); VAR_0->async_td = 0; } dprintf("usb-VAR_0: Reset %s\n", VAR_0->name); }