FreeBSD kernel usb device Code
|
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
#include <dev/usb/usb_core.h>
#include <dev/usb/usb_util.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/usb_device.h>
#include <dev/usb/usb_request.h>
#include <dev/usb/usb_busdma.h>
#include <dev/usb/usb_controller.h>
#include <dev/usb/usb_bus.h>
Go to the source code of this file.
Functions | |
void | device_set_usb_desc (device_t dev) |
void | usb_pause_mtx (struct mtx *mtx, int timo) |
void | usb_printbcd (char *p, uint16_t p_len, uint16_t bcd) |
void | usb_trim_spaces (char *p) |
uint8_t | usb_make_str_desc (void *ptr, uint16_t max_len, const char *s) |
void device_set_usb_desc | ( | device_t | dev | ) |
Definition at line 73 of file usb_util.c.
References usb_bus::bdev, usb_device::bus, usb_device_scratch::data, dev, usb_attach_arg::device, usb_interface::idesc, usb_attach_arg::iface, usb_interface_descriptor::iInterface, usb_device::scratch, usb_devinfo(), USB_ERR_INVAL, usbd_ctrl_lock(), usbd_ctrl_unlock(), and usbd_req_get_string_any().
Referenced by aue_attach(), axe_attach(), axge_attach(), cdce_attach(), cdceem_attach(), cfumass_attach(), cp2112_attach(), cue_attach(), g_audio_attach(), g_keyboard_attach(), g_modem_attach(), g_mouse_attach(), ipheth_attach(), kue_attach(), mos_attach(), muge_attach(), rsu_attach(), rue_attach(), rum_attach(), run_attach(), smsc_attach(), u3g_attach(), uark_attach(), uath_attach(), ubsa_attach(), ubser_attach(), uchcom_attach(), ucycom_attach(), udav_attach(), udbp_attach(), udl_attach(), uep_attach(), ufoma_attach(), uftdi_attach(), ugensa_attach(), ugold_attach(), uhid_attach(), uhid_snes_attach(), uhub_attach(), uipaq_attach(), ukbd_attach(), uled_attach(), ulpt_attach(), umass_attach(), umcs7840_attach(), umct_attach(), umodem_attach(), ums_attach(), upgt_attach(), uplcom_attach(), ural_attach(), ure_attach(), urio_attach(), urndis_attach(), urtw_attach(), usbhid_attach(), usie_attach(), uslcom_attach(), ustorage_fs_attach(), uvisor_attach(), uvscom_attach(), wmt_attach(), wsp_attach(), and zyd_attach().
uint8_t usb_make_str_desc | ( | void * | ptr, |
uint16_t | max_len, | ||
const char * | s | ||
) |
Definition at line 193 of file usb_util.c.
References usb_string_descriptor::bDescriptorType, usb_string_descriptor::bLength, usb_string_descriptor::bString, UDESC_STRING, and USETW2.
Referenced by audio_init(), cdceem_init(), ehci_roothub_exec(), eth_init(), kbd_init(), midi_init(), modem_init(), mouse_init(), msc_init(), mtp_init(), multi_init(), ohci_roothub_exec(), phone_init(), serialnet_init(), uhci_roothub_exec(), usb_temp_sysctl(), and xhci_roothub_exec().
void usb_pause_mtx | ( | struct mtx * | mtx, |
int | timo | ||
) |
Definition at line 135 of file usb_util.c.
Referenced by atmegadci_init(), atmegadci_wakeup_peer(), avr32dci_init(), avr32dci_wakeup_peer(), dwc_otg_init(), dwc_otg_roothub_exec(), dwc_otg_wakeup_peer(), ehci_detach(), ehci_hcreset(), ehci_init_sub(), ehci_pci_take_controller(), ehci_reset(), ehci_roothub_exec(), mos_reset(), musbotg_init(), musbotg_roothub_exec(), musbotg_wakeup_host(), musbotg_wakeup_peer(), ohci_controller_init(), ohci_detach(), ohci_roothub_exec(), rsu_cam_read(), rsu_delete_key(), rsu_init(), rsu_key_check(), rsu_newstate(), rum_pause(), run_delay(), ucom_cfg_open(), ucom_cfg_param(), ucom_drain(), ucom_drain_all(), uether_pause(), uhci_portreset(), uhci_reset(), uhci_restart(), uhci_roothub_exec(), uhub_attach(), uhub_reattach_port(), uipaq_attach(), upgt_device_reset(), upgt_eeprom_read(), ural_pause(), urtw_8185_tx_antenna(), urtw_8187_write_phy(), urtw_8187b_cmd_reset(), urtw_8225_isv2(), urtw_8225_rf_init(), urtw_8225_rf_set_chan(), urtw_8225_set_txpwrlvl(), urtw_8225_usb_init(), urtw_8225_write_c(), urtw_8225v2_rf_init(), urtw_8225v2_rf_set_chan(), urtw_8225v2_set_txpwrlvl(), urtw_8225v2_setgain(), urtw_8225v2b_rf_init(), urtw_8225v2b_rf_set_chan(), urtw_8225v2b_set_txpwrlvl(), urtw_do_request(), urtw_led_mode0(), urtw_reset(), urtw_set_channel(), usb_dev_resume_peer(), usb_dev_suspend_peer(), usb_iface_is_cdrom(), usb_msc_auto_quirk(), usb_trigger_reprobe_all(), usbd_do_request_flags(), usbd_req_get_desc(), usbd_req_re_enumerate(), usbd_req_reset_port(), usbd_req_set_address(), usbd_req_warm_reset_port(), usbd_transfer_unsetup_sub(), usie_do_request(), usie_if_status_cb(), uss820dci_init(), xhci_halt_controller(), xhci_pci_take_controller(), xhci_reset_command_queue_locked(), xhci_reset_controller(), xhci_roothub_exec(), and xhci_start_controller().
void usb_printbcd | ( | char * | p, |
uint16_t | p_len, | ||
uint16_t | bcd | ||
) |
Definition at line 159 of file usb_util.c.
void usb_trim_spaces | ( | char * | p | ) |
Definition at line 173 of file usb_util.c.
Referenced by usb_set_device_strings().