66#include <sys/serial.h>
68#include <sys/sysctl.h>
69#include <sys/timepps.h>
75#define UCOM_PREFVER UCOM_MODVER
77#define UCOM_JITTERBUF_SIZE 128
111#define ULSR_RCV_FIFO 0x80
112#define ULSR_TSRE 0x40
113#define ULSR_TXRDY 0x20
118#define ULSR_RXRDY 0x01
119#define ULSR_RCV_MASK 0x1f
176#define UCOM_FLAG_RTS_IFLOW 0x01
177#define UCOM_FLAG_GONE 0x02
178#define UCOM_FLAG_ATTACHED 0x04
179#define UCOM_FLAG_GP_DATA 0x08
180#define UCOM_FLAG_LL_READY 0x20
181#define UCOM_FLAG_HL_READY 0x40
182#define UCOM_FLAG_CONSOLE 0x80
183#define UCOM_FLAG_WAIT_REFS 0x0100
184#define UCOM_FLAG_FREE_UNIT 0x0200
185#define UCOM_FLAG_INWAKEUP 0x0400
186#define UCOM_FLAG_LSRTXIDLE 0x0800
187#define UCOM_FLAG_DEVICE_MODE 0x1000
195#define UCOM_LS_DTR 0x01
196#define UCOM_LS_RTS 0x02
197#define UCOM_LS_BREAK 0x04
198#define UCOM_LS_RING 0x08
202#define UCOM_MTX_ASSERT(sc, what) USB_MTX_ASSERT((sc)->sc_mtx, what)
203#define UCOM_MTX_LOCK(sc) USB_MTX_LOCK((sc)->sc_mtx)
204#define UCOM_MTX_UNLOCK(sc) USB_MTX_UNLOCK((sc)->sc_mtx)
205#define UCOM_UNLOAD_DRAIN(x) \
206SYSUNINIT(var, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_drain_all, 0)
208#define ucom_cfg_do_request(udev,com,req,ptr,flags,timo) \
209 usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo)
219 uint32_t, uint32_t, uint32_t *);
void(* ucom_tty_name)(struct ucom_softc *, char *pbuf, uint16_t buflen, uint16_t unit, uint16_t subunit)
void(* ucom_cfg_set_dtr)(struct ucom_softc *, uint8_t)
void(* ucom_stop_read)(struct ucom_softc *)
int(* ucom_pre_open)(struct ucom_softc *)
int(* ucom_pre_param)(struct ucom_softc *, struct termios *)
void(* ucom_cfg_set_rts)(struct ucom_softc *, uint8_t)
void(* ucom_cfg_set_break)(struct ucom_softc *, uint8_t)
void(* ucom_start_write)(struct ucom_softc *)
void(* ucom_cfg_open)(struct ucom_softc *)
void(* ucom_stop_write)(struct ucom_softc *)
void(* ucom_poll)(struct ucom_softc *)
void(* ucom_free)(struct ucom_softc *)
int(* ucom_ioctl)(struct ucom_softc *, uint32_t, caddr_t, int, struct thread *)
void(* ucom_start_read)(struct ucom_softc *)
void(* ucom_cfg_param)(struct ucom_softc *, struct termios *)
void(* ucom_cfg_close)(struct ucom_softc *)
void(* ucom_cfg_get_status)(struct ucom_softc *, uint8_t *plsr, uint8_t *pmsr)
void(* ucom_cfg_set_ring)(struct ucom_softc *, uint8_t)
struct termios termios_copy
struct ucom_cfg_task sc_status_task[2]
struct ucom_param_task sc_param_task[2]
struct ucom_cfg_task sc_line_state_task[2]
struct ucom_super_softc * sc_super
struct ucom_cfg_task sc_close_task[2]
uint16_t sc_jitterbuf_out
uint8_t sc_jitterbuf[UCOM_JITTERBUF_SIZE]
struct consdev * sc_consdev
struct usb_proc_msg * sc_last_start_xfer
const struct ucom_callback * sc_callback
struct ucom_cfg_task sc_start_task[2]
struct ucom_cfg_task sc_open_task[2]
struct sysctl_oid * sc_sysctl_ttyports
struct sysctl_oid * sc_sysctl_ttyname
static void ucom_use_lsr_txbits(struct ucom_softc *sc)
void ucom_put_data(struct ucom_softc *, struct usb_page_cache *, uint32_t, uint32_t)
#define UCOM_FLAG_LSRTXIDLE
void ucom_drain(struct ucom_super_softc *)
#define UCOM_JITTERBUF_SIZE
void ucom_ref(struct ucom_super_softc *)
void ucom_detach(struct ucom_super_softc *, struct ucom_softc *)
void ucom_set_usb_mode(struct ucom_super_softc *, enum usb_hc_mode)
void ucom_drain_all(void *)
uint8_t ucom_cfg_is_gone(struct ucom_softc *)
void ucom_status_change(struct ucom_softc *)
uint8_t ucom_get_data(struct ucom_softc *, struct usb_page_cache *, uint32_t, uint32_t, uint32_t *)
int ucom_attach(struct ucom_super_softc *, struct ucom_softc *, int, void *, const struct ucom_callback *callback, struct mtx *)
void ucom_set_pnpinfo_usb(struct ucom_super_softc *, device_t)
int ucom_unref(struct ucom_super_softc *)