Lines Matching defs:hub

189  * driver instance for "hub" connected to "usb"
190 * and "hub" connected to "hub"
265 struct usb_hub *hub;
268 hub = udev->hub;
269 if (hub == NULL)
271 sc = hub->hubsoftc;
297 struct usb_hub *hub;
311 hub = udev->hub;
312 if ((hub == NULL) ||
324 up = hub->ports + port - 1;
354 &hub->tt_msg[0], &hub->tt_msg[1]);
378 for (x = 0; x != udev->hub->nports; x++) {
379 up = udev->hub->ports + x;
421 struct usb_hub *hub;
428 hub = udev->hub;
429 if (hub == NULL)
431 sc = hub->hubsoftc;
435 for (x = 0; x != hub->nports; x++) {
436 up = hub->ports + x;
580 if (child->hub)
581 err = (child->hub->explore) (child);
648 udev->hub->ports + portno - 1);
917 udev->hub->ports + portno - 1);
1027 struct usb_hub *hub;
1035 hub = udev->hub;
1036 sc = hub->hubsoftc;
1057 for (x = 0; x != hub->nports; x++) {
1058 up = hub->ports + x;
1232 struct usb_hub *hub;
1390 hub = malloc(sizeof(hub[0]) + (sizeof(hub->ports[0]) * nports),
1393 if (hub == NULL)
1396 hub = &sc->sc_hub;
1398 udev->hub = hub;
1401 hub->hubsoftc = sc;
1402 hub->explore = &uhub_explore;
1403 hub->nports = nports;
1404 hub->hubudev = udev;
1406 hub->tt_msg[0].hdr.pm_callback = &uhub_reset_tt_proc;
1407 hub->tt_msg[0].udev = udev;
1408 hub->tt_msg[1].hdr.pm_callback = &uhub_reset_tt_proc;
1409 hub->tt_msg[1].udev = udev;
1411 /* if self powered hub, give ports maximum current */
1413 hub->portpower = USB_MAX_POWER;
1415 hub->portpower = USB_MIN_POWER;
1459 * These are the events on the bus when a hub is attached:
1461 * Get hub descriptor (see above)
1485 struct usb_port *up = hub->ports + x;
1558 free(udev->hub, M_USBDEV);
1560 udev->hub = NULL;
1568 * Called from process context when the hub is gone.
1575 struct usb_hub *hub = sc->sc_udev->hub;
1580 if (hub == NULL) /* must be partially working */
1587 for (x = 0; x != hub->nports; x++) {
1589 child = usb_bus_port_get_device(bus, hub->ports + x);
1605 &hub->tt_msg[0], &hub->tt_msg[1]);
1610 free(hub, M_USBDEV);
1612 sc->sc_udev->hub = NULL;
1648 uhub_find_iface_index(struct usb_hub *hub, device_t child,
1657 nports = hub->nports;
1659 udev = usb_bus_port_get_device(hub->hubudev->bus,
1660 hub->ports + x);
1685 struct usb_hub *hub;
1695 hub = sc->sc_udev->hub;
1698 uhub_find_iface_index(hub, child, &res);
1700 DPRINTF("device not on hub\n");
1730 struct usb_hub *hub;
1742 hub = sc->sc_udev->hub;
1745 uhub_find_iface_index(hub, child, &res);
1747 DPRINTF("device not on hub\n");
1884 struct usb_hub *hub;
1905 hub = udev->parent_hs_hub->hub;
1907 slot = usb_intr_find_best_slot(hub->uframe_usage,
1912 hub->uframe_usage[x] += len;
2704 /* resume parent hub first */
2808 if (udev->hub != NULL) {
2809 nports = udev->hub->nports;
2814 udev->hub->ports + x);