FreeBSD kernel usb device Code
usb_request.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

usb_error_t usbd_req_clear_hub_feature (struct usb_device *udev, struct mtx *mtx, uint16_t sel)
 
usb_error_t usbd_req_clear_port_feature (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint16_t sel)
 
usb_error_t usbd_req_get_alt_interface_no (struct usb_device *udev, struct mtx *mtx, uint8_t *alt_iface_no, uint8_t iface_index)
 
usb_error_t usbd_req_get_config (struct usb_device *udev, struct mtx *mtx, uint8_t *pconf)
 
usb_error_t usbd_req_get_descriptor_ptr (struct usb_device *udev, struct usb_config_descriptor **ppcd, uint16_t wValue)
 
usb_error_t usbd_req_get_config_desc (struct usb_device *udev, struct mtx *mtx, struct usb_config_descriptor *d, uint8_t conf_index)
 
usb_error_t usbd_req_get_config_desc_full (struct usb_device *udev, struct mtx *mtx, struct usb_config_descriptor **ppcd, uint8_t conf_index)
 
usb_error_t usbd_req_get_desc (struct usb_device *udev, struct mtx *mtx, uint16_t *actlen, void *desc, uint16_t min_len, uint16_t max_len, uint16_t id, uint8_t type, uint8_t index, uint8_t retries)
 
usb_error_t usbd_req_get_device_desc (struct usb_device *udev, struct mtx *mtx, struct usb_device_descriptor *d)
 
usb_error_t usbd_req_get_device_status (struct usb_device *udev, struct mtx *mtx, struct usb_status *st)
 
usb_error_t usbd_req_get_hub_descriptor (struct usb_device *udev, struct mtx *mtx, struct usb_hub_descriptor *hd, uint8_t nports)
 
usb_error_t usbd_req_get_ss_hub_descriptor (struct usb_device *udev, struct mtx *mtx, struct usb_hub_ss_descriptor *hd, uint8_t nports)
 
usb_error_t usbd_req_get_hub_status (struct usb_device *udev, struct mtx *mtx, struct usb_hub_status *st)
 
usb_error_t usbd_req_get_port_status (struct usb_device *udev, struct mtx *mtx, struct usb_port_status *ps, uint8_t port)
 
usb_error_t usbd_req_reset_port (struct usb_device *udev, struct mtx *mtx, uint8_t port)
 
usb_error_t usbd_req_warm_reset_port (struct usb_device *udev, struct mtx *mtx, uint8_t port)
 
usb_error_t usbd_req_set_address (struct usb_device *udev, struct mtx *mtx, uint16_t addr)
 
usb_error_t usbd_req_set_hub_feature (struct usb_device *udev, struct mtx *mtx, uint16_t sel)
 
usb_error_t usbd_req_set_port_feature (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint16_t sel)
 
usb_error_t usbd_setup_device_desc (struct usb_device *udev, struct mtx *mtx)
 
usb_error_t usbd_req_re_enumerate (struct usb_device *udev, struct mtx *mtx)
 
usb_error_t usbd_req_clear_device_feature (struct usb_device *udev, struct mtx *mtx, uint16_t sel)
 
usb_error_t usbd_req_set_device_feature (struct usb_device *udev, struct mtx *mtx, uint16_t sel)
 
usb_error_t usbd_req_set_hub_u1_timeout (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t timeout)
 
usb_error_t usbd_req_set_hub_u2_timeout (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t timeout)
 
usb_error_t usbd_req_set_hub_depth (struct usb_device *udev, struct mtx *mtx, uint16_t depth)
 
usb_error_t usbd_req_reset_tt (struct usb_device *udev, struct mtx *mtx, uint8_t port)
 
usb_error_t usbd_req_clear_tt_buffer (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t addr, uint8_t type, uint8_t endpoint)
 
usb_error_t usbd_req_set_port_link_state (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t link_state)
 
usb_error_t usbd_req_set_lpm_info (struct usb_device *udev, struct mtx *mtx, uint8_t port, uint8_t besl, uint8_t addr, uint8_t rwe)
 
void * usbd_alloc_config_desc (struct usb_device *, uint32_t)
 
void usbd_free_config_desc (struct usb_device *, void *)
 

Function Documentation

◆ usbd_alloc_config_desc()

void * usbd_alloc_config_desc ( struct usb_device udev,
uint32_t  size 
)

Definition at line 1303 of file usb_request.c.

References DPRINTF, size, and USB_CONFIG_MAX.

Referenced by usb_temp_setup(), and usbd_req_get_config_desc_full().

Here is the caller graph for this function:

◆ usbd_free_config_desc()

void usbd_free_config_desc ( struct usb_device udev,
void *  ptr 
)

Definition at line 1323 of file usb_request.c.

Referenced by usb_temp_unsetup(), usb_temp_unsetup_w(), usb_unconfigure(), and usbd_req_get_config_desc_full().

Here is the caller graph for this function:

◆ usbd_req_clear_device_feature()

usb_error_t usbd_req_clear_device_feature ( struct usb_device udev,
struct mtx *  mtx,
uint16_t  sel 
)

Definition at line 2165 of file usb_request.c.

References req, UR_CLEAR_FEATURE, usbd_do_request, USETW, and UT_WRITE_DEVICE.

Referenced by usbd_clear_dev_wakeup().

Here is the caller graph for this function:

◆ usbd_req_clear_hub_feature()

usb_error_t usbd_req_clear_hub_feature ( struct usb_device udev,
struct mtx *  mtx,
uint16_t  sel 
)

Definition at line 1626 of file usb_request.c.

References req, UR_CLEAR_FEATURE, usbd_do_request, USETW, and UT_WRITE_CLASS_DEVICE.

◆ usbd_req_clear_port_feature()

usb_error_t usbd_req_clear_port_feature ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint16_t  sel 
)

◆ usbd_req_clear_tt_buffer()

usb_error_t usbd_req_clear_tt_buffer ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint8_t  addr,
uint8_t  type,
uint8_t  endpoint 
)

◆ usbd_req_get_alt_interface_no()

usb_error_t usbd_req_get_alt_interface_no ( struct usb_device udev,
struct mtx *  mtx,
uint8_t *  alt_iface_no,
uint8_t  iface_index 
)

◆ usbd_req_get_config()

usb_error_t usbd_req_get_config ( struct usb_device udev,
struct mtx *  mtx,
uint8_t *  pconf 
)

Definition at line 1945 of file usb_request.c.

References req, UR_GET_CONFIG, usbd_do_request, USETW, and UT_READ_DEVICE.

◆ usbd_req_get_config_desc()

usb_error_t usbd_req_get_config_desc ( struct usb_device udev,
struct mtx *  mtx,
struct usb_config_descriptor d,
uint8_t  conf_index 
)

Definition at line 1272 of file usb_request.c.

References UDESC_CONFIG, UGETW, USB_ERR_INVAL, usbd_req_get_desc(), and usb_config_descriptor::wTotalLength.

Referenced by usbd_req_get_config_desc_full().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_get_config_desc_full()

usb_error_t usbd_req_get_config_desc_full ( struct usb_device udev,
struct mtx *  mtx,
struct usb_config_descriptor **  ppcd,
uint8_t  conf_index 
)

Definition at line 1342 of file usb_request.c.

References DPRINTF, index, len, UDESC_CONFIG, UGETW, USB_CONFIG_MAX, USB_ERR_INVAL, USB_ERR_NOMEM, usbd_alloc_config_desc(), usbd_free_config_desc(), usbd_req_get_config_desc(), usbd_req_get_desc(), USETW, and usb_config_descriptor::wTotalLength.

Referenced by usbd_set_config_index().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_get_desc()

usb_error_t usbd_req_get_desc ( struct usb_device udev,
struct mtx *  mtx,
uint16_t *  actlen,
void *  desc,
uint16_t  min_len,
uint16_t  max_len,
uint16_t  id,
uint8_t  type,
uint8_t  index,
uint8_t  retries 
)

◆ usbd_req_get_descriptor_ptr()

usb_error_t usbd_req_get_descriptor_ptr ( struct usb_device udev,
struct usb_config_descriptor **  ppcd,
uint16_t  wValue 
)

Definition at line 1226 of file usb_request.c.

References usb_device::bus, len, req, UR_GET_DESCRIPTOR, USB_BUS_LOCK, USB_BUS_UNLOCK, USB_ERR_INVAL, usbd_get_hr_func(), USETW, UT_READ_DEVICE, and usb_device_request::wValue.

Referenced by usbd_set_config_index().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_get_device_desc()

usb_error_t usbd_req_get_device_desc ( struct usb_device udev,
struct mtx *  mtx,
struct usb_device_descriptor d 
)

Definition at line 1392 of file usb_request.c.

References UDESC_DEVICE, and usbd_req_get_desc().

Referenced by usbd_setup_device_desc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_get_device_status()

usb_error_t usbd_req_get_device_status ( struct usb_device udev,
struct mtx *  mtx,
struct usb_status st 
)

Definition at line 1472 of file usb_request.c.

References req, UR_GET_STATUS, usbd_do_request, USETW, and UT_READ_DEVICE.

Referenced by usbd_set_config_index().

Here is the caller graph for this function:

◆ usbd_req_get_hub_descriptor()

usb_error_t usbd_req_get_hub_descriptor ( struct usb_device udev,
struct mtx *  mtx,
struct usb_hub_descriptor hd,
uint8_t  nports 
)

Definition at line 1493 of file usb_request.c.

References len, req, UDESC_HUB, UR_GET_DESCRIPTOR, usbd_do_request, USETW, USETW2, and UT_READ_CLASS_DEVICE.

Referenced by uhub_attach(), and uhub_query_info().

Here is the caller graph for this function:

◆ usbd_req_get_hub_status()

usb_error_t usbd_req_get_hub_status ( struct usb_device udev,
struct mtx *  mtx,
struct usb_hub_status st 
)

Definition at line 1537 of file usb_request.c.

References req, UR_GET_STATUS, usbd_do_request, USETW, and UT_READ_CLASS_DEVICE.

◆ usbd_req_get_port_status()

usb_error_t usbd_req_get_port_status ( struct usb_device udev,
struct mtx *  mtx,
struct usb_port_status ps,
uint8_t  port 
)

Definition at line 1603 of file usb_request.c.

References req, UR_GET_STATUS, usbd_do_request_flags(), USETW, and UT_READ_CLASS_OTHER.

Referenced by uhub_read_port_status(), usb_trigger_reprobe_on_off(), usbd_req_reset_port(), and usbd_req_warm_reset_port().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_get_ss_hub_descriptor()

usb_error_t usbd_req_get_ss_hub_descriptor ( struct usb_device udev,
struct mtx *  mtx,
struct usb_hub_ss_descriptor hd,
uint8_t  nports 
)

Definition at line 1515 of file usb_request.c.

References len, req, UDESC_SS_HUB, UR_GET_DESCRIPTOR, usbd_do_request, USETW, USETW2, and UT_READ_CLASS_DEVICE.

Referenced by uhub_attach(), and uhub_query_info().

Here is the caller graph for this function:

◆ usbd_req_re_enumerate()

◆ usbd_req_reset_port()

◆ usbd_req_reset_tt()

usb_error_t usbd_req_reset_tt ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port 
)

◆ usbd_req_set_address()

usb_error_t usbd_req_set_address ( struct usb_device udev,
struct mtx *  mtx,
uint16_t  addr 
)

Definition at line 1561 of file usb_request.c.

References addr, usb_device::bus, usb_bus::methods, req, usb_bus_methods::set_address, UR_SET_ADDRESS, USB_DELAY_STATUS_STAGE, USB_ERR_INVAL, USB_MS_TO_TICKS, usb_pause_mtx(), usb_set_address_settle, usbd_do_request_flags(), USETW, and UT_WRITE_DEVICE.

Referenced by usb_alloc_device(), and usbd_req_re_enumerate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbd_req_set_device_feature()

usb_error_t usbd_req_set_device_feature ( struct usb_device udev,
struct mtx *  mtx,
uint16_t  sel 
)

Definition at line 2186 of file usb_request.c.

References req, UR_SET_FEATURE, usbd_do_request, USETW, and UT_WRITE_DEVICE.

Referenced by usbd_set_dev_wakeup().

Here is the caller graph for this function:

◆ usbd_req_set_hub_depth()

usb_error_t usbd_req_set_hub_depth ( struct usb_device udev,
struct mtx *  mtx,
uint16_t  depth 
)

Definition at line 1712 of file usb_request.c.

References req, UR_SET_HUB_DEPTH, usbd_do_request, USETW, and UT_WRITE_CLASS_DEVICE.

Referenced by uhub_attach().

Here is the caller graph for this function:

◆ usbd_req_set_hub_feature()

usb_error_t usbd_req_set_hub_feature ( struct usb_device udev,
struct mtx *  mtx,
uint16_t  sel 
)

Definition at line 1647 of file usb_request.c.

References req, UR_SET_FEATURE, usbd_do_request, USETW, and UT_WRITE_CLASS_DEVICE.

◆ usbd_req_set_hub_u1_timeout()

usb_error_t usbd_req_set_hub_u1_timeout ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint8_t  timeout 
)

Definition at line 1668 of file usb_request.c.

References req, UHF_PORT_U1_TIMEOUT, UR_SET_FEATURE, usbd_do_request, USETW, and UT_WRITE_CLASS_OTHER.

Referenced by uhub_reattach_port().

Here is the caller graph for this function:

◆ usbd_req_set_hub_u2_timeout()

usb_error_t usbd_req_set_hub_u2_timeout ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint8_t  timeout 
)

Definition at line 1690 of file usb_request.c.

References req, UHF_PORT_U2_TIMEOUT, UR_SET_FEATURE, usbd_do_request, USETW, and UT_WRITE_CLASS_OTHER.

Referenced by uhub_reattach_port().

Here is the caller graph for this function:

◆ usbd_req_set_lpm_info()

usb_error_t usbd_req_set_lpm_info ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint8_t  besl,
uint8_t  addr,
uint8_t  rwe 
)

◆ usbd_req_set_port_feature()

usb_error_t usbd_req_set_port_feature ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint16_t  sel 
)

Definition at line 1755 of file usb_request.c.

References req, UR_SET_FEATURE, usbd_do_request, USETW, and UT_WRITE_CLASS_OTHER.

Referenced by uhub_attach(), usb_dev_suspend_peer(), usb_trigger_reprobe_on_off(), usbd_req_reset_port(), and usbd_req_warm_reset_port().

Here is the caller graph for this function:

◆ usbd_req_set_port_link_state()

usb_error_t usbd_req_set_port_link_state ( struct usb_device udev,
struct mtx *  mtx,
uint8_t  port,
uint8_t  link_state 
)

Definition at line 2271 of file usb_request.c.

References req, UHF_PORT_LINK_STATE, UR_SET_FEATURE, usbd_do_request, USETW, and UT_WRITE_CLASS_OTHER.

Referenced by usb_dev_resume_peer(), and usb_dev_suspend_peer().

Here is the caller graph for this function:

◆ usbd_req_warm_reset_port()

◆ usbd_setup_device_desc()