summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/usb_serial.h
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-11-05 17:50:40 +0000
committerhselasky <hselasky@FreeBSD.org>2012-11-05 17:50:40 +0000
commit8f55c564c22c381a460d71fc0d84fb5a4d4f1cfa (patch)
tree545e1ebf2a8b93e0faf72bb68c2c54ef4f93b3ec /sys/dev/usb/serial/usb_serial.h
parent404fbc7a9219f08d41afeee692d44e058a1956ba (diff)
downloadFreeBSD-src-8f55c564c22c381a460d71fc0d84fb5a4d4f1cfa.zip
FreeBSD-src-8f55c564c22c381a460d71fc0d84fb5a4d4f1cfa.tar.gz
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 @
Diffstat (limited to 'sys/dev/usb/serial/usb_serial.h')
-rw-r--r--sys/dev/usb/serial/usb_serial.h4
1 files changed, 4 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud