FreeBSD kernel usb device Code
usb_serial.c File Reference
#include <sys/cdefs.h>
#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 <sys/cons.h>
#include <dev/uart/uart_ppstypes.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
#include <dev/usb/usb_debug.h>
#include <dev/usb/usb_busdma.h>
#include <dev/usb/usb_process.h>
#include <dev/usb/serial/usb_serial.h>
#include "opt_gdb.h"
Include dependency graph for usb_serial.c:

Go to the source code of this file.

Macros

#define USB_DEBUG_VAR   ucom_debug
 
#define UCOM_CONS_BUFSIZE   1024
 
#define UCOM_UNIT_MAX   128 /* maximum number of units */
 
#define UCOM_TTY_PREFIX   "U"
 

Functions

 __FBSDID ("$FreeBSD$")
 
static SYSCTL_NODE (_hw_usb, OID_AUTO, ucom, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "USB ucom")
 
 SYSCTL_INT (_hw_usb_ucom, OID_AUTO, pps_mode, CTLFLAG_RWTUN, &ucom_pps_mode, 0, "pulse capture mode: 0/1/2=disabled/CTS/DCD; add 0x10 to invert")
 
 SYSCTL_INT (_hw_usb_ucom, OID_AUTO, device_mode_console, CTLFLAG_RW, &ucom_device_mode_console, 0, "set to 1 to mark terminals as consoles when in device mode")
 
 SYSCTL_INT (_hw_usb_ucom, OID_AUTO, cons_unit, CTLFLAG_RWTUN, &ucom_cons_unit, 0, "console unit number")
 
 SYSCTL_INT (_hw_usb_ucom, OID_AUTO, cons_subunit, CTLFLAG_RWTUN, &ucom_cons_subunit, 0, "console subunit number")
 
 SYSCTL_INT (_hw_usb_ucom, OID_AUTO, cons_baud, CTLFLAG_RWTUN, &ucom_cons_baud, 0, "console baud rate")
 
static int ucom_unit_alloc (void)
 
static void ucom_unit_free (int)
 
static int ucom_attach_tty (struct ucom_super_softc *, struct ucom_softc *)
 
static void ucom_detach_tty (struct ucom_super_softc *, struct ucom_softc *)
 
static void ucom_queue_command (struct ucom_softc *, usb_proc_callback_t *, struct termios *pt, struct usb_proc_msg *t0, struct usb_proc_msg *t1)
 
static void ucom_shutdown (struct ucom_softc *)
 
static void ucom_ring (struct ucom_softc *, uint8_t)
 
static void ucom_break (struct ucom_softc *, uint8_t)
 
static void ucom_dtr (struct ucom_softc *, uint8_t)
 
static void ucom_rts (struct ucom_softc *, uint8_t)
 
 MODULE_DEPEND (ucom, usb, 1, 1, 1)
 
 MODULE_VERSION (ucom, 1)
 
static void ucom_init (void *arg)
 
 SYSINIT (ucom_init, SI_SUB_KLD - 1, SI_ORDER_ANY, ucom_init, NULL)
 
static void ucom_uninit (void *arg)
 
 SYSUNINIT (ucom_uninit, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_uninit, NULL)
 
int ucom_attach (struct ucom_super_softc *ssc, struct ucom_softc *sc, int subunits, void *parent, const struct ucom_callback *callback, struct mtx *mtx)
 
void ucom_detach (struct ucom_super_softc *ssc, struct ucom_softc *sc)
 
void ucom_drain (struct ucom_super_softc *ssc)
 
void ucom_drain_all (void *arg)
 
void ucom_set_pnpinfo_usb (struct ucom_super_softc *ssc, device_t dev)
 
void ucom_set_usb_mode (struct ucom_super_softc *ssc, enum usb_hc_mode usb_mode)
 
uint8_t ucom_cfg_is_gone (struct ucom_softc *sc)
 
static void ucom_cfg_start_transfers (struct usb_proc_msg *_task)
 
static void ucom_start_transfers (struct ucom_softc *sc)
 
static void ucom_cfg_open (struct usb_proc_msg *_task)
 
static int ucom_open (struct tty *tp)
 
static void ucom_cfg_close (struct usb_proc_msg *_task)
 
static void ucom_close (struct tty *tp)
 
static void ucom_inwakeup (struct tty *tp)
 
static int ucom_ioctl (struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
 
static int ucom_modem (struct tty *tp, int sigon, int sigoff)
 
static void ucom_cfg_line_state (struct usb_proc_msg *_task)
 
static void ucom_line_state (struct ucom_softc *sc, uint8_t set_bits, uint8_t clear_bits)
 
static void ucom_cfg_status_change (struct usb_proc_msg *_task)
 
void ucom_status_change (struct ucom_softc *sc)
 
static void ucom_cfg_param (struct usb_proc_msg *_task)
 
static int ucom_param (struct tty *tp, struct termios *t)
 
static void ucom_outwakeup (struct tty *tp)
 
static bool ucom_busy (struct tty *tp)
 
uint8_t ucom_get_data (struct ucom_softc *sc, struct usb_page_cache *pc, uint32_t offset, uint32_t len, uint32_t *actlen)
 
void ucom_put_data (struct ucom_softc *sc, struct usb_page_cache *pc, uint32_t offset, uint32_t len)
 
static void ucom_free (void *xsc)
 
 CONSOLE_DRIVER (ucom)
 
static void ucom_cnprobe (struct consdev *cp)
 
static void ucom_cninit (struct consdev *cp)
 
static void ucom_cnterm (struct consdev *cp)
 
static void ucom_cngrab (struct consdev *cp)
 
static void ucom_cnungrab (struct consdev *cp)
 
static int ucom_cngetc (struct consdev *cd)
 
static void ucom_cnputc (struct consdev *cd, int c)
 
void ucom_ref (struct ucom_super_softc *ssc)
 
static void ucom_free_unit (struct ucom_super_softc *ssc)
 
int ucom_unref (struct ucom_super_softc *ssc)
 

Variables

static int ucom_pps_mode
 
static int ucom_device_mode_console = 1
 
static uint8_t ucom_cons_rx_buf [UCOM_CONS_BUFSIZE]
 
static uint8_t ucom_cons_tx_buf [UCOM_CONS_BUFSIZE]
 
static unsigned int ucom_cons_rx_low = 0
 
static unsigned int ucom_cons_rx_high = 0
 
static unsigned int ucom_cons_tx_low = 0
 
static unsigned int ucom_cons_tx_high = 0
 
static int ucom_cons_unit = -1
 
static int ucom_cons_subunit = 0
 
static int ucom_cons_baud = 9600
 
static struct ucom_softcucom_cons_softc = NULL
 
static usb_proc_callback_t ucom_cfg_start_transfers
 
static usb_proc_callback_t ucom_cfg_open
 
static usb_proc_callback_t ucom_cfg_close
 
static usb_proc_callback_t ucom_cfg_line_state
 
static usb_proc_callback_t ucom_cfg_status_change
 
static usb_proc_callback_t ucom_cfg_param
 
static tsw_open_t ucom_open
 
static tsw_close_t ucom_close
 
static tsw_ioctl_t ucom_ioctl
 
static tsw_modem_t ucom_modem
 
static tsw_param_t ucom_param
 
static tsw_outwakeup_t ucom_outwakeup
 
static tsw_inwakeup_t ucom_inwakeup
 
static tsw_free_t ucom_free
 
static tsw_busy_t ucom_busy
 
static struct ttydevsw ucom_class
 
static struct unrhdr * ucom_unrhdr
 
static struct mtx ucom_mtx
 
static int ucom_close_refs
 
static cn_probe_t ucom_cnprobe
 
static cn_init_t ucom_cninit
 
static cn_term_t ucom_cnterm
 
static cn_getc_t ucom_cngetc
 
static cn_putc_t ucom_cnputc
 
static cn_grab_t ucom_cngrab
 
static cn_ungrab_t ucom_cnungrab
 
const struct consdev_ops ucom_cnops
 

Macro Definition Documentation

◆ UCOM_CONS_BUFSIZE

#define UCOM_CONS_BUFSIZE   1024

Definition at line 122 of file usb_serial.c.

◆ UCOM_TTY_PREFIX

#define UCOM_TTY_PREFIX   "U"

Definition at line 192 of file usb_serial.c.

◆ UCOM_UNIT_MAX

#define UCOM_UNIT_MAX   128 /* maximum number of units */

Definition at line 191 of file usb_serial.c.

◆ USB_DEBUG_VAR

#define USB_DEBUG_VAR   ucom_debug

Definition at line 91 of file usb_serial.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ CONSOLE_DRIVER()

CONSOLE_DRIVER ( ucom  )

◆ MODULE_DEPEND()

MODULE_DEPEND ( ucom  ,
usb  ,
,
,
 
)

◆ MODULE_VERSION()

MODULE_VERSION ( ucom  ,
 
)

◆ SYSCTL_INT() [1/5]

SYSCTL_INT ( _hw_usb_ucom  ,
OID_AUTO  ,
cons_baud  ,
CTLFLAG_RWTUN  ,
ucom_cons_baud,
,
"console baud rate"   
)

◆ SYSCTL_INT() [2/5]

SYSCTL_INT ( _hw_usb_ucom  ,
OID_AUTO  ,
cons_subunit  ,
CTLFLAG_RWTUN  ,
ucom_cons_subunit,
,
"console subunit number"   
)

◆ SYSCTL_INT() [3/5]

SYSCTL_INT ( _hw_usb_ucom  ,
OID_AUTO  ,
cons_unit  ,
CTLFLAG_RWTUN  ,
ucom_cons_unit,
,
"console unit number"   
)

◆ SYSCTL_INT() [4/5]

SYSCTL_INT ( _hw_usb_ucom  ,
OID_AUTO  ,
device_mode_console  ,
CTLFLAG_RW  ,
ucom_device_mode_console,
,
"set to 1 to mark terminals as consoles when in device mode"   
)

◆ SYSCTL_INT() [5/5]

SYSCTL_INT ( _hw_usb_ucom  ,
OID_AUTO  ,
pps_mode  ,
CTLFLAG_RWTUN  ,
ucom_pps_mode,
 
)

◆ SYSCTL_NODE()

static SYSCTL_NODE ( _hw_usb  ,
OID_AUTO  ,
ucom  ,
CTLFLAG_RW|  CTLFLAG_MPSAFE,
,
"USB ucom"   
)
static

◆ SYSINIT()

SYSINIT ( ucom_init  ,
SI_SUB_KLD -  1,
SI_ORDER_ANY  ,
ucom_init  ,
NULL   
)

◆ SYSUNINIT()

SYSUNINIT ( ucom_uninit  ,
SI_SUB_KLD -  3,
SI_ORDER_ANY  ,
ucom_uninit  ,
NULL   
)

◆ ucom_attach()

◆ ucom_attach_tty()

◆ ucom_break()

static void ucom_break ( struct ucom_softc sc,
uint8_t  onoff 
)
static

Definition at line 1100 of file usb_serial.c.

References DPRINTF, ucom_line_state(), and UCOM_LS_BREAK.

Referenced by ucom_ioctl(), and ucom_open().

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

◆ ucom_busy()

static bool ucom_busy ( struct tty *  tp)
static

◆ ucom_cfg_close()

static void ucom_cfg_close ( struct usb_proc_msg _task)
static

◆ ucom_cfg_is_gone()

uint8_t ucom_cfg_is_gone ( struct ucom_softc sc)

Definition at line 667 of file usb_serial.c.

References ucom_softc::sc_super, ucom_super_softc::sc_tq, and usb_proc_is_gone().

Here is the call graph for this function:

◆ ucom_cfg_line_state()

◆ ucom_cfg_open()

static void ucom_cfg_open ( struct usb_proc_msg _task)
static

◆ ucom_cfg_param()

static void ucom_cfg_param ( struct usb_proc_msg _task)
static

◆ ucom_cfg_start_transfers()

◆ ucom_cfg_status_change()

◆ ucom_close()

static void ucom_close ( struct tty *  tp)
static

◆ ucom_cngetc()

◆ ucom_cngrab()

static void ucom_cngrab ( struct consdev *  cp)
static

Definition at line 1611 of file usb_serial.c.

◆ ucom_cninit()

static void ucom_cninit ( struct consdev *  cp)
static

Definition at line 1601 of file usb_serial.c.

◆ ucom_cnprobe()

static void ucom_cnprobe ( struct consdev *  cp)
static

Definition at line 1590 of file usb_serial.c.

References ucom_cons_unit.

◆ ucom_cnputc()

◆ ucom_cnterm()

static void ucom_cnterm ( struct consdev *  cp)
static

Definition at line 1606 of file usb_serial.c.

◆ ucom_cnungrab()

static void ucom_cnungrab ( struct consdev *  cp)
static

Definition at line 1616 of file usb_serial.c.

◆ ucom_detach()

◆ ucom_detach_tty()

◆ ucom_drain()

void ucom_drain ( struct ucom_super_softc ssc)

Definition at line 375 of file usb_serial.c.

References ucom_super_softc::sc_refs, ucom_mtx, and usb_pause_mtx().

Referenced by ucom_detach().

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

◆ ucom_drain_all()

void ucom_drain_all ( void *  arg)

Definition at line 386 of file usb_serial.c.

References ucom_close_refs, ucom_mtx, and usb_pause_mtx().

Here is the call graph for this function:

◆ ucom_dtr()

static void ucom_dtr ( struct ucom_softc sc,
uint8_t  onoff 
)
static

Definition at line 1111 of file usb_serial.c.

References DPRINTF, ucom_line_state(), and UCOM_LS_DTR.

Referenced by ucom_modem().

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

◆ ucom_free()

static void ucom_free ( void *  xsc)
static

Definition at line 1573 of file usb_serial.c.

References ucom_softc::sc_callback, ucom_softc::sc_super, ucom_close_refs, ucom_callback::ucom_free, ucom_mtx, and ucom_unref().

Here is the call graph for this function:

◆ ucom_free_unit()

static void ucom_free_unit ( struct ucom_super_softc ssc)
static

Definition at line 1710 of file usb_serial.c.

References ucom_super_softc::sc_flag, ucom_super_softc::sc_unit, UCOM_FLAG_FREE_UNIT, and ucom_unit_free().

Referenced by ucom_unref().

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

◆ ucom_get_data()

◆ ucom_init()

static void ucom_init ( void *  arg)
static

Definition at line 199 of file usb_serial.c.

References DPRINTF, ucom_mtx, UCOM_UNIT_MAX, and ucom_unrhdr.

◆ ucom_inwakeup()

static void ucom_inwakeup ( struct tty *  tp)
static

◆ ucom_ioctl()

static int ucom_ioctl ( struct tty *  tp,
u_long  cmd,
caddr_t  data,
struct thread *  td 
)
static

◆ ucom_line_state()

static void ucom_line_state ( struct ucom_softc sc,
uint8_t  set_bits,
uint8_t  clear_bits 
)
static

◆ ucom_modem()

static int ucom_modem ( struct tty *  tp,
int  sigon,
int  sigoff 
)
static

Definition at line 945 of file usb_serial.c.

References ucom_softc::sc_flag, ucom_softc::sc_mcr, ucom_softc::sc_msr, ucom_dtr(), UCOM_FLAG_HL_READY, UCOM_MTX_ASSERT, and ucom_rts().

Here is the call graph for this function:

◆ ucom_open()

◆ ucom_outwakeup()

static void ucom_outwakeup ( struct tty *  tp)
static

Definition at line 1340 of file usb_serial.c.

References DPRINTF, ucom_softc::sc_flag, UCOM_FLAG_HL_READY, UCOM_MTX_ASSERT, and ucom_start_transfers().

Here is the call graph for this function:

◆ ucom_param()

◆ ucom_put_data()

◆ ucom_queue_command()

static void ucom_queue_command ( struct ucom_softc sc,
usb_proc_callback_t fn,
struct termios *  pt,
struct usb_proc_msg t0,
struct usb_proc_msg t1 
)
static

◆ ucom_ref()

◆ ucom_ring()

static void ucom_ring ( struct ucom_softc sc,
uint8_t  onoff 
)
static

Definition at line 1089 of file usb_serial.c.

References DPRINTF, ucom_line_state(), and UCOM_LS_RING.

Referenced by ucom_ioctl(), and ucom_open().

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

◆ ucom_rts()

static void ucom_rts ( struct ucom_softc sc,
uint8_t  onoff 
)
static

Definition at line 1122 of file usb_serial.c.

References DPRINTF, ucom_line_state(), and UCOM_LS_RTS.

Referenced by ucom_inwakeup(), ucom_modem(), and ucom_put_data().

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

◆ ucom_set_pnpinfo_usb()

◆ ucom_set_usb_mode()

void ucom_set_usb_mode ( struct ucom_super_softc ssc,
enum usb_hc_mode  usb_mode 
)

Definition at line 584 of file usb_serial.c.

References ucom_super_softc::sc_flag, UCOM_FLAG_DEVICE_MODE, usb_attach_arg::usb_mode, and USB_MODE_DEVICE.

Referenced by umodem_attach().

Here is the caller graph for this function:

◆ ucom_shutdown()

static void ucom_shutdown ( struct ucom_softc sc)
static

Definition at line 645 of file usb_serial.c.

References DPRINTF, ucom_softc::sc_tty, ucom_modem, and UCOM_MTX_ASSERT.

Referenced by ucom_close().

Here is the caller graph for this function:

◆ ucom_start_transfers()

static void ucom_start_transfers ( struct ucom_softc sc)
static

Definition at line 701 of file usb_serial.c.

References ucom_softc::sc_callback, ucom_softc::sc_flag, UCOM_FLAG_HL_READY, ucom_callback::ucom_start_read, and ucom_callback::ucom_start_write.

Referenced by ucom_outwakeup().

Here is the caller graph for this function:

◆ ucom_status_change()

◆ ucom_uninit()

static void ucom_uninit ( void *  arg)
static

Definition at line 208 of file usb_serial.c.

References DPRINTF, ucom_mtx, and ucom_unrhdr.

◆ ucom_unit_alloc()

static int ucom_unit_alloc ( void  )
static

Definition at line 230 of file usb_serial.c.

References DPRINTF, and ucom_unrhdr.

Referenced by ucom_attach().

Here is the caller graph for this function:

◆ ucom_unit_free()

static void ucom_unit_free ( int  unit)
static

Definition at line 248 of file usb_serial.c.

References DPRINTF, UCOM_UNIT_MAX, and ucom_unrhdr.

Referenced by ucom_attach(), and ucom_free_unit().

Here is the caller graph for this function:

◆ ucom_unref()

Variable Documentation

◆ ucom_busy

tsw_busy_t ucom_busy
static

Definition at line 173 of file usb_serial.c.

◆ ucom_cfg_close

usb_proc_callback_t ucom_cfg_close
static

Definition at line 147 of file usb_serial.c.

Referenced by ucom_close(), and ucom_queue_command().

◆ ucom_cfg_line_state

usb_proc_callback_t ucom_cfg_line_state
static

Definition at line 148 of file usb_serial.c.

Referenced by ucom_line_state().

◆ ucom_cfg_open

usb_proc_callback_t ucom_cfg_open
static

Definition at line 146 of file usb_serial.c.

Referenced by ucom_open().

◆ ucom_cfg_param

usb_proc_callback_t ucom_cfg_param
static

Definition at line 150 of file usb_serial.c.

Referenced by ucom_param().

◆ ucom_cfg_start_transfers

usb_proc_callback_t ucom_cfg_start_transfers
static

Definition at line 145 of file usb_serial.c.

Referenced by ucom_open(), ucom_param(), and ucom_queue_command().

◆ ucom_cfg_status_change

usb_proc_callback_t ucom_cfg_status_change
static

Definition at line 149 of file usb_serial.c.

Referenced by ucom_status_change().

◆ ucom_class

struct ttydevsw ucom_class
static
Initial value:
= {
.tsw_flags = TF_INITLOCK | TF_CALLOUT,
.tsw_open = ucom_open,
.tsw_close = ucom_close,
.tsw_outwakeup = ucom_outwakeup,
.tsw_inwakeup = ucom_inwakeup,
.tsw_ioctl = ucom_ioctl,
.tsw_param = ucom_param,
.tsw_modem = ucom_modem,
.tsw_free = ucom_free,
.tsw_busy = ucom_busy,
}
static tsw_busy_t ucom_busy
Definition: usb_serial.c:173
static tsw_param_t ucom_param
Definition: usb_serial.c:169
static tsw_close_t ucom_close
Definition: usb_serial.c:166
static tsw_outwakeup_t ucom_outwakeup
Definition: usb_serial.c:170
static tsw_free_t ucom_free
Definition: usb_serial.c:172
static tsw_open_t ucom_open
Definition: usb_serial.c:165
static tsw_inwakeup_t ucom_inwakeup
Definition: usb_serial.c:171
static tsw_ioctl_t ucom_ioctl
Definition: usb_serial.c:167
static tsw_modem_t ucom_modem
Definition: usb_serial.c:168

Definition at line 175 of file usb_serial.c.

Referenced by ucom_attach_tty().

◆ ucom_close

tsw_close_t ucom_close
static

Definition at line 166 of file usb_serial.c.

Referenced by ucom_detach_tty(), and ucom_param().

◆ ucom_close_refs

int ucom_close_refs
static

Definition at line 196 of file usb_serial.c.

Referenced by ucom_detach_tty(), ucom_drain_all(), and ucom_free().

◆ ucom_cngetc

cn_getc_t ucom_cngetc
static

Definition at line 400 of file usb_serial.c.

◆ ucom_cngrab

cn_grab_t ucom_cngrab
static

Definition at line 402 of file usb_serial.c.

◆ ucom_cninit

cn_init_t ucom_cninit
static

Definition at line 398 of file usb_serial.c.

◆ ucom_cnops

const struct consdev_ops ucom_cnops
Initial value:
= {
.cn_probe = ucom_cnprobe,
.cn_init = ucom_cninit,
.cn_term = ucom_cnterm,
.cn_getc = ucom_cngetc,
.cn_putc = ucom_cnputc,
.cn_grab = ucom_cngrab,
.cn_ungrab = ucom_cnungrab,
}
static cn_ungrab_t ucom_cnungrab
Definition: usb_serial.c:403
static cn_init_t ucom_cninit
Definition: usb_serial.c:398
static cn_term_t ucom_cnterm
Definition: usb_serial.c:399
static cn_probe_t ucom_cnprobe
Definition: usb_serial.c:397
static cn_putc_t ucom_cnputc
Definition: usb_serial.c:401
static cn_grab_t ucom_cngrab
Definition: usb_serial.c:402
static cn_getc_t ucom_cngetc
Definition: usb_serial.c:400

Definition at line 405 of file usb_serial.c.

Referenced by ucom_attach_tty().

◆ ucom_cnprobe

cn_probe_t ucom_cnprobe
static

Definition at line 397 of file usb_serial.c.

◆ ucom_cnputc

cn_putc_t ucom_cnputc
static

Definition at line 401 of file usb_serial.c.

◆ ucom_cnterm

cn_term_t ucom_cnterm
static

Definition at line 399 of file usb_serial.c.

◆ ucom_cnungrab

cn_ungrab_t ucom_cnungrab
static

Definition at line 403 of file usb_serial.c.

◆ ucom_cons_baud

int ucom_cons_baud = 9600
static

Definition at line 135 of file usb_serial.c.

Referenced by ucom_attach_tty().

◆ ucom_cons_rx_buf

uint8_t ucom_cons_rx_buf[UCOM_CONS_BUFSIZE]
static

Definition at line 124 of file usb_serial.c.

Referenced by ucom_cngetc(), and ucom_put_data().

◆ ucom_cons_rx_high

unsigned int ucom_cons_rx_high = 0
static

Definition at line 128 of file usb_serial.c.

Referenced by ucom_attach_tty(), ucom_cngetc(), and ucom_put_data().

◆ ucom_cons_rx_low

unsigned int ucom_cons_rx_low = 0
static

Definition at line 127 of file usb_serial.c.

Referenced by ucom_attach_tty(), ucom_cngetc(), and ucom_put_data().

◆ ucom_cons_softc

struct ucom_softc* ucom_cons_softc = NULL
static

Definition at line 136 of file usb_serial.c.

Referenced by ucom_attach_tty(), ucom_cngetc(), ucom_cnputc(), and ucom_detach_tty().

◆ ucom_cons_subunit

int ucom_cons_subunit = 0
static

Definition at line 134 of file usb_serial.c.

Referenced by ucom_attach_tty().

◆ ucom_cons_tx_buf

uint8_t ucom_cons_tx_buf[UCOM_CONS_BUFSIZE]
static

Definition at line 125 of file usb_serial.c.

Referenced by ucom_cnputc(), and ucom_get_data().

◆ ucom_cons_tx_high

unsigned int ucom_cons_tx_high = 0
static

Definition at line 131 of file usb_serial.c.

Referenced by ucom_attach_tty(), ucom_cnputc(), and ucom_get_data().

◆ ucom_cons_tx_low

unsigned int ucom_cons_tx_low = 0
static

Definition at line 130 of file usb_serial.c.

Referenced by ucom_attach_tty(), ucom_cnputc(), and ucom_get_data().

◆ ucom_cons_unit

int ucom_cons_unit = -1
static

Definition at line 133 of file usb_serial.c.

Referenced by ucom_attach_tty(), and ucom_cnprobe().

◆ ucom_device_mode_console

int ucom_device_mode_console = 1
static

Definition at line 109 of file usb_serial.c.

Referenced by ucom_attach_tty().

◆ ucom_free

tsw_free_t ucom_free
static

Definition at line 172 of file usb_serial.c.

◆ ucom_inwakeup

tsw_inwakeup_t ucom_inwakeup
static

Definition at line 171 of file usb_serial.c.

◆ ucom_ioctl

tsw_ioctl_t ucom_ioctl
static

Definition at line 167 of file usb_serial.c.

◆ ucom_modem

tsw_modem_t ucom_modem
static

Definition at line 168 of file usb_serial.c.

Referenced by ucom_open(), ucom_param(), and ucom_shutdown().

◆ ucom_mtx

struct mtx ucom_mtx
static

◆ ucom_open

tsw_open_t ucom_open
static

Definition at line 165 of file usb_serial.c.

Referenced by ucom_attach_tty(), and ucom_param().

◆ ucom_outwakeup

tsw_outwakeup_t ucom_outwakeup
static

Definition at line 170 of file usb_serial.c.

Referenced by ucom_cngetc(), and ucom_cnputc().

◆ ucom_param

tsw_param_t ucom_param
static

Definition at line 169 of file usb_serial.c.

Referenced by ucom_attach_tty().

◆ ucom_pps_mode

int ucom_pps_mode
static

Definition at line 103 of file usb_serial.c.

Referenced by ucom_cfg_status_change().

◆ ucom_unrhdr

struct unrhdr* ucom_unrhdr
static

Definition at line 194 of file usb_serial.c.

Referenced by ucom_init(), ucom_uninit(), ucom_unit_alloc(), and ucom_unit_free().