FreeBSD kernel usb device Code
|
#include <sys/interrupt.h>
#include <sys/priority.h>
#include <sys/runq.h>
Go to the source code of this file.
Data Structures | |
struct | usb_process |
Macros | |
#define | USB_PRI_HIGHEST PI_SWI(SWI_TTY) |
#define | USB_PRI_HIGH PI_SWI(SWI_NET) |
#define | USB_PRI_MED PI_SWI(SWI_CAMBIO) |
#define | USB_PROC_WAIT_TIMEOUT 2 |
#define | USB_PROC_WAIT_DRAIN 1 |
#define | USB_PROC_WAIT_NORMAL 0 |
Functions | |
uint8_t | usb_proc_is_gone (struct usb_process *up) |
int | usb_proc_create (struct usb_process *up, struct mtx *p_mtx, const char *pmesg, uint8_t prio) |
void | usb_proc_drain (struct usb_process *up) |
void | usb_proc_mwait (struct usb_process *up, void *pm0, void *pm1) |
void | usb_proc_free (struct usb_process *up) |
void * | usb_proc_msignal (struct usb_process *up, void *pm0, void *pm1) |
void | usb_proc_rewakeup (struct usb_process *up) |
int | usb_proc_is_called_from (struct usb_process *up) |
void | usb_proc_explore_mwait (struct usb_device *, void *, void *) |
void * | usb_proc_explore_msignal (struct usb_device *, void *, void *) |
void | usb_proc_explore_lock (struct usb_device *) |
void | usb_proc_explore_unlock (struct usb_device *) |
#define USB_PRI_HIGH PI_SWI(SWI_NET) |
Definition at line 40 of file usb_process.h.
#define USB_PRI_HIGHEST PI_SWI(SWI_TTY) |
Definition at line 39 of file usb_process.h.
#define USB_PRI_MED PI_SWI(SWI_CAMBIO) |
Definition at line 41 of file usb_process.h.
#define USB_PROC_WAIT_DRAIN 1 |
Definition at line 44 of file usb_process.h.
#define USB_PROC_WAIT_NORMAL 0 |
Definition at line 45 of file usb_process.h.
#define USB_PROC_WAIT_TIMEOUT 2 |
Definition at line 43 of file usb_process.h.
int usb_proc_create | ( | struct usb_process * | up, |
struct mtx * | p_mtx, | ||
const char * | pmesg, | ||
uint8_t | prio | ||
) |
Definition at line 224 of file usb_process.c.
References error, usb_process::up_cv, usb_process::up_drain, usb_process::up_mtx, usb_process::up_prio, usb_process::up_ptr, usb_proc_free(), and USB_THREAD_CREATE.
Referenced by ucom_attach(), uether_ifattach(), and usb_attach_sub().
void usb_proc_drain | ( | struct usb_process * | up | ) |
Definition at line 436 of file usb_process.c.
References DPRINTF, usb_process::up_csleep, usb_process::up_cv, usb_process::up_drain, usb_process::up_dsleep, usb_process::up_gone, usb_process::up_msleep, usb_process::up_mtx, usb_process::up_ptr, USB_MTX_ASSERT, USB_MTX_LOCK, USB_MTX_UNLOCK, and USB_THREAD_SUSPEND.
Referenced by axge_detach(), ucom_detach(), uether_ifdetach(), and usb_proc_free().
void usb_proc_explore_lock | ( | struct usb_device * | udev | ) |
Definition at line 1027 of file usb_controller.c.
References usb_device::bus, and USB_BUS_LOCK.
Referenced by ugold_detach(), ugold_readout_msg(), and ugold_timeout().
void * usb_proc_explore_msignal | ( | struct usb_device * | udev, |
void * | pm1, | ||
void * | pm2 | ||
) |
Definition at line 1021 of file usb_controller.c.
References usb_device::bus, and usb_proc_msignal().
Referenced by ugold_timeout().
void usb_proc_explore_mwait | ( | struct usb_device * | udev, |
void * | pm1, | ||
void * | pm2 | ||
) |
Definition at line 1015 of file usb_controller.c.
References usb_device::bus, and usb_proc_mwait().
Referenced by ugold_detach().
void usb_proc_explore_unlock | ( | struct usb_device * | udev | ) |
Definition at line 1033 of file usb_controller.c.
References usb_device::bus, and USB_BUS_UNLOCK.
Referenced by ugold_detach(), ugold_readout_msg(), and ugold_timeout().
void usb_proc_free | ( | struct usb_process * | up | ) |
Definition at line 261 of file usb_process.c.
References usb_process::up_cv, usb_process::up_drain, usb_process::up_mtx, and usb_proc_drain().
Referenced by ucom_detach(), uether_ifdetach(), usb_detach(), and usb_proc_create().
int usb_proc_is_called_from | ( | struct usb_process * | up | ) |
Definition at line 514 of file usb_process.c.
References usb_process::up_curtd.
uint8_t usb_proc_is_gone | ( | struct usb_process * | up | ) |
Definition at line 372 of file usb_process.c.
References usb_process::up_gone, usb_process::up_mtx, and USB_MTX_ASSERT.
Referenced by ucom_cfg_is_gone(), ucom_queue_command(), ue_queue_command(), uether_is_gone(), uether_pause(), and usbd_do_request_proc().
void * usb_proc_msignal | ( | struct usb_process * | up, |
void * | pm0, | ||
void * | pm1 | ||
) |
Definition at line 288 of file usb_process.c.
References DPRINTF, usb_proc_msg::pm_num, usb_process::up_cv, usb_process::up_gone, usb_process::up_msg_num, usb_process::up_msleep, usb_process::up_mtx, USB_IN_POLLING_MODE_FUNC, and USB_MTX_ASSERT.
Referenced by ucom_queue_command(), ue_queue_command(), usb_attach_sub(), usb_bus_reset_async_locked(), usb_detach(), usb_needs_explore(), usb_proc_explore_msignal(), usb_resume(), usb_shutdown(), usb_suspend(), usbd_callback_ss_done_defer(), usbd_callback_wrapper(), usbd_pipe_start(), xhci_start_dma_delay(), and xhci_transfer_insert().
void usb_proc_mwait | ( | struct usb_process * | up, |
void * | pm0, | ||
void * | pm1 | ||
) |
Definition at line 394 of file usb_process.c.
References usb_process::up_curtd, usb_process::up_drain, usb_process::up_dsleep, usb_process::up_gone, usb_process::up_mtx, and USB_MTX_ASSERT.
Referenced by ucom_queue_command(), ue_queue_command(), uether_ifattach_wait(), uhub_detach(), usb_detach(), usb_free_device(), usb_proc_explore_mwait(), usb_shutdown(), usb_suspend(), and usbd_transfer_unsetup_sub().
void usb_proc_rewakeup | ( | struct usb_process * | up | ) |
Definition at line 490 of file usb_process.c.
References usb_process::up_cv, usb_process::up_gone, usb_process::up_msleep, usb_process::up_mtx, and USB_MTX_ASSERT.
Referenced by usb_bus_explore(), and usb_power_wdog().