]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
authormarius <marius@FreeBSD.org>
Tue, 19 Jan 2016 23:34:27 +0000 (23:34 +0000)
committermarius <marius@FreeBSD.org>
Tue, 19 Jan 2016 23:34:27 +0000 (23:34 +0000)
commitc9d9d68baea4279c304cbaf81d85d4f33b6a6ddb
tree317f9c0bd52607efdfd2f6c62f25b5b2aa3842e2
parent4298849ab05ffb3fad1bbaf9c59bfa455c4b7565
Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
to actually wait until the TX FIFOs of UARTs have be drained before
returning. This is done by bringing the equivalent of the TS_BUSY flag
found in the previous implementation back in an ABI-preserving way.
Reported and tested by: Patrick Powell

Most likely, drivers for USB-serial-adapters likewise incorporating
TX FIFOs as well as other terminal devices that buffer output in some
form should also provide implementations of tsw_busy.

MFC after: 3 days
sys/dev/uart/uart_tty.c
sys/kern/tty.c
sys/sys/ttydevsw.h