static void xhci_port_reset(XHCIPort *port)

{

    trace_usb_xhci_port_reset(port->portnr);



    if (!xhci_port_have_device(port)) {

        return;

    }



    usb_device_reset(port->uport->dev);



    switch (port->uport->dev->speed) {

    case USB_SPEED_LOW:

    case USB_SPEED_FULL:

    case USB_SPEED_HIGH:

        set_field(&port->portsc, PLS_U0, PORTSC_PLS);

        trace_usb_xhci_port_link(port->portnr, PLS_U0);

        port->portsc |= PORTSC_PED;

        break;

    }



    port->portsc &= ~PORTSC_PR;

    xhci_port_notify(port, PORTSC_PRC);

}

static void xhci_port_reset(XHCIPort *port)

{

    trace_usb_xhci_port_reset(port->portnr);



    if (!xhci_port_have_device(port)) {

        return;

    }



    usb_device_reset(port->uport->dev);



    switch (port->uport->dev->speed) {

    case USB_SPEED_LOW:

    case USB_SPEED_FULL:

    case USB_SPEED_HIGH:

        set_field(&port->portsc, PLS_U0, PORTSC_PLS);

        trace_usb_xhci_port_link(port->portnr, PLS_U0);

        port->portsc |= PORTSC_PED;

        break;

    }



    port->portsc &= ~PORTSC_PR;

    xhci_port_notify(port, PORTSC_PRC);

}

static void FUNC_0(XHCIPort *VAR_0)

{

    trace_usb_xhci_port_reset(VAR_0->portnr);



    if (!xhci_port_have_device(VAR_0)) {

        return;

    }



    usb_device_reset(VAR_0->uport->dev);



    switch (VAR_0->uport->dev->speed) {

    case USB_SPEED_LOW:

    case USB_SPEED_FULL:

    case USB_SPEED_HIGH:

        set_field(&VAR_0->portsc, PLS_U0, PORTSC_PLS);

        trace_usb_xhci_port_link(VAR_0->portnr, PLS_U0);

        VAR_0->portsc |= PORTSC_PED;

        break;

    }



    VAR_0->portsc &= ~PORTSC_PR;

    xhci_port_notify(VAR_0, PORTSC_PRC);

}

static void FUNC_0(XHCIPort *VAR_0)
{ trace_usb_xhci_port_reset(VAR_0->portnr); if (!xhci_port_have_device(VAR_0)) { return; } usb_device_reset(VAR_0->uport->dev); switch (VAR_0->uport->dev->speed) { case USB_SPEED_LOW:
case USB_SPEED_FULL:
case USB_SPEED_HIGH:
set_field(&VAR_0->portsc, PLS_U0, PORTSC_PLS); trace_usb_xhci_port_link(VAR_0->portnr, PLS_U0); VAR_0->portsc |= PORTSC_PED; break; } VAR_0->portsc &= ~PORTSC_PR; xhci_port_notify(VAR_0, PORTSC_PRC); }