From 8f55c564c22c381a460d71fc0d84fb5a4d4f1cfa Mon Sep 17 00:00:00 2001 From: hselasky Date: Mon, 5 Nov 2012 17:50:40 +0000 Subject: Add a jitter buffer in the common USB serial driver code which temporarily stores characters if the TTY buffer is full when used a as a console. This can happen when a console is suspended. Also properly do the flow stop signalling when this happens and flow start when the condition changes back to normal again. Bump __FreeBSD_version to force external kernel modules to be recompiled. No kernel API changes. MFC after: 1 week Suggested by: ed @ --- sys/dev/usb/serial/usb_serial.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/dev/usb/serial/usb_serial.h') diff --git a/sys/dev/usb/serial/usb_serial.h b/sys/dev/usb/serial/usb_serial.h index 7d72adf..d045fbe 100644 --- a/sys/dev/usb/serial/usb_serial.h +++ b/sys/dev/usb/serial/usb_serial.h @@ -78,6 +78,7 @@ #define UCOM_MINVER 1 #define UCOM_PREFVER UCOM_MODVER #define UCOM_MAXVER 1 +#define UCOM_JITTERBUF_SIZE 128 /* bytes */ struct usb_device; struct ucom_softc; @@ -169,6 +170,8 @@ struct ucom_softc { struct mtx *sc_mtx; void *sc_parent; int sc_subunit; + uint16_t sc_jitterbuf_in; + uint16_t sc_jitterbuf_out; uint16_t sc_portno; uint16_t sc_flag; #define UCOM_FLAG_RTS_IFLOW 0x01 /* use RTS input flow control */ @@ -191,6 +194,7 @@ struct ucom_softc { #define UCOM_LS_RTS 0x02 #define UCOM_LS_BREAK 0x04 #define UCOM_LS_RING 0x08 + uint8_t sc_jitterbuf[UCOM_JITTERBUF_SIZE]; }; #define UCOM_MTX_ASSERT(sc, what) mtx_assert((sc)->sc_mtx, what) -- cgit v1.1