• Home
  • Raw
  • Download

Lines Matching refs:udev

113 static void usb_dev_resume_peer(struct usb_device *udev);
114 static void usb_dev_suspend_peer(struct usb_device *udev);
115 static uint8_t usb_peer_should_wakeup(struct usb_device *udev);
224 struct usb_device *udev = pm->udev; in uhub_reset_tt_proc() local
228 hub = udev->hub; in uhub_reset_tt_proc()
236 USB_BUS_UNLOCK(udev->bus); in uhub_reset_tt_proc()
242 USB_BUS_LOCK(udev->bus); in uhub_reset_tt_proc()
256 struct usb_device *udev; in uhub_tt_buffer_reset_async_locked() local
265 udev = child->parent_hs_hub; in uhub_tt_buffer_reset_async_locked()
268 if (udev == NULL) in uhub_tt_buffer_reset_async_locked()
271 hub = udev->hub; in uhub_tt_buffer_reset_async_locked()
273 (udev->speed != USB_SPEED_HIGH) || in uhub_tt_buffer_reset_async_locked()
282 USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); in uhub_tt_buffer_reset_async_locked()
286 if ((udev->ddesc.bDeviceClass == UDCLASS_HUB) && in uhub_tt_buffer_reset_async_locked()
287 (udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBSTT)) in uhub_tt_buffer_reset_async_locked()
313 (void)usb_proc_msignal(USB_BUS_TT_PROC(udev->bus), in uhub_tt_buffer_reset_async_locked()
323 struct usb_device *udev; in uhub_reset_tt_callback() local
330 udev = sc->sc_udev; in uhub_reset_tt_callback()
336 USB_BUS_LOCK(udev->bus); in uhub_reset_tt_callback()
338 for (x = 0; x != udev->hub->nports; x++) { in uhub_reset_tt_callback()
339 up = udev->hub->ports + x; in uhub_reset_tt_callback()
353 USB_BUS_UNLOCK(udev->bus); in uhub_reset_tt_callback()
358 USB_BUS_UNLOCK(udev->bus); in uhub_reset_tt_callback()
377 uhub_count_active_host_ports(struct usb_device *udev, enum usb_dev_speed speed) in uhub_count_active_host_ports() argument
386 if (udev == NULL) in uhub_count_active_host_ports()
388 hub = udev->hub; in uhub_count_active_host_ports()
397 child = usb_bus_port_get_device(udev->bus, up); in uhub_count_active_host_ports()
609 struct usb_device *udev; in uhub_port_debounce() local
611 udev = sc->sc_udev; in uhub_port_debounce()
631 (void)usbd_req_clear_port_feature(udev, NULL, in uhub_port_debounce()
658 struct usb_device *udev; in uhub_reattach_port() local
669 udev = sc->sc_udev; in uhub_reattach_port()
670 child = usb_bus_port_get_device(udev->bus, in uhub_reattach_port()
671 udev->hub->ports + portno - 1); in uhub_reattach_port()
677 err = usbd_req_clear_port_feature(udev, NULL, in uhub_reattach_port()
721 switch (udev->speed) { in uhub_reattach_port()
728 if (udev->parent_hub == NULL) in uhub_reattach_port()
755 err = usbd_req_clear_port_feature(udev, in uhub_reattach_port()
766 err = usbd_req_reset_port(udev, NULL, portno); in uhub_reattach_port()
801 switch (udev->speed) { in uhub_reattach_port()
820 if (udev->parent_hub == NULL) { in uhub_reattach_port()
842 speed = udev->speed; in uhub_reattach_port()
846 err = usbd_req_set_hub_u1_timeout(udev, NULL, in uhub_reattach_port()
847 portno, 128 - (2 * udev->depth)); in uhub_reattach_port()
853 err = usbd_req_set_hub_u2_timeout(udev, NULL, in uhub_reattach_port()
854 portno, 128 - (2 * udev->depth)); in uhub_reattach_port()
867 if (udev->parent_hub != NULL) { in uhub_reattach_port()
869 mode = udev->parent_hub->flags.usb_mode; in uhub_reattach_port()
876 child = usb_alloc_device(sc->sc_dev, udev->bus, udev, in uhub_reattach_port()
877 udev->depth + 1, portno - 1, portno, speed, mode); in uhub_reattach_port()
914 usb_device_20_compatible(struct usb_device *udev) in usb_device_20_compatible() argument
916 if (udev == NULL) in usb_device_20_compatible()
918 switch (udev->speed) { in usb_device_20_compatible()
939 struct usb_device *udev; in uhub_suspend_resume_port() local
945 udev = sc->sc_udev; in uhub_suspend_resume_port()
946 child = usb_bus_port_get_device(udev->bus, in uhub_suspend_resume_port()
947 udev->hub->ports + portno - 1); in uhub_suspend_resume_port()
951 if (usb_device_20_compatible(udev)) { in uhub_suspend_resume_port()
952 err = usbd_req_clear_port_feature(udev, NULL, in uhub_suspend_resume_port()
955 err = usbd_req_clear_port_feature(udev, NULL, in uhub_suspend_resume_port()
972 if (usb_device_20_compatible(udev)) { in uhub_suspend_resume_port()
984 (void)usbd_req_warm_reset_port(udev, NULL, portno); in uhub_suspend_resume_port()
1028 uhub_is_too_deep(struct usb_device *udev) in uhub_is_too_deep() argument
1030 switch (udev->speed) { in uhub_is_too_deep()
1034 if (udev->depth > USB_HUB_MAX_DEPTH) in uhub_is_too_deep()
1038 if (udev->depth > USB_SS_HUB_DEPTH_MAX) in uhub_is_too_deep()
1055 uhub_explore(struct usb_device *udev) in uhub_explore() argument
1065 hub = udev->hub; in uhub_explore()
1068 DPRINTFN(11, "udev=%p addr=%d\n", udev, udev->address); in uhub_explore()
1071 if (uhub_is_too_deep(udev)) in uhub_explore()
1075 if (udev->flags.self_suspended) { in uhub_explore()
1085 do_unlock = usbd_enum_lock(udev); in uhub_explore()
1103 udev, NULL, portno, UHF_C_PORT_OVER_CURRENT); in uhub_explore()
1112 udev, NULL, portno, UHF_C_PORT_ENABLE); in uhub_explore()
1159 usbd_enum_unlock(udev); in uhub_explore()
1192 uhub_query_info(struct usb_device *udev, uint8_t *pnports, uint8_t *ptt) in uhub_query_info() argument
1200 if (udev->ddesc.bDeviceClass != UDCLASS_HUB) in uhub_query_info()
1206 switch (udev->speed) { in uhub_query_info()
1211 err = usbd_req_get_hub_descriptor(udev, NULL, &hubdesc20, 1); in uhub_query_info()
1221 if (udev->speed == USB_SPEED_HIGH) in uhub_query_info()
1226 err = usbd_req_get_ss_hub_descriptor(udev, NULL, &hubdesc30, 1); in uhub_query_info()
1260 struct usb_device *udev; in uhub_attach() local
1277 udev = uaa->device; in uhub_attach()
1278 parent_hub = udev->parent_hub; in uhub_attach()
1280 sc->sc_udev = udev; in uhub_attach()
1289 udev->depth, in uhub_attach()
1290 udev->flags.self_powered, in uhub_attach()
1295 if (uhub_is_too_deep(udev)) { in uhub_attach()
1297 "exceeds maximum. HUB ignored\n", (int)udev->depth); in uhub_attach()
1301 if (!udev->flags.self_powered && parent_hub && in uhub_attach()
1315 err = usbd_set_alt_interface_index(udev, 0, 0); in uhub_attach()
1327 switch (udev->speed) { in uhub_attach()
1332 err = usbd_req_get_hub_descriptor(udev, NULL, &hubdesc20, 1); in uhub_attach()
1354 err = usbd_req_get_hub_descriptor(udev, NULL, &hubdesc20, nports); in uhub_attach()
1368 if (udev->parent_hub != NULL) { in uhub_attach()
1369 err = usbd_req_set_hub_depth(udev, NULL, in uhub_attach()
1370 udev->depth - 1); in uhub_attach()
1377 err = usbd_req_get_ss_hub_descriptor(udev, NULL, &hubdesc30, 1); in uhub_attach()
1393 if (nports > ((udev->parent_hub != NULL) ? 15 : 127)) { in uhub_attach()
1399 err = usbd_req_get_ss_hub_descriptor(udev, NULL, &hubdesc30, nports); in uhub_attach()
1434 udev->hub = hub; in uhub_attach()
1440 hub->hubudev = udev; in uhub_attach()
1443 hub->tt_msg[0].udev = udev; in uhub_attach()
1445 hub->tt_msg[1].udev = udev; in uhub_attach()
1448 if (udev->flags.self_powered) { in uhub_attach()
1456 if (udev->parent_hub == NULL) { in uhub_attach()
1461 err = usbd_transfer_setup(udev, &iface_index, sc->sc_xfer, in uhub_attach()
1510 switch (udev->speed) { in uhub_attach()
1528 err = usbd_req_set_port_feature(udev, NULL, in uhub_attach()
1559 if (udev->parent_hub == NULL) { /* parent is bus */ in uhub_attach()
1568 parent_info.nameunit = device_get_nameunit(udev->parent_dev); in uhub_attach()
1569 parent_info.port_no = udev->port_no; in uhub_attach()
1582 removable, udev->flags.self_powered ? "self" : "bus"); in uhub_attach()
1592 usbd_set_power_mode(udev, USB_POWER_MODE_SAVE); in uhub_attach()
1600 bsd_free(udev->hub, M_USBDEV); in uhub_attach()
1602 udev->hub = NULL; in uhub_attach()
1699 struct usb_device *udev; member
1709 struct usb_device *udev; in uhub_find_iface_index() local
1716 udev = usb_bus_port_get_device(hub->hubudev->bus, in uhub_find_iface_index()
1718 if (!udev) { in uhub_find_iface_index()
1722 iface = usbd_get_iface(udev, i); in uhub_find_iface_index()
1726 res->udev = udev; in uhub_find_iface_index()
1733 res->udev = NULL; in uhub_find_iface_index()
1759 if (!res.udev) { in uhub_child_location_string()
1767 device_get_unit(res.udev->bus->bdev), in uhub_child_location_string()
1768 (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0U, in uhub_child_location_string()
1770 res.udev->device_index, res.iface_index); in uhub_child_location_string()
1800 if (!res.udev) { in uhub_child_pnpinfo_string()
1807 iface = usbd_get_iface(res.udev, res.iface_index); in uhub_child_pnpinfo_string()
1816 UGETW(res.udev->ddesc.idVendor), in uhub_child_pnpinfo_string()
1817 UGETW(res.udev->ddesc.idProduct), in uhub_child_pnpinfo_string()
1818 res.udev->ddesc.bDeviceClass, in uhub_child_pnpinfo_string()
1819 res.udev->ddesc.bDeviceSubClass, in uhub_child_pnpinfo_string()
1820 usb_get_serial(res.udev), in uhub_child_pnpinfo_string()
1821 UGETW(res.udev->ddesc.bcdDevice), in uhub_child_pnpinfo_string()
1822 (res.udev->flags.usb_mode == USB_MODE_HOST) ? "host" : "device", in uhub_child_pnpinfo_string()
1925 usb_hs_bandwidth_adjust(struct usb_device *udev, int16_t len, in usb_hs_bandwidth_adjust() argument
1928 struct usb_bus *bus = udev->bus; in usb_hs_bandwidth_adjust()
1935 speed = usbd_get_speed(udev); in usb_hs_bandwidth_adjust()
1950 hub = udev->parent_hs_hub->hub; in usb_hs_bandwidth_adjust()
1985 struct usb_device *udev; in usb_hs_bandwidth_alloc() local
1990 udev = xfer->xroot->udev; in usb_hs_bandwidth_alloc()
1992 if (udev->flags.usb_mode != USB_MODE_HOST) in usb_hs_bandwidth_alloc()
1999 speed = usbd_get_speed(udev); in usb_hs_bandwidth_alloc()
2006 slot = usb_hs_bandwidth_adjust(udev, in usb_hs_bandwidth_alloc()
2038 slot = usb_hs_bandwidth_adjust(udev, in usb_hs_bandwidth_alloc()
2066 struct usb_device *udev; in usb_hs_bandwidth_free() local
2070 udev = xfer->xroot->udev; in usb_hs_bandwidth_free()
2072 if (udev->flags.usb_mode != USB_MODE_HOST) in usb_hs_bandwidth_free()
2087 (void)usb_hs_bandwidth_adjust(udev, in usb_hs_bandwidth_free()
2170 if (xfer->xroot->udev->parent_hs_hub != in usbd_fs_isoc_schedule_alloc_slot()
2171 isoc_xfer->xroot->udev->parent_hs_hub) { in usbd_fs_isoc_schedule_alloc_slot()
2174 if ((isoc_xfer->xroot->udev->parent_hs_hub-> in usbd_fs_isoc_schedule_alloc_slot()
2176 (xfer->xroot->udev->hs_port_no != in usbd_fs_isoc_schedule_alloc_slot()
2177 isoc_xfer->xroot->udev->hs_port_no)) { in usbd_fs_isoc_schedule_alloc_slot()
2288 struct usb_device *udev, uint8_t device_index) in usb_bus_port_set_device() argument
2299 if (udev) { in usb_bus_port_set_device()
2313 bus->devices[device_index] = udev; in usb_bus_port_set_device()
2321 DPRINTFN(2, "bus %p devices[%u] = %p\n", bus, device_index, udev); in usb_bus_port_set_device()
2466 struct usb_device *udev; in usbd_transfer_power_ref() local
2471 udev = xfer->xroot->udev; in usbd_transfer_power_ref()
2473 if (udev->device_index == USB_ROOT_HUB_ADDR) { in usbd_transfer_power_ref()
2477 USB_BUS_LOCK(udev->bus); in usbd_transfer_power_ref()
2481 udev->pwr_save.last_xfer_time = CUR_TICKS; in usbd_transfer_power_ref()
2482 udev->pwr_save.type_refs[xfer_type] += val; in usbd_transfer_power_ref()
2485 udev->pwr_save.read_refs += val; in usbd_transfer_power_ref()
2491 udev->pwr_save.write_refs += val; in usbd_transfer_power_ref()
2494 udev->pwr_save.read_refs += val; in usbd_transfer_power_ref()
2496 udev->pwr_save.write_refs += val; in usbd_transfer_power_ref()
2500 if (udev->flags.self_suspended) in usbd_transfer_power_ref()
2501 needs_explore = usb_peer_should_wakeup(udev); in usbd_transfer_power_ref()
2505 if (!(udev->bus->hw_power_state & power_mask[xfer_type])) { in usbd_transfer_power_ref()
2507 udev->bus->hw_power_state |= power_mask[xfer_type]; in usbd_transfer_power_ref()
2517 USB_BUS_UNLOCK(udev->bus); in usbd_transfer_power_ref()
2521 usb_bus_power_update(udev->bus); in usbd_transfer_power_ref()
2524 if (udev->bus->methods->set_hw_power != NULL) { in usbd_transfer_power_ref()
2525 (udev->bus->methods->set_hw_power) (udev->bus); in usbd_transfer_power_ref()
2537 usb_peer_should_wakeup(struct usb_device *udev) in usb_peer_should_wakeup() argument
2539 return (uint8_t)(((udev->power_mode == USB_POWER_MODE_ON) && in usb_peer_should_wakeup()
2540 (udev->flags.usb_mode == USB_MODE_HOST)) || in usb_peer_should_wakeup()
2541 (udev->driver_added_refcount != udev->bus->driver_added_refcount) || in usb_peer_should_wakeup()
2542 (udev->re_enumerate_wait != USB_RE_ENUM_DONE) || in usb_peer_should_wakeup()
2543 (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) || in usb_peer_should_wakeup()
2544 (udev->pwr_save.write_refs != 0) || in usb_peer_should_wakeup()
2545 ((udev->pwr_save.read_refs != 0) && in usb_peer_should_wakeup()
2546 (udev->flags.usb_mode == USB_MODE_HOST) && in usb_peer_should_wakeup()
2547 (usb_peer_can_wakeup(udev) == 0))); in usb_peer_should_wakeup()
2560 struct usb_device *udev; in usb_bus_powerd() local
2585 udev = bus->devices[x]; in usb_bus_powerd()
2586 if (udev == NULL) in usb_bus_powerd()
2589 temp = CUR_TICKS - udev->pwr_save.last_xfer_time; in usb_bus_powerd()
2591 if (usb_peer_should_wakeup(udev)) { in usb_bus_powerd()
2593 if (udev->flags.self_suspended != 0) { in usb_bus_powerd()
2595 usb_dev_resume_peer(udev); in usb_bus_powerd()
2599 (udev->flags.usb_mode == USB_MODE_HOST) && in usb_bus_powerd()
2600 (udev->flags.self_suspended == 0)) { in usb_bus_powerd()
2604 usb_dev_suspend_peer(udev); in usb_bus_powerd()
2622 udev = bus->devices[x]; in usb_bus_powerd()
2623 if (udev == NULL) in usb_bus_powerd()
2630 temp = CUR_TICKS - udev->pwr_save.last_xfer_time; in usb_bus_powerd()
2639 if (udev->flags.self_suspended == 0) { in usb_bus_powerd()
2640 type_refs[0] += udev->pwr_save.type_refs[0]; in usb_bus_powerd()
2641 type_refs[1] += udev->pwr_save.type_refs[1]; in usb_bus_powerd()
2642 type_refs[2] += udev->pwr_save.type_refs[2]; in usb_bus_powerd()
2643 type_refs[3] += udev->pwr_save.type_refs[3]; in usb_bus_powerd()
2673 usbd_device_30_remote_wakeup(struct usb_device *udev, uint8_t bRequest) in usbd_device_30_remote_wakeup() argument
2683 return (usbd_do_request(udev, NULL, &req, 0)); in usbd_device_30_remote_wakeup()
2687 usbd_clear_dev_wakeup(struct usb_device *udev) in usbd_clear_dev_wakeup() argument
2691 if (usb_device_20_compatible(udev)) { in usbd_clear_dev_wakeup()
2692 err = usbd_req_clear_device_feature(udev, in usbd_clear_dev_wakeup()
2695 err = usbd_device_30_remote_wakeup(udev, in usbd_clear_dev_wakeup()
2702 usbd_set_dev_wakeup(struct usb_device *udev) in usbd_set_dev_wakeup() argument
2706 if (usb_device_20_compatible(udev)) { in usbd_set_dev_wakeup()
2707 err = usbd_req_set_device_feature(udev, in usbd_set_dev_wakeup()
2710 err = usbd_device_30_remote_wakeup(udev, in usbd_set_dev_wakeup()
2723 usb_dev_resume_peer(struct usb_device *udev) in usb_dev_resume_peer() argument
2729 if (udev == NULL) in usb_dev_resume_peer()
2733 if (udev->flags.self_suspended == 0) in usb_dev_resume_peer()
2737 if (udev->parent_hub == NULL) in usb_dev_resume_peer()
2740 DPRINTF("udev=%p\n", udev); in usb_dev_resume_peer()
2742 if ((udev->flags.usb_mode == USB_MODE_DEVICE) && in usb_dev_resume_peer()
2743 (udev->flags.remote_wakeup == 0)) { in usb_dev_resume_peer()
2752 bus = udev->bus; in usb_dev_resume_peer()
2755 usb_dev_resume_peer(udev->parent_hub); in usb_dev_resume_peer()
2760 if (usb_device_20_compatible(udev)) { in usb_dev_resume_peer()
2762 err = usbd_req_clear_port_feature(udev->parent_hub, in usb_dev_resume_peer()
2763 NULL, udev->port_no, UHF_PORT_SUSPEND); in usb_dev_resume_peer()
2766 err = usbd_req_set_port_link_state(udev->parent_hub, in usb_dev_resume_peer()
2767 NULL, udev->port_no, UPS_PORT_LS_U0); in usb_dev_resume_peer()
2780 (bus->methods->device_resume) (udev); in usb_dev_resume_peer()
2784 udev->flags.self_suspended = 0; in usb_dev_resume_peer()
2787 udev->pwr_save.last_xfer_time = CUR_TICKS; in usb_dev_resume_peer()
2790 if (udev->pwr_save.type_refs[UE_CONTROL] != 0) in usb_dev_resume_peer()
2792 if (udev->pwr_save.type_refs[UE_BULK] != 0) in usb_dev_resume_peer()
2794 if (udev->pwr_save.type_refs[UE_INTERRUPT] != 0) in usb_dev_resume_peer()
2796 if (udev->pwr_save.type_refs[UE_ISOCHRONOUS] != 0) in usb_dev_resume_peer()
2806 usbd_sr_lock(udev); in usb_dev_resume_peer()
2809 (void)usb_suspend_resume(udev, 0); in usb_dev_resume_peer()
2811 usbd_sr_unlock(udev); in usb_dev_resume_peer()
2814 if (usb_peer_can_wakeup(udev)) { in usb_dev_resume_peer()
2816 err = usbd_clear_dev_wakeup(udev); in usb_dev_resume_peer()
2832 usb_dev_suspend_peer(struct usb_device *udev) in usb_dev_suspend_peer() argument
2842 if (udev == NULL) in usb_dev_suspend_peer()
2846 if (udev->flags.self_suspended) in usb_dev_suspend_peer()
2850 if (udev->parent_hub == NULL) in usb_dev_suspend_peer()
2853 DPRINTF("udev=%p\n", udev); in usb_dev_suspend_peer()
2856 if (udev->hub != NULL) { in usb_dev_suspend_peer()
2857 nports = udev->hub->nports; in usb_dev_suspend_peer()
2861 child = usb_bus_port_get_device(udev->bus, in usb_dev_suspend_peer()
2862 udev->hub->ports + x); in usb_dev_suspend_peer()
2875 if (usb_peer_can_wakeup(udev)) { in usb_dev_suspend_peer()
2882 err = usbd_set_dev_wakeup(udev); in usb_dev_suspend_peer()
2890 if (udev->bus == NULL) in usb_dev_suspend_peer()
2893 USB_BUS_LOCK(udev->bus); in usb_dev_suspend_peer()
2898 err = usb_peer_should_wakeup(udev); in usb_dev_suspend_peer()
2905 udev->flags.self_suspended = 1; in usb_dev_suspend_peer()
2907 USB_BUS_UNLOCK(udev->bus); in usb_dev_suspend_peer()
2910 if (usb_peer_can_wakeup(udev)) { in usb_dev_suspend_peer()
2912 err = usbd_clear_dev_wakeup(udev); in usb_dev_suspend_peer()
2919 if (udev->flags.usb_mode == USB_MODE_DEVICE) { in usb_dev_suspend_peer()
2921 usb_dev_resume_peer(udev->parent_hub); in usb_dev_suspend_peer()
2927 err = usbd_req_clear_port_feature(udev->parent_hub, in usb_dev_suspend_peer()
2928 NULL, udev->port_no, UHF_PORT_SUSPEND); in usb_dev_suspend_peer()
2941 usbd_sr_lock(udev); in usb_dev_suspend_peer()
2944 (void)usb_suspend_resume(udev, 1); in usb_dev_suspend_peer()
2946 usbd_sr_unlock(udev); in usb_dev_suspend_peer()
2948 if (udev->bus->methods->device_suspend != NULL) { in usb_dev_suspend_peer()
2951 (udev->bus->methods->device_suspend) (udev); in usb_dev_suspend_peer()
2954 temp = usbd_get_dma_delay(udev); in usb_dev_suspend_peer()
2959 if (usb_device_20_compatible(udev)) { in usb_dev_suspend_peer()
2961 err = usbd_req_set_port_feature(udev->parent_hub, in usb_dev_suspend_peer()
2962 NULL, udev->port_no, UHF_PORT_SUSPEND); in usb_dev_suspend_peer()
2969 err = usbd_req_set_port_link_state(udev->parent_hub, in usb_dev_suspend_peer()
2970 NULL, udev->port_no, UPS_PORT_LS_U3); in usb_dev_suspend_peer()
2977 udev = udev->parent_hub; in usb_dev_suspend_peer()
2988 usbd_set_power_mode(struct usb_device *udev, uint8_t power_mode) in usbd_set_power_mode() argument
2995 power_mode = usbd_filter_power_mode(udev, power_mode); in usbd_set_power_mode()
2997 udev->power_mode = power_mode; /* update copy of power mode */ in usbd_set_power_mode()
3000 usb_bus_power_update(udev->bus); in usbd_set_power_mode()
3002 usb_needs_explore(udev->bus, 0 /* no probe */ ); in usbd_set_power_mode()
3012 usbd_filter_power_mode(struct usb_device *udev, uint8_t power_mode) in usbd_filter_power_mode() argument
3016 mtod = udev->bus->methods; in usbd_filter_power_mode()
3020 (mtod->get_power_mode) (udev, &temp); in usbd_filter_power_mode()
3038 usbd_start_re_enumerate(struct usb_device *udev) in usbd_start_re_enumerate() argument
3040 if (udev->re_enumerate_wait == USB_RE_ENUM_DONE) { in usbd_start_re_enumerate()
3041 udev->re_enumerate_wait = USB_RE_ENUM_START; in usbd_start_re_enumerate()
3042 usb_needs_explore(udev->bus, 0); in usbd_start_re_enumerate()
3054 usbd_start_set_config(struct usb_device *udev, uint8_t index) in usbd_start_set_config() argument
3056 if (udev->re_enumerate_wait == USB_RE_ENUM_DONE) { in usbd_start_set_config()
3057 if (udev->curr_config_index == index) { in usbd_start_set_config()
3061 udev->next_config_index = index; in usbd_start_set_config()
3062 udev->re_enumerate_wait = USB_RE_ENUM_SET_CONFIG; in usbd_start_set_config()
3063 usb_needs_explore(udev->bus, 0); in usbd_start_set_config()
3065 } else if (udev->re_enumerate_wait == USB_RE_ENUM_SET_CONFIG) { in usbd_start_set_config()
3066 if (udev->next_config_index == index) { in usbd_start_set_config()