FreeBSD kernel usb device Code
|
#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"
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_softc * | ucom_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 |
#define UCOM_CONS_BUFSIZE 1024 |
Definition at line 122 of file usb_serial.c.
#define UCOM_TTY_PREFIX "U" |
Definition at line 192 of file usb_serial.c.
#define UCOM_UNIT_MAX 128 /* maximum number of units */ |
Definition at line 191 of file usb_serial.c.
#define USB_DEBUG_VAR ucom_debug |
Definition at line 91 of file usb_serial.c.
__FBSDID | ( | "$FreeBSD$" | ) |
CONSOLE_DRIVER | ( | ucom | ) |
MODULE_DEPEND | ( | ucom | , |
usb | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_VERSION | ( | ucom | , |
1 | |||
) |
SYSCTL_INT | ( | _hw_usb_ucom | , |
OID_AUTO | , | ||
cons_baud | , | ||
CTLFLAG_RWTUN | , | ||
& | ucom_cons_baud, | ||
0 | , | ||
"console baud rate" | |||
) |
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_unit | , | ||
CTLFLAG_RWTUN | , | ||
& | ucom_cons_unit, | ||
0 | , | ||
"console unit number" | |||
) |
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 | , | ||
pps_mode | , | ||
CTLFLAG_RWTUN | , | ||
& | ucom_pps_mode, | ||
0 | |||
) |
|
static |
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 | ||
) |
Definition at line 267 of file usb_serial.c.
References DPRINTF, error, ucom_softc::sc_callback, ucom_super_softc::sc_flag, ucom_softc::sc_flag, ucom_softc::sc_mtx, ucom_softc::sc_parent, ucom_softc::sc_subunit, ucom_super_softc::sc_subunits, ucom_softc::sc_super, ucom_super_softc::sc_tq, ucom_softc::sc_tty, ucom_super_softc::sc_ttyname, ucom_super_softc::sc_unit, ucom_attach_tty(), ucom_detach(), UCOM_FLAG_ATTACHED, UCOM_FLAG_DEVICE_MODE, UCOM_FLAG_FREE_UNIT, UCOM_FLAG_WAIT_REFS, ucom_callback::ucom_free, ucom_ref(), UCOM_TTY_PREFIX, ucom_unit_alloc(), ucom_unit_free(), USB_PRI_MED, and usb_proc_create().
Referenced by u3g_attach(), uark_attach(), ubsa_attach(), ubser_attach(), uchcom_attach(), ucycom_attach(), ufoma_attach(), uftdi_attach(), ugensa_attach(), uhso_probe_iface(), uipaq_attach(), umcs7840_attach(), umct_attach(), umodem_attach(), umoscom_attach(), uplcom_attach(), usie_attach(), uslcom_attach(), uvisor_attach(), and uvscom_attach().
|
static |
Definition at line 416 of file usb_serial.c.
References DPRINTF, ucom_softc::sc_callback, ucom_softc::sc_consdev, ucom_super_softc::sc_flag, ucom_softc::sc_flag, ucom_softc::sc_mtx, ucom_softc::sc_pps, ucom_softc::sc_subunit, ucom_super_softc::sc_subunits, ucom_softc::sc_tty, ucom_super_softc::sc_unit, ucom_class, ucom_cnops, ucom_cons_baud, ucom_cons_rx_high, ucom_cons_rx_low, ucom_cons_softc, ucom_cons_subunit, ucom_cons_tx_high, ucom_cons_tx_low, ucom_cons_unit, ucom_device_mode_console, UCOM_FLAG_CONSOLE, UCOM_FLAG_DEVICE_MODE, UCOM_MTX_LOCK, UCOM_MTX_UNLOCK, ucom_open, ucom_param, ucom_callback::ucom_tty_name, and UCOM_TTY_PREFIX.
Referenced by ucom_attach().
|
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().
|
static |
Definition at line 1356 of file usb_serial.c.
References ucom_softc::sc_flag, ucom_softc::sc_lsr, UCOM_FLAG_LSRTXIDLE, UCOM_MTX_ASSERT, ULSR_TSRE, and ULSR_TXRDY.
|
static |
Definition at line 809 of file usb_serial.c.
References DPRINTF, ucom_cfg_task::sc, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_callback::ucom_cfg_close, and UCOM_FLAG_LL_READY.
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().
|
static |
Definition at line 998 of file usb_serial.c.
References ucom_cfg_task::sc, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_pls_clr, ucom_softc::sc_pls_curr, ucom_softc::sc_pls_set, ucom_callback::ucom_cfg_set_break, ucom_callback::ucom_cfg_set_dtr, ucom_callback::ucom_cfg_set_ring, ucom_callback::ucom_cfg_set_rts, UCOM_FLAG_LL_READY, UCOM_LS_BREAK, UCOM_LS_DTR, UCOM_LS_RING, and UCOM_LS_RTS.
|
static |
Definition at line 719 of file usb_serial.c.
References DPRINTF, ucom_cfg_task::sc, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_mtx, ucom_callback::ucom_cfg_open, UCOM_FLAG_LL_READY, and usb_pause_mtx().
|
static |
Definition at line 1247 of file usb_serial.c.
References ucom_param_task::sc, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_mtx, ucom_param_task::termios_copy, ucom_callback::ucom_cfg_param, UCOM_FLAG_LL_READY, and usb_pause_mtx().
|
static |
Definition at line 675 of file usb_serial.c.
References ucom_cfg_task::sc, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_last_start_xfer, UCOM_FLAG_GP_DATA, UCOM_FLAG_HL_READY, UCOM_FLAG_LL_READY, ucom_callback::ucom_start_read, and ucom_callback::ucom_start_write.
|
static |
Definition at line 1133 of file usb_serial.c.
References DPRINTF, ucom_cfg_task::sc, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_lsr, ucom_softc::sc_msr, ucom_softc::sc_pps, ucom_softc::sc_tty, ucom_callback::ucom_cfg_get_status, UCOM_FLAG_HL_READY, UCOM_FLAG_LL_READY, UCOM_MTX_ASSERT, ucom_pps_mode, ULSR_BI, ULSR_FE, and ULSR_PE.
|
static |
Definition at line 827 of file usb_serial.c.
References DPRINTF, ucom_cfg_task::hdr, ucom_softc::sc_callback, ucom_softc::sc_close_task, ucom_softc::sc_flag, ucom_cfg_close, UCOM_FLAG_HL_READY, UCOM_FLAG_RTS_IFLOW, UCOM_MTX_ASSERT, ucom_queue_command(), ucom_shutdown(), and ucom_callback::ucom_stop_read.
|
static |
Definition at line 1621 of file usb_serial.c.
References ucom_softc::sc_callback, ucom_softc::sc_tty, UCOM_CONS_BUFSIZE, ucom_cons_rx_buf, ucom_cons_rx_high, ucom_cons_rx_low, ucom_cons_softc, UCOM_MTX_LOCK, UCOM_MTX_UNLOCK, ucom_outwakeup, ucom_callback::ucom_poll, and USB_IN_POLLING_MODE_FUNC.
|
static |
Definition at line 1611 of file usb_serial.c.
|
static |
Definition at line 1601 of file usb_serial.c.
|
static |
Definition at line 1590 of file usb_serial.c.
References ucom_cons_unit.
|
static |
Definition at line 1652 of file usb_serial.c.
References ucom_softc::sc_callback, ucom_softc::sc_tty, UCOM_CONS_BUFSIZE, ucom_cons_softc, ucom_cons_tx_buf, ucom_cons_tx_high, ucom_cons_tx_low, UCOM_MTX_LOCK, UCOM_MTX_UNLOCK, ucom_outwakeup, ucom_callback::ucom_poll, and USB_IN_POLLING_MODE_FUNC.
|
static |
Definition at line 1606 of file usb_serial.c.
|
static |
Definition at line 1616 of file usb_serial.c.
void ucom_detach | ( | struct ucom_super_softc * | ssc, |
struct ucom_softc * | sc | ||
) |
Definition at line 336 of file usb_serial.c.
References ucom_super_softc::sc_flag, ucom_softc::sc_flag, ucom_super_softc::sc_subunits, ucom_super_softc::sc_sysctl_ttyname, ucom_super_softc::sc_sysctl_ttyports, ucom_super_softc::sc_tq, ucom_detach_tty(), ucom_drain(), UCOM_FLAG_ATTACHED, UCOM_FLAG_WAIT_REFS, ucom_unref(), usb_proc_drain(), and usb_proc_free().
Referenced by u3g_detach(), uark_detach(), ubsa_detach(), ubser_detach(), uchcom_detach(), ucom_attach(), ucycom_detach(), ufoma_detach(), uftdi_detach(), ugensa_detach(), uhso_detach(), uipaq_detach(), umcs7840_detach(), umct_detach(), umodem_detach(), umoscom_detach(), uplcom_detach(), usie_detach(), uslcom_detach(), uvisor_detach(), and uvscom_detach().
|
static |
Definition at line 498 of file usb_serial.c.
References DPRINTF, ucom_softc::sc_callback, ucom_softc::sc_consdev, ucom_softc::sc_flag, ucom_softc::sc_tty, ucom_close, ucom_close_refs, ucom_cons_softc, UCOM_FLAG_CONSOLE, UCOM_FLAG_GONE, UCOM_FLAG_HL_READY, UCOM_FLAG_LL_READY, ucom_mtx, UCOM_MTX_LOCK, UCOM_MTX_UNLOCK, ucom_callback::ucom_stop_read, and ucom_callback::ucom_stop_write.
Referenced by ucom_detach().
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().
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().
|
static |
Definition at line 1111 of file usb_serial.c.
References DPRINTF, ucom_line_state(), and UCOM_LS_DTR.
Referenced by ucom_modem().
|
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().
|
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().
uint8_t ucom_get_data | ( | struct ucom_softc * | sc, |
struct usb_page_cache * | pc, | ||
uint32_t | offset, | ||
uint32_t | len, | ||
uint32_t * | actlen | ||
) |
Definition at line 1384 of file usb_serial.c.
References usb_page_search::buffer, DPRINTF, len, usb_page_search::length, offset, ucom_softc::sc_flag, ucom_softc::sc_tty, UCOM_CONS_BUFSIZE, ucom_cons_tx_buf, ucom_cons_tx_high, ucom_cons_tx_low, UCOM_FLAG_CONSOLE, UCOM_FLAG_GP_DATA, UCOM_MTX_ASSERT, usbd_copy_in(), and usbd_get_page().
Referenced by u3g_write_callback(), uark_bulk_write_callback(), ubsa_write_callback(), ubser_write_callback(), uchcom_write_callback(), ucycom_ctrl_write_callback(), ufoma_bulk_write_callback(), ufoma_ctrl_write_callback(), uftdi_write_callback(), ugensa_bulk_write_callback(), uhso_bs_write_callback(), uhso_mux_write_callback(), uipaq_write_callback(), umcs7840_write_callbackN(), umct_write_callback(), umodem_write_callback(), umoscom_write_callback(), uplcom_write_callback(), usie_uc_tx_callback(), uslcom_write_callback(), uvisor_write_callback(), and uvscom_write_callback().
|
static |
Definition at line 199 of file usb_serial.c.
References DPRINTF, ucom_mtx, UCOM_UNIT_MAX, and ucom_unrhdr.
|
static |
Definition at line 853 of file usb_serial.c.
References DPRINTF, ucom_softc::sc_flag, ucom_softc::sc_jitterbuf, ucom_softc::sc_jitterbuf_in, ucom_softc::sc_jitterbuf_out, UCOM_FLAG_HL_READY, UCOM_FLAG_INWAKEUP, UCOM_FLAG_RTS_IFLOW, UCOM_JITTERBUF_SIZE, UCOM_MTX_ASSERT, and ucom_rts().
|
static |
Definition at line 899 of file usb_serial.c.
References data, DPRINTF, error, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_pps, ucom_break(), UCOM_FLAG_HL_READY, ucom_callback::ucom_ioctl, UCOM_MTX_ASSERT, and ucom_ring().
|
static |
Definition at line 1065 of file usb_serial.c.
References DPRINTF, ucom_cfg_task::hdr, ucom_softc::sc_flag, ucom_softc::sc_line_state_task, ucom_softc::sc_pls_clr, ucom_softc::sc_pls_curr, ucom_softc::sc_pls_set, ucom_cfg_line_state, UCOM_FLAG_HL_READY, UCOM_MTX_ASSERT, and ucom_queue_command().
Referenced by ucom_break(), ucom_dtr(), ucom_ring(), and ucom_rts().
|
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().
|
static |
Definition at line 743 of file usb_serial.c.
References DPRINTF, error, ucom_cfg_task::hdr, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_jitterbuf_in, ucom_softc::sc_jitterbuf_out, ucom_softc::sc_lsr, ucom_softc::sc_mcr, ucom_softc::sc_msr, ucom_softc::sc_open_task, ucom_softc::sc_pls_clr, ucom_softc::sc_pls_curr, ucom_softc::sc_pls_set, ucom_softc::sc_start_task, ucom_softc::sc_tty, ucom_break(), ucom_cfg_open, ucom_cfg_start_transfers, UCOM_FLAG_GONE, UCOM_FLAG_HL_READY, ucom_modem, UCOM_MTX_ASSERT, ucom_callback::ucom_pre_open, ucom_queue_command(), ucom_ring(), and ucom_status_change().
|
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().
|
static |
Definition at line 1267 of file usb_serial.c.
References DPRINTF, error, ucom_cfg_task::hdr, ucom_param_task::hdr, ucom_softc::sc_callback, ucom_softc::sc_flag, ucom_softc::sc_param_task, ucom_softc::sc_start_task, ucom_cfg_param, ucom_cfg_start_transfers, ucom_close, UCOM_FLAG_HL_READY, UCOM_FLAG_RTS_IFLOW, ucom_modem, UCOM_MTX_ASSERT, ucom_open, ucom_callback::ucom_pre_param, and ucom_queue_command().
void ucom_put_data | ( | struct ucom_softc * | sc, |
struct usb_page_cache * | pc, | ||
uint32_t | offset, | ||
uint32_t | len | ||
) |
Definition at line 1462 of file usb_serial.c.
References usb_page_search::buffer, DPRINTF, len, usb_page_search::length, offset, ucom_softc::sc_flag, ucom_softc::sc_jitterbuf, ucom_softc::sc_jitterbuf_in, ucom_softc::sc_jitterbuf_out, ucom_softc::sc_tty, UCOM_CONS_BUFSIZE, ucom_cons_rx_buf, ucom_cons_rx_high, ucom_cons_rx_low, UCOM_FLAG_CONSOLE, UCOM_FLAG_RTS_IFLOW, UCOM_JITTERBUF_SIZE, UCOM_MTX_ASSERT, ucom_rts(), usbd_copy_out(), and usbd_get_page().
Referenced by u3g_read_callback(), uark_bulk_read_callback(), ubsa_read_callback(), ubser_read_callback(), uchcom_read_callback(), ucycom_intr_read_callback(), ufoma_bulk_read_callback(), ufoma_ctrl_read_callback(), uftdi_read_callback(), ugensa_bulk_read_callback(), uhso_bs_read_callback(), uhso_mux_read_callback(), uipaq_read_callback(), umcs7840_read_callbackN(), umct_read_callback_sub(), umodem_read_callback(), umoscom_read_callback(), uplcom_read_callback(), usie_uc_rx_callback(), uslcom_read_callback(), uvisor_read_callback(), and uvscom_read_callback().
|
static |
Definition at line 598 of file usb_serial.c.
References DPRINTF, ucom_param_task::hdr, usb_proc_msg::pm_callback, ucom_param_task::sc, ucom_softc::sc_last_start_xfer, ucom_softc::sc_super, ucom_super_softc::sc_tq, ucom_param_task::termios_copy, ucom_cfg_close, ucom_cfg_start_transfers, UCOM_MTX_ASSERT, usb_proc_is_gone(), usb_proc_msignal(), and usb_proc_mwait().
Referenced by ucom_close(), ucom_line_state(), ucom_open(), ucom_param(), and ucom_status_change().
void ucom_ref | ( | struct ucom_super_softc * | ssc | ) |
Definition at line 1695 of file usb_serial.c.
References ucom_super_softc::sc_refs, and ucom_mtx.
Referenced by u3g_attach(), uark_attach(), ubsa_attach(), ubser_attach(), uchcom_attach(), ucom_attach(), ucycom_attach(), ufoma_attach(), uftdi_attach(), ugensa_attach(), uhso_attach(), uipaq_attach(), umcs7840_attach(), umct_attach(), umodem_attach(), umoscom_attach(), uplcom_attach(), usie_attach(), uslcom_attach(), uvisor_attach(), and uvscom_attach().
|
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().
|
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().
void ucom_set_pnpinfo_usb | ( | struct ucom_super_softc * | ssc, |
device_t | dev | ||
) |
Definition at line 549 of file usb_serial.c.
References usbd_lookup_info::bIfaceIndex, dev, usb_attach_arg::device, usb_attach_arg::info, ucom_super_softc::sc_subunits, ucom_super_softc::sc_sysctl_ttyname, ucom_super_softc::sc_sysctl_ttyports, ucom_super_softc::sc_ttyname, ucom_super_softc::sc_unit, UCOM_TTY_PREFIX, and usbd_set_pnpinfo().
Referenced by u3g_attach(), uark_attach(), ubsa_attach(), ubser_attach(), uchcom_attach(), ucycom_attach(), ufoma_attach(), uftdi_attach(), ugensa_attach(), uhso_probe_iface(), uipaq_attach(), umcs7840_attach(), umct_attach(), umodem_attach(), umoscom_attach(), uplcom_attach(), uslcom_attach(), uvisor_attach(), and uvscom_attach().
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().
|
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().
|
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().
void ucom_status_change | ( | struct ucom_softc * | sc | ) |
Definition at line 1229 of file usb_serial.c.
References DPRINTF, ucom_cfg_task::hdr, ucom_softc::sc_flag, ucom_softc::sc_status_task, ucom_cfg_status_change, UCOM_FLAG_CONSOLE, UCOM_FLAG_HL_READY, UCOM_MTX_ASSERT, and ucom_queue_command().
Referenced by u3g_intr_callback(), ubsa_intr_callback(), uchcom_intr_callback(), ucom_open(), ufoma_intr_callback(), uftdi_read_callback(), uhso_bs_intr_callback(), umcs7840_intr_callback(), umct_intr_callback_sub(), umodem_intr_read_callback(), umoscom_intr_callback(), uplcom_intr_callback(), uslcom_control_callback(), and uvscom_intr_callback().
|
static |
Definition at line 208 of file usb_serial.c.
References DPRINTF, ucom_mtx, and ucom_unrhdr.
|
static |
Definition at line 230 of file usb_serial.c.
References DPRINTF, and ucom_unrhdr.
Referenced by ucom_attach().
|
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().
int ucom_unref | ( | struct ucom_super_softc * | ssc | ) |
Definition at line 1730 of file usb_serial.c.
References ucom_super_softc::sc_refs, ucom_free_unit(), and ucom_mtx.
Referenced by u3g_free_softc(), uark_free_softc(), ubsa_free_softc(), ubser_free_softc(), uchcom_free_softc(), ucom_detach(), ucom_free(), ucycom_free_softc(), ufoma_free_softc(), uftdi_free_softc(), ugensa_free_softc(), uhso_free_softc(), uipaq_free_softc(), umcs7840_free_softc(), umct_free_softc(), umodem_free_softc(), umoscom_free_softc(), uplcom_free_softc(), usie_free_softc(), uslcom_free_softc(), uvisor_free_softc(), and uvscom_free_softc().
|
static |
Definition at line 173 of file usb_serial.c.
|
static |
Definition at line 147 of file usb_serial.c.
Referenced by ucom_close(), and ucom_queue_command().
|
static |
Definition at line 148 of file usb_serial.c.
Referenced by ucom_line_state().
|
static |
Definition at line 146 of file usb_serial.c.
Referenced by ucom_open().
|
static |
Definition at line 150 of file usb_serial.c.
Referenced by ucom_param().
|
static |
Definition at line 145 of file usb_serial.c.
Referenced by ucom_open(), ucom_param(), and ucom_queue_command().
|
static |
Definition at line 149 of file usb_serial.c.
Referenced by ucom_status_change().
|
static |
Definition at line 175 of file usb_serial.c.
Referenced by ucom_attach_tty().
|
static |
Definition at line 166 of file usb_serial.c.
Referenced by ucom_detach_tty(), and ucom_param().
|
static |
Definition at line 196 of file usb_serial.c.
Referenced by ucom_detach_tty(), ucom_drain_all(), and ucom_free().
|
static |
Definition at line 400 of file usb_serial.c.
|
static |
Definition at line 402 of file usb_serial.c.
|
static |
Definition at line 398 of file usb_serial.c.
const struct consdev_ops ucom_cnops |
Definition at line 405 of file usb_serial.c.
Referenced by ucom_attach_tty().
|
static |
Definition at line 397 of file usb_serial.c.
|
static |
Definition at line 401 of file usb_serial.c.
|
static |
Definition at line 399 of file usb_serial.c.
|
static |
Definition at line 403 of file usb_serial.c.
|
static |
Definition at line 135 of file usb_serial.c.
Referenced by ucom_attach_tty().
|
static |
Definition at line 124 of file usb_serial.c.
Referenced by ucom_cngetc(), and ucom_put_data().
|
static |
Definition at line 128 of file usb_serial.c.
Referenced by ucom_attach_tty(), ucom_cngetc(), and ucom_put_data().
|
static |
Definition at line 127 of file usb_serial.c.
Referenced by ucom_attach_tty(), ucom_cngetc(), and ucom_put_data().
|
static |
Definition at line 136 of file usb_serial.c.
Referenced by ucom_attach_tty(), ucom_cngetc(), ucom_cnputc(), and ucom_detach_tty().
|
static |
Definition at line 134 of file usb_serial.c.
Referenced by ucom_attach_tty().
|
static |
Definition at line 125 of file usb_serial.c.
Referenced by ucom_cnputc(), and ucom_get_data().
|
static |
Definition at line 131 of file usb_serial.c.
Referenced by ucom_attach_tty(), ucom_cnputc(), and ucom_get_data().
|
static |
Definition at line 130 of file usb_serial.c.
Referenced by ucom_attach_tty(), ucom_cnputc(), and ucom_get_data().
|
static |
Definition at line 133 of file usb_serial.c.
Referenced by ucom_attach_tty(), and ucom_cnprobe().
|
static |
Definition at line 109 of file usb_serial.c.
Referenced by ucom_attach_tty().
|
static |
Definition at line 172 of file usb_serial.c.
|
static |
Definition at line 171 of file usb_serial.c.
|
static |
Definition at line 167 of file usb_serial.c.
|
static |
Definition at line 168 of file usb_serial.c.
Referenced by ucom_open(), ucom_param(), and ucom_shutdown().
|
static |
Definition at line 195 of file usb_serial.c.
Referenced by ucom_detach_tty(), ucom_drain(), ucom_drain_all(), ucom_free(), ucom_init(), ucom_ref(), ucom_uninit(), and ucom_unref().
|
static |
Definition at line 165 of file usb_serial.c.
Referenced by ucom_attach_tty(), and ucom_param().
|
static |
Definition at line 170 of file usb_serial.c.
Referenced by ucom_cngetc(), and ucom_cnputc().
|
static |
Definition at line 169 of file usb_serial.c.
Referenced by ucom_attach_tty().
|
static |
Definition at line 103 of file usb_serial.c.
Referenced by ucom_cfg_status_change().
|
static |
Definition at line 194 of file usb_serial.c.
Referenced by ucom_init(), ucom_uninit(), ucom_unit_alloc(), and ucom_unit_free().