Home
last modified time | relevance | path

Searched refs:udev (Results 1 – 25 of 106) sorted by relevance

12345

/freebsd/sys/dev/usb/
H A Dusb_device.c139 struct usb_device *udev; in usb_trigger_reprobe_on_off() local
155 udev = bus->devices[USB_ROOT_HUB_ADDR]; in usb_trigger_reprobe_on_off()
157 if (udev->refcount == USB_DEV_REF_MAX) { in usb_trigger_reprobe_on_off()
162 udev->refcount++; in usb_trigger_reprobe_on_off()
165 do_unlock = usbd_enum_lock(udev); in usb_trigger_reprobe_on_off()
171 err = usbd_req_get_port_status(udev, NULL, &ps, 1); in usb_trigger_reprobe_on_off()
182 err = usbd_req_set_port_feature(udev, NULL, 1, in usb_trigger_reprobe_on_off()
189 err = usbd_req_clear_port_feature(udev, NULL, 1, in usb_trigger_reprobe_on_off()
200 usbd_enum_unlock(udev); in usb_trigger_reprobe_on_off()
201 if (--(udev->refcount) == 0) in usb_trigger_reprobe_on_off()
[all …]
H A Dusb_hub.c127 static void usb_dev_resume_peer(struct usb_device *udev);
128 static void usb_dev_suspend_peer(struct usb_device *udev);
129 static uint8_t usb_peer_should_wakeup(struct usb_device *udev);
230 struct usb_device *udev = pm->udev; in uhub_reset_tt_proc() local
234 hub = udev->hub; in uhub_reset_tt_proc()
242 USB_BUS_UNLOCK(udev->bus); in uhub_reset_tt_proc()
248 USB_BUS_LOCK(udev->bus); in uhub_reset_tt_proc()
262 struct usb_device *udev; in uhub_tt_buffer_reset_async_locked() local
271 udev = child->parent_hs_hub; in uhub_tt_buffer_reset_async_locked()
274 if (udev == NULL) in uhub_tt_buffer_reset_async_locked()
[all …]
H A Dusb_request.c138 usbd_get_debug_bits(struct usb_device *udev, struct usb_device_request *req, in usbd_get_debug_bits() argument
167 if (usbd_get_bus_index(udev) != usb_ctrl_debug.bus_index) in usbd_get_debug_bits()
170 if (usbd_get_device_index(udev) != usb_ctrl_debug.dev_index) in usbd_get_debug_bits()
214 cv_signal(&xfer->xroot->udev->ctrlreq_cv); in usbd_do_request_callback()
228 struct usb_device *udev; in usb_do_clear_stall_callback() local
235 udev = xfer->xroot->udev; in usb_do_clear_stall_callback()
237 USB_BUS_LOCK(udev->bus); in usb_do_clear_stall_callback()
241 ep = udev->ep_curr; in usb_do_clear_stall_callback()
242 ep_end = udev->endpoints + udev->endpoints_max; in usb_do_clear_stall_callback()
243 ep_first = udev->endpoints; in usb_do_clear_stall_callback()
[all …]
H A Dusb_request.h33 usb_error_t usbd_req_clear_hub_feature(struct usb_device *udev,
35 usb_error_t usbd_req_clear_port_feature(struct usb_device *udev,
37 usb_error_t usbd_req_get_alt_interface_no(struct usb_device *udev,
40 usb_error_t usbd_req_get_config(struct usb_device *udev, struct mtx *mtx,
42 usb_error_t usbd_req_get_descriptor_ptr(struct usb_device *udev,
44 usb_error_t usbd_req_get_config_desc(struct usb_device *udev, struct mtx *mtx,
46 usb_error_t usbd_req_get_config_desc_full(struct usb_device *udev,
49 usb_error_t usbd_req_get_desc(struct usb_device *udev, struct mtx *mtx,
53 usb_error_t usbd_req_get_device_desc(struct usb_device *udev, struct mtx *mtx,
55 usb_error_t usbd_req_get_device_status(struct usb_device *udev,
[all …]
H A Dusb_handle_request.c150 struct usb_device *udev = xfer->xroot->udev; in usb_handle_set_config() local
161 do_unlock = usbd_enum_lock(udev); in usb_handle_set_config()
173 if (usbd_set_config_index(udev, conf_no)) { in usb_handle_set_config()
178 if (usb_probe_and_attach(udev, USB_IFACE_INDEX_ANY)) { in usb_handle_set_config()
185 usbd_enum_unlock(udev); in usb_handle_set_config()
191 usb_check_alt_setting(struct usb_device *udev, in usb_check_alt_setting() argument
198 do_unlock = usbd_enum_lock(udev); in usb_check_alt_setting()
200 if (alt_index >= usbd_get_no_alts(udev->cdesc, iface->idesc)) in usb_check_alt_setting()
204 usbd_enum_unlock(udev); in usb_check_alt_setting()
223 struct usb_device *udev = xfer->xroot->udev; in usb_handle_iface_request() local
[all …]
H A Dusb_debug.c153 usb_dump_device(struct usb_device *udev) in usb_dump_device() argument
155 printf("usb_dump_device: dev=%p\n", udev); in usb_dump_device()
156 if (udev == NULL) { in usb_dump_device()
162 udev->bus, in usb_dump_device()
163 udev->address, udev->curr_config_no, udev->depth, udev->speed, in usb_dump_device()
164 udev->flags.self_powered, udev->power, udev->langid); in usb_dump_device()
219 struct usb_device *udev; in usb_dump_xfer() local
229 udev = xfer->xroot->udev; in usb_dump_xfer()
232 xfer, udev, in usb_dump_xfer()
233 UGETW(udev->ddesc.idVendor), in usb_dump_xfer()
[all …]
H A Dusb_generic.c153 struct usb_device *udev = f->udev; in ugen_transfer_setup() local
163 error = usbd_transfer_setup(udev, &iface_index, f->xfer, in ugen_transfer_setup()
194 switch (usbd_get_speed(f->udev)) { in ugen_open()
623 if (f->udev->flags.usb_mode != USB_MODE_HOST) { in ugen_set_config()
635 if (usbd_start_set_config(f->udev, index) != 0) in ugen_set_config()
647 if (f->udev->flags.usb_mode != USB_MODE_HOST) { in ugen_set_interface()
658 if (usbd_set_alt_interface_index(f->udev, iface_index, alt_index)) { in ugen_set_interface()
662 if (usb_probe_and_attach(f->udev, iface_index)) { in ugen_set_interface()
678 struct usb_device *udev = f->udev; in ugen_get_cdesc() local
690 (ugd->ugd_config_index == udev->curr_config_index)) { in ugen_get_cdesc()
[all …]
H A Dusb_util.c75 struct usb_device *udev; in device_set_usb_desc() local
88 udev = uaa->device; in device_set_usb_desc()
91 do_unlock = usbd_ctrl_lock(udev); in device_set_usb_desc()
92 temp_p = (char *)udev->scratch.data; in device_set_usb_desc()
93 usb_devinfo(udev, temp_p, sizeof(udev->scratch.data)); in device_set_usb_desc()
95 usbd_ctrl_unlock(udev); in device_set_usb_desc()
99 device_get_nameunit(udev->bus->bdev)); in device_set_usb_desc()
211 usb_check_request(struct usb_device *udev, struct usb_device_request *req) in usb_check_request() argument
237 ep = usbd_get_ep_by_addr(udev, req->wIndex[0]); in usb_check_request()
242 usbd_clear_data_toggle(udev, ep); in usb_check_request()
H A Dusb_msctest.c598 bbb_attach(struct usb_device *udev, uint8_t iface_index, in bbb_attach() argument
612 do_unlock = usbd_enum_lock(udev); in bbb_attach()
618 usb_detach_device(udev, iface_index, 0); in bbb_attach()
621 usbd_enum_unlock(udev); in bbb_attach()
624 iface = usbd_get_iface(udev, iface_index); in bbb_attach()
671 err = usbd_transfer_setup(udev, &iface_index, sc->xfer, pconfig, in bbb_attach()
712 usb_iface_is_cdrom(struct usb_device *udev, uint8_t iface_index) in usb_iface_is_cdrom() argument
720 sc = bbb_attach(udev, iface_index, UICLASS_MASS); in usb_iface_is_cdrom()
745 usb_msc_get_max_lun(struct usb_device *udev, uint8_t iface_index) in usb_msc_get_max_lun() argument
759 err = usbd_do_request(udev, NULL, &req, &buf); in usb_msc_get_max_lun()
[all …]
H A Dusbdi_util.h42 usb_error_t usbd_do_request_proc(struct usb_device *udev, struct usb_process *pproc,
62 usb_error_t usbd_req_get_report(struct usb_device *udev, struct mtx *mtx,
65 usb_error_t usbd_req_get_report_descriptor(struct usb_device *udev,
68 usb_error_t usbd_req_get_string_any(struct usb_device *udev, struct mtx *mtx,
70 usb_error_t usbd_req_get_string_desc(struct usb_device *udev, struct mtx *mtx,
73 usb_error_t usbd_req_set_config(struct usb_device *udev, struct mtx *mtx,
75 usb_error_t usbd_req_set_alt_interface_no(struct usb_device *udev,
77 usb_error_t usbd_req_set_idle(struct usb_device *udev, struct mtx *mtx,
79 usb_error_t usbd_req_set_protocol(struct usb_device *udev, struct mtx *mtx,
81 usb_error_t usbd_req_set_report(struct usb_device *udev, struct mtx *mtx,
H A Dusb_msctest.h43 int usb_iface_is_cdrom(struct usb_device *udev,
45 usb_error_t usb_msc_eject(struct usb_device *udev,
47 usb_error_t usb_msc_auto_quirk(struct usb_device *udev,
49 usb_error_t usb_msc_read_10(struct usb_device *udev,
52 usb_error_t usb_msc_write_10(struct usb_device *udev,
55 usb_error_t usb_msc_read_capacity(struct usb_device *udev,
58 usb_error_t usb_dymo_eject(struct usb_device *udev,
H A Dusb_transfer.c186 usbd_get_dma_delay(struct usb_device *udev) in usbd_get_dma_delay() argument
191 mtod = udev->bus->methods; in usbd_get_dma_delay()
195 (mtod->get_dma_delay) (udev, &temp); in usbd_get_dma_delay()
498 xfer->flags_int.usb_mode = parm->udev->flags.usb_mode; in usbd_transfer_setup_sub()
986 usbd_transfer_setup(struct usb_device *udev, in usbd_transfer_setup() argument
1040 do_unlock = usbd_ctrl_lock(udev); in usbd_transfer_setup()
1045 parm = &udev->scratch.xfer_setup[0].parm; in usbd_transfer_setup()
1048 parm->udev = udev; in usbd_transfer_setup()
1049 parm->speed = usbd_get_speed(udev); in usbd_transfer_setup()
1081 parm->dma_tag_p, udev->bus->dma_parent_tag[0].tag, in usbd_transfer_setup()
[all …]
H A Dusbdi.h561 void *usbd_find_descriptor(struct usb_device *udev, void *id,
565 struct usb_device *udev);
567 struct usb_device *udev);
568 struct usb_interface *usbd_get_iface(struct usb_device *udev,
572 struct usb_endpoint *usbd_get_endpoint(struct usb_device *udev, uint8_t iface_index,
574 struct usb_endpoint *usbd_get_ep_by_addr(struct usb_device *udev, uint8_t ea_val);
575 usb_error_t usbd_interface_count(struct usb_device *udev, uint8_t *count);
576 enum usb_hc_mode usbd_get_mode(struct usb_device *udev);
577 enum usb_dev_speed usbd_get_speed(struct usb_device *udev);
580 usb_error_t usbd_set_pnpinfo(struct usb_device *udev,
[all …]
H A Dusb_dynamic.c82 usb_temp_setup_by_index_w(struct usb_device *udev, uint16_t index) in usb_temp_setup_by_index_w() argument
100 usb_temp_get_desc_w(struct usb_device *udev, struct usb_device_request *req, const void **pPtr, uin… in usb_temp_get_desc_w() argument
107 usb_temp_unsetup_w(struct usb_device *udev) in usb_temp_unsetup_w() argument
109 usbd_free_config_desc(udev, udev->usb_template_ptr); in usb_temp_unsetup_w()
110 udev->usb_template_ptr = NULL; in usb_temp_unsetup_w()
115 usb_linux_free_device_w(struct usb_device *udev) in usb_linux_free_device_w() argument
H A Dusb_fdt_support.c54 find_udev_in_children(phandle_t parent, struct usb_device *udev) in find_udev_in_children() argument
69 UGETW(udev->ddesc.idVendor), UGETW(udev->ddesc.idProduct)); in find_udev_in_children()
76 if (port == (udev->port_index + 1)) in find_udev_in_children()
121 usb_fdt_get_node(device_t dev, struct usb_device *udev) in usb_fdt_get_node() argument
133 if ((controller_node = ofw_bus_get_node(udev->bus->parent)) == -1) in usb_fdt_get_node()
142 for (ud = udev, idx = 0; ud->parent_hub != NULL; ud = ud->parent_hub) { in usb_fdt_get_node()
H A Dusb_dev.c206 cpd->udev = cpd->bus->devices[cpd->dev_index]; in usb_ref_device()
207 if (cpd->udev == NULL) { in usb_ref_device()
211 if (cpd->udev->state == USB_STATE_DETACHED && in usb_ref_device()
219 if (cpd->udev->refcount == USB_DEV_REF_MAX) { in usb_ref_device()
223 cpd->udev->refcount++; in usb_ref_device()
231 crd->do_unlock = usbd_enum_lock_sig(cpd->udev); in usb_ref_device()
253 ppf = cpd->udev->fifo; in usb_ref_device()
269 ppf = cpd->udev->fifo; in usb_ref_device()
299 usbd_enum_unlock(cpd->udev); in usb_ref_device()
302 if (--(cpd->udev->refcount) == 0) in usb_ref_device()
[all …]
H A Dusb_device.h59 struct usb_device *udev; member
142 struct usb_device *udev; member
312 usb_error_t usb_probe_and_attach(struct usb_device *udev,
315 usb_error_t usb_reset_iface_endpoints(struct usb_device *udev,
317 usb_error_t usbd_set_config_index(struct usb_device *udev, uint8_t index);
318 usb_error_t usbd_set_endpoint_stall(struct usb_device *udev,
320 usb_error_t usb_suspend_resume(struct usb_device *udev,
322 void usb_devinfo(struct usb_device *udev, char *dst_ptr, uint16_t dst_len);
325 uint8_t usb_peer_can_wakeup(struct usb_device *udev);
326 struct usb_endpoint *usb_endpoint_foreach(struct usb_device *udev, struct usb_endpoint *ep);
H A Dusb_transfer.h78 struct usb_device *udev; /* pointer to USB device */ member
103 struct usb_device *udev; member
137 void usbd_ctrl_transfer_setup(struct usb_device *udev);
138 void usbd_clear_stall_locked(struct usb_device *udev,
140 void usbd_clear_data_toggle(struct usb_device *udev,
147 usb_timeout_t usbd_get_dma_delay(struct usb_device *udev);
/freebsd/contrib/libfido2/fuzz/
H A Dudev.c20 struct udev { struct
52 struct udev *__wrap_udev_new(void);
55 struct udev_device *__wrap_udev_device_new_from_syspath(struct udev *,
57 struct udev_enumerate *__wrap_udev_enumerate_new(struct udev *);
73 void __wrap_udev_unref(struct udev *);
115 __wrap_udev_device_new_from_syspath(struct udev *udev, const char *syspath) in __wrap_udev_device_new_from_syspath() argument
119 ASSERT_UDEV(udev); in __wrap_udev_device_new_from_syspath()
153 struct udev *
156 struct udev *udev; in __wrap_udev_new() local
158 if ((udev = calloc(1, sizeof(*udev))) == NULL) in __wrap_udev_new()
[all …]
/freebsd/sys/dev/usb/template/
H A Dusb_template.c673 (ues->methods->get_hw_ep_profile) (ues->udev, &pf, n); in usb_hw_ep_find_match()
775 speed = usbd_get_speed(ues->udev); in usb_hw_ep_get_needs()
830 (ues->udev, &pf, ep_no); in usb_hw_ep_get_needs()
917 usb_hw_ep_resolve(struct usb_device *udev, in usb_hw_ep_resolve() argument
931 methods = udev->bus->methods; in usb_hw_ep_resolve()
943 (methods->get_hw_ep_profile) (udev, &pf, 0); in usb_hw_ep_resolve()
954 if (udev->speed == USB_SPEED_FULL) { in usb_hw_ep_resolve()
991 ues = udev->scratch.hw_ep_scratch; in usb_hw_ep_resolve()
998 ues->udev = udev; in usb_hw_ep_resolve()
1045 usb_temp_get_tdd(struct usb_device *udev) in usb_temp_get_tdd() argument
[all …]
/freebsd/lib/libusb/
H A Dlibusb01.c179 usb_close(usb_dev_handle * udev) in usb_close() argument
184 err = libusb20_dev_close((void *)udev); in usb_close()
194 libusb20_be_enqueue_device(usb_backend, (void *)udev); in usb_close()
200 dev = usb_device(udev); in usb_close()
201 libusb20_dev_free((void *)udev); in usb_close()
251 usb_get_descriptor_by_endpoint(usb_dev_handle * udev, int ep, uint8_t type, in usb_get_descriptor_by_endpoint() argument
256 if (udev == NULL) in usb_get_descriptor_by_endpoint()
262 return (usb_control_msg(udev, ep | USB_ENDPOINT_IN, in usb_get_descriptor_by_endpoint()
268 usb_get_descriptor(usb_dev_handle * udev, uint8_t type, uint8_t desc_index, in usb_get_descriptor() argument
273 if (udev == NULL) in usb_get_descriptor()
[all …]
/freebsd/sys/dev/usb/controller/
H A Dusb_controller.c365 struct usb_device *udev; in usb_bus_explore() local
368 udev = bus->devices[USB_ROOT_HUB_ADDR]; in usb_bus_explore()
373 if (udev != NULL) { in usb_bus_explore()
375 uhub_explore_handle_re_enumerate(udev); in usb_bus_explore()
379 if (udev != NULL && udev->hub != NULL) { in usb_bus_explore()
409 (udev->hub->explore) (udev); in usb_bus_explore()
429 struct usb_device *udev; in usb_bus_detach() local
433 udev = bus->devices[USB_ROOT_HUB_ADDR]; in usb_bus_detach()
447 usb_free_device(udev, 0); in usb_bus_detach()
463 struct usb_device *udev; in usb_bus_suspend() local
[all …]
/freebsd/contrib/libfido2/src/
H A Dnfc_linux.c57 copy_info(fido_dev_info_t *di, struct udev *udev, in copy_info() argument
69 (dev = udev_device_new_from_syspath(udev, name)) == NULL) in copy_info()
113 struct udev *udev = NULL; in sysnum_from_syspath() local
119 if ((udev = udev_new()) != NULL && in sysnum_from_syspath()
120 (dev = udev_device_new_from_syspath(udev, path)) != NULL && in sysnum_from_syspath()
127 if (udev != NULL) in sysnum_from_syspath()
128 udev_unref(udev); in sysnum_from_syspath()
136 struct udev *udev = NULL; in fido_nfc_manifest() local
150 if ((udev = udev_new()) == NULL || in fido_nfc_manifest()
151 (udev_enum = udev_enumerate_new(udev)) == NULL) in fido_nfc_manifest()
[all …]
/freebsd/sys/contrib/dev/mediatek/mt76/mt76x2/
H A Dusb.c42 struct usb_device *udev = interface_to_usbdev(intf); in mt76x2u_probe() local
54 udev = usb_get_dev(udev); in mt76x2u_probe()
55 usb_reset_device(udev); in mt76x2u_probe()
81 usb_put_dev(udev); in mt76x2u_probe()
88 struct usb_device *udev = interface_to_usbdev(intf); in mt76x2u_disconnect() local
97 usb_put_dev(udev); in mt76x2u_disconnect()
/freebsd/sys/contrib/openzfs/config/
H A Duser-udev.m42 AC_MSG_CHECKING(for udev directories)
5 [install udev helpers @<:@default=check@:>@]),
10 path1=/lib/udev
11 path2=/usr/lib/udev
22 [install udev rules [[UDEVDIR/rules.d]]]),

12345