Lines Matching full:hub

84     "USB HUB");
156 * driver instance for "hub" connected to "usb"
157 * and "hub" connected to "hub"
231 struct usb_hub *hub; in uhub_reset_tt_proc() local
234 hub = udev->hub; in uhub_reset_tt_proc()
235 if (hub == NULL) in uhub_reset_tt_proc()
237 sc = hub->hubsoftc; in uhub_reset_tt_proc()
263 struct usb_hub *hub; in uhub_tt_buffer_reset_async_locked() local
277 hub = udev->hub; in uhub_tt_buffer_reset_async_locked()
278 if ((hub == NULL) || in uhub_tt_buffer_reset_async_locked()
290 up = hub->ports + port - 1; in uhub_tt_buffer_reset_async_locked()
320 &hub->tt_msg[0], &hub->tt_msg[1]); in uhub_tt_buffer_reset_async_locked()
344 for (x = 0; x != udev->hub->nports; x++) { in uhub_reset_tt_callback()
345 up = udev->hub->ports + x; in uhub_reset_tt_callback()
387 struct usb_hub *hub; in uhub_count_active_host_ports() local
394 hub = udev->hub; in uhub_count_active_host_ports()
395 if (hub == NULL) in uhub_count_active_host_ports()
397 sc = hub->hubsoftc; in uhub_count_active_host_ports()
401 for (x = 0; x != hub->nports; x++) { in uhub_count_active_host_ports()
402 up = hub->ports + x; in uhub_count_active_host_ports()
433 /* the root HUB cannot be re-enumerated */ in uhub_explore_handle_re_enumerate()
434 DPRINTFN(6, "cannot reset root HUB\n"); in uhub_explore_handle_re_enumerate()
463 /* the root HUB cannot be re-enumerated */ in uhub_explore_handle_re_enumerate()
544 /* if a HUB becomes present, do a recursive HUB explore */ in uhub_explore_sub()
546 if (child->hub) in uhub_explore_sub()
547 err = (child->hub->explore) (child); in uhub_explore_sub()
563 DPRINTFN(4, "port %d, HUB looks dead, too many errors\n", portno); in uhub_read_port_status()
614 udev->hub->ports + portno - 1); in uhub_reattach_port()
642 /* check if we should skip enumeration from this USB HUB */ in uhub_reattach_port()
685 * mode, because the HUB should report this in uhub_reattach_port()
758 /* Root HUB - special case */ in uhub_reattach_port()
805 /* inherit mode from the parent HUB */ in uhub_reattach_port()
847 * 0: HUB does not support suspend and resume
848 * Else: HUB supports suspend and resume
884 udev->hub->ports + portno - 1); in uhub_suspend_resume_port()
952 * This function is called when a Root HUB interrupt has
953 * happened. "ptr" and "len" makes up the Root HUB interrupt
994 struct usb_hub *hub; in uhub_explore() local
1003 hub = udev->hub; in uhub_explore()
1004 sc = hub->hubsoftc; in uhub_explore()
1027 * Note that hub->nports cannot be zero. in uhub_explore()
1031 for (x = 0; x != hub->nports; x++) { in uhub_explore()
1032 up = hub->ports + x; in uhub_explore()
1163 DPRINTFN(0, "getting USB 2.0 HUB descriptor failed," in uhub_query_info()
1178 DPRINTFN(0, "Getting USB 3.0 HUB descriptor failed," in uhub_query_info()
1208 struct usb_hub *hub; in uhub_attach() local
1226 mtx_init(&sc->sc_mtx, "USB HUB mutex", NULL, MTX_DEF); in uhub_attach()
1239 DPRINTFN(0, "HUB at depth %d, " in uhub_attach()
1240 "exceeds maximum. HUB ignored\n", (int)udev->depth); in uhub_attach()
1246 DPRINTFN(0, "Bus powered HUB connected to " in uhub_attach()
1247 "bus powered HUB. HUB ignored\n"); in uhub_attach()
1260 /* get HUB descriptor */ in uhub_attach()
1262 DPRINTFN(2, "Getting HUB descriptor\n"); in uhub_attach()
1271 DPRINTFN(0, "getting USB 2.0 HUB descriptor failed," in uhub_attach()
1282 /* get complete HUB descriptor */ in uhub_attach()
1290 /* get complete HUB descriptor */ in uhub_attach()
1294 DPRINTFN(0, "Getting USB 2.0 HUB descriptor failed," in uhub_attach()
1309 DPRINTFN(0, "Setting USB 3.0 HUB depth failed," in uhub_attach()
1316 DPRINTFN(0, "Getting USB 3.0 HUB descriptor failed," in uhub_attach()
1327 /* get complete HUB descriptor */ in uhub_attach()
1335 /* get complete HUB descriptor */ in uhub_attach()
1339 DPRINTFN(0, "Getting USB 2.0 HUB descriptor failed," in uhub_attach()
1350 DPRINTF("Assuming HUB has only one port\n"); in uhub_attach()
1358 DPRINTFN(0, "portless HUB\n"); in uhub_attach()
1366 hub = malloc(sizeof(hub[0]) + (sizeof(hub->ports[0]) * nports), in uhub_attach()
1369 if (hub == NULL) in uhub_attach()
1372 hub = &sc->sc_hub; in uhub_attach()
1374 udev->hub = hub; in uhub_attach()
1376 /* initialize HUB structure */ in uhub_attach()
1377 hub->hubsoftc = sc; in uhub_attach()
1378 hub->explore = &uhub_explore; in uhub_attach()
1379 hub->nports = nports; in uhub_attach()
1380 hub->hubudev = udev; in uhub_attach()
1382 hub->tt_msg[0].hdr.pm_callback = &uhub_reset_tt_proc; in uhub_attach()
1383 hub->tt_msg[0].udev = udev; in uhub_attach()
1384 hub->tt_msg[1].hdr.pm_callback = &uhub_reset_tt_proc; in uhub_attach()
1385 hub->tt_msg[1].udev = udev; in uhub_attach()
1387 /* if self powered hub, give ports maximum current */ in uhub_attach()
1389 hub->portpower = USB_MAX_POWER; in uhub_attach()
1391 hub->portpower = USB_MIN_POWER; in uhub_attach()
1397 /* root HUB is special */ in uhub_attach()
1400 /* normal HUB */ in uhub_attach()
1422 "Set to disable enumeration on this USB HUB."); in uhub_attach()
1427 "Set to disable USB port power on this USB HUB."); in uhub_attach()
1435 * These are the events on the bus when a hub is attached: in uhub_attach()
1437 * Get hub descriptor (see above) in uhub_attach()
1461 struct usb_port *up = hub->ports + x; in uhub_attach()
1534 free(udev->hub, M_USBDEV); in uhub_attach()
1536 udev->hub = NULL; in uhub_attach()
1544 * Called from process context when the hub is gone.
1551 struct usb_hub *hub = sc->sc_udev->hub; in uhub_detach() local
1556 if (hub == NULL) /* must be partially working */ in uhub_detach()
1563 for (x = 0; x != hub->nports; x++) { in uhub_detach()
1564 child = usb_bus_port_get_device(bus, hub->ports + x); in uhub_detach()
1580 &hub->tt_msg[0], &hub->tt_msg[1]); in uhub_detach()
1585 free(hub, M_USBDEV); in uhub_detach()
1587 sc->sc_udev->hub = NULL; in uhub_detach()
1617 uhub_find_iface_index(struct usb_hub *hub, device_t child, in uhub_find_iface_index() argument
1626 nports = hub->nports; in uhub_find_iface_index()
1628 udev = usb_bus_port_get_device(hub->hubudev->bus, in uhub_find_iface_index()
1629 hub->ports + x); in uhub_find_iface_index()
1653 struct usb_hub *hub; in uhub_child_location() local
1660 hub = sc->sc_udev->hub; in uhub_child_location()
1663 uhub_find_iface_index(hub, child, &res); in uhub_child_location()
1665 DPRINTF("device not on hub\n"); in uhub_child_location()
1692 struct usb_hub *hub; in uhub_get_device_path() local
1702 hub = sc->sc_udev->hub; in uhub_get_device_path()
1705 uhub_find_iface_index(hub, child, &res); in uhub_get_device_path()
1707 printf("device not on hub\n"); in uhub_get_device_path()
1724 struct usb_hub *hub; in uhub_child_pnpinfo() local
1733 hub = sc->sc_udev->hub; in uhub_child_pnpinfo()
1736 uhub_find_iface_index(hub, child, &res); in uhub_child_pnpinfo()
1738 DPRINTF("device not on hub\n"); in uhub_child_pnpinfo()
1782 * USB HUB, bandwidth must be allocated for ISOCHRONOUS and INTERRUPT
1866 struct usb_hub *hub; in usb_hs_bandwidth_adjust() local
1887 hub = udev->parent_hs_hub->hub; in usb_hs_bandwidth_adjust()
1889 slot = usb_intr_find_best_slot(hub->uframe_usage, in usb_hs_bandwidth_adjust()
1894 hub->uframe_usage[x] += len; in usb_hs_bandwidth_adjust()
2233 * have an USB port, and that is the Root Hub! in usb_bus_port_set_device()
2284 DPRINTF("No root HUB\n"); in usb_needs_explore()
2402 /* no power save for root HUB */ in usbd_transfer_power_ref()
2508 * The root HUB device is never suspended in usb_bus_powerd()
2554 /* we found a non-Root-Hub USB device */ in usb_bus_powerd()
2664 /* we need a parent HUB to do resume */ in usb_dev_resume_peer()
2682 /* resume parent hub first */ in usb_dev_resume_peer()
2776 /* we need a parent HUB to do suspend */ in usb_dev_suspend_peer()
2782 /* check if the current device is a HUB */ in usb_dev_suspend_peer()
2783 if (udev->hub != NULL) { in usb_dev_suspend_peer()
2784 nports = udev->hub->nports; in usb_dev_suspend_peer()
2786 /* check if all devices on the HUB are suspended */ in usb_dev_suspend_peer()
2789 udev->hub->ports + x); in usb_dev_suspend_peer()
2797 DPRINTFN(1, "Port %u is busy on the HUB!\n", x + 1); in usb_dev_suspend_peer()
2843 /* resume parent HUB first */ in usb_dev_suspend_peer()