Lines Matching defs:hub
61 PRINTK("The level of usb hub debug is %d\n", level);
141 * driver instance for "hub" connected to "usb"
142 * and "hub" connected to "hub"
224 struct usb_hub *hub;
227 hub = udev->hub;
228 if (hub == NULL)
230 sc = hub->hubsoftc;
256 struct usb_hub *hub;
270 hub = udev->hub;
271 if ((hub == NULL) ||
283 up = hub->ports + port - 1;
313 &hub->tt_msg[0], &hub->tt_msg[1]);
337 for (x = 0; x != udev->hub->nports; x++) {
338 up = udev->hub->ports + x;
380 struct usb_hub *hub;
387 hub = udev->hub;
388 if (hub == NULL)
390 sc = hub->hubsoftc;
394 for (x = 0; x != hub->nports; x++) {
395 up = hub->ports + x;
499 struct usb_hub *hub = dev->hub;
517 if (hub->nports == 1)
543 if (child->hub)
544 err = (child->hub->explore) (child);
670 udev->hub->ports + portno - 1);
946 udev->hub->ports + portno - 1);
1056 struct usb_hub *hub;
1064 hub = udev->hub;
1065 sc = hub->hubsoftc;
1086 for (x = 0; x != hub->nports; x++) {
1087 up = hub->ports + x;
1261 struct usb_hub *hub;
1425 hub = bsd_malloc(sizeof(hub[0]) + (sizeof(hub->ports[0]) * nports),
1428 if (hub == NULL)
1431 hub = &sc->sc_hub;
1433 udev->hub = hub;
1436 hub->hubsoftc = sc;
1437 hub->explore = &uhub_explore;
1438 hub->nports = nports;
1439 hub->hubudev = udev;
1441 hub->tt_msg[0].hdr.pm_callback = &uhub_reset_tt_proc;
1442 hub->tt_msg[0].udev = udev;
1443 hub->tt_msg[1].hdr.pm_callback = &uhub_reset_tt_proc;
1444 hub->tt_msg[1].udev = udev;
1446 /* if self powered hub, give ports maximum current */
1448 hub->portpower = USB_MAX_POWER;
1450 hub->portpower = USB_MIN_POWER;
1476 * These are the events on the bus when a hub is attached:
1478 * Get hub descriptor (see above)
1502 struct usb_port *up = hub->ports + x;
1557 if (portno == 1) { /* if it is the hub 1 port */
1566 } else { /* parent is hub */
1570 } else { /* it is the hub other port(2,3,...) */
1599 bsd_free(udev->hub, M_USBDEV);
1601 udev->hub = NULL;
1608 * Called from process context when the hub is gone.
1615 struct usb_hub *hub;
1626 hub = sc->sc_udev->hub;
1628 if (hub == NULL) /* must be partially working */
1644 for (x = 0; x != hub->nports; x++) {
1645 child = usb_bus_port_get_device(bus, hub->ports + x);
1661 &hub->tt_msg[0], &hub->tt_msg[1]);
1666 bsd_free(hub, M_USBDEV);
1668 sc->sc_udev->hub = NULL;
1704 uhub_find_iface_index(struct usb_hub *hub, device_t child,
1713 nports = hub->nports;
1715 udev = usb_bus_port_get_device(hub->hubudev->bus,
1716 hub->ports + x);
1741 struct usb_hub *hub;
1754 hub = sc->sc_udev->hub;
1757 uhub_find_iface_index(hub, child, &res);
1759 DPRINTF("device not on hub\n");
1781 struct usb_hub *hub;
1795 hub = sc->sc_udev->hub;
1798 uhub_find_iface_index(hub, child, &res);
1800 DPRINTF("device not on hub\n");
1928 struct usb_hub *hub;
1949 hub = udev->parent_hs_hub->hub;
1951 slot = usb_intr_find_best_slot(hub->uframe_usage,
1956 hub->uframe_usage[x] += len;
2753 /* resume parent hub first */
2855 if (udev->hub != NULL) {
2856 nports = udev->hub->nports;
2861 udev->hub->ports + x);