static int usb_hub_broadcast_packet(USBHubState *s, USBPacket *p)

{

    USBHubPort *port;

    USBDevice *dev;

    int i, ret;



    for(i = 0; i < NUM_PORTS; i++) {

        port = &s->ports[i];

        dev = port->port.dev;

        if (dev && (port->wPortStatus & PORT_STAT_ENABLE)) {

            ret = usb_handle_packet(dev, p);

            if (ret != USB_RET_NODEV) {

                return ret;

            }

        }

    }

    return USB_RET_NODEV;

}

static int usb_hub_broadcast_packet(USBHubState *s, USBPacket *p)

{

    USBHubPort *port;

    USBDevice *dev;

    int i, ret;



    for(i = 0; i < NUM_PORTS; i++) {

        port = &s->ports[i];

        dev = port->port.dev;

        if (dev && (port->wPortStatus & PORT_STAT_ENABLE)) {

            ret = usb_handle_packet(dev, p);

            if (ret != USB_RET_NODEV) {

                return ret;

            }

        }

    }

    return USB_RET_NODEV;

}

static int FUNC_0(USBHubState *VAR_0, USBPacket *VAR_1)

{

    USBHubPort *port;

    USBDevice *dev;

    int VAR_2, VAR_3;



    for(VAR_2 = 0; VAR_2 < NUM_PORTS; VAR_2++) {

        port = &VAR_0->ports[VAR_2];

        dev = port->port.dev;

        if (dev && (port->wPortStatus & PORT_STAT_ENABLE)) {

            VAR_3 = usb_handle_packet(dev, VAR_1);

            if (VAR_3 != USB_RET_NODEV) {

                return VAR_3;

            }

        }

    }

    return USB_RET_NODEV;

}

static int FUNC_0(USBHubState *VAR_0, USBPacket *VAR_1)
{ USBHubPort *port; USBDevice *dev; int VAR_2, VAR_3; for(VAR_2 = 0; VAR_2 < NUM_PORTS; VAR_2++) { port = &VAR_0->ports[VAR_2]; dev = port->port.dev; if (dev && (port->wPortStatus & PORT_STAT_ENABLE)) { VAR_3 = usb_handle_packet(dev, VAR_1); if (VAR_3 != USB_RET_NODEV) { return VAR_3; } } } return USB_RET_NODEV; }