FreeBSD kernel usb device Code
usb_process.h File Reference
#include <sys/interrupt.h>
#include <sys/priority.h>
#include <sys/runq.h>
Include dependency graph for usb_process.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 *)
 

Macro Definition Documentation

◆ USB_PRI_HIGH

#define USB_PRI_HIGH   PI_SWI(SWI_NET)

Definition at line 40 of file usb_process.h.

◆ USB_PRI_HIGHEST

#define USB_PRI_HIGHEST   PI_SWI(SWI_TTY)

Definition at line 39 of file usb_process.h.

◆ USB_PRI_MED

#define USB_PRI_MED   PI_SWI(SWI_CAMBIO)

Definition at line 41 of file usb_process.h.

◆ USB_PROC_WAIT_DRAIN

#define USB_PROC_WAIT_DRAIN   1

Definition at line 44 of file usb_process.h.

◆ USB_PROC_WAIT_NORMAL

#define USB_PROC_WAIT_NORMAL   0

Definition at line 45 of file usb_process.h.

◆ USB_PROC_WAIT_TIMEOUT

#define USB_PROC_WAIT_TIMEOUT   2

Definition at line 43 of file usb_process.h.

Function Documentation

◆ usb_proc_create()

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().

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

◆ usb_proc_drain()

◆ usb_proc_explore_lock()

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().

Here is the caller graph for this function:

◆ usb_proc_explore_msignal()

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().

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

◆ usb_proc_explore_mwait()

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().

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

◆ usb_proc_explore_unlock()

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().

Here is the caller graph for this function:

◆ usb_proc_free()

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().

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

◆ usb_proc_is_called_from()

int usb_proc_is_called_from ( struct usb_process up)

Definition at line 514 of file usb_process.c.

References usb_process::up_curtd.

◆ usb_proc_is_gone()

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().

Here is the caller graph for this function:

◆ usb_proc_msignal()

◆ usb_proc_mwait()

◆ usb_proc_rewakeup()

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().

Here is the caller graph for this function: