svn commit: r294362 - in head/sys: dev/uart kern sys

John Baldwin jhb at freebsd.org
Wed Jan 20 02:14:18 UTC 2016


On Tuesday, January 19, 2016 11:34:28 PM Marius Strobl wrote:
> Author: marius
> Date: Tue Jan 19 23:34:27 2016
> New Revision: 294362
> URL: https://svnweb.freebsd.org/changeset/base/294362
> 
> Log:
>   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

Hmm, I got a panic on boot that I think is from this:

panic: Assertion tty_gone(tp) failed at /ufs/src-head-clean/sys/sys/ttydevsw.h:19
cpuid = 8
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe085c93a430
vpanic() at vpanic+0x182/frame 0xfffffe085c93a4b0
kassert_panic() at kassert_panic+0x126/frame 0xfffffe085c93a520
tty_drain() at tty_drain+0x80/frame 0xfffffe085c93a560
ttydev_leave() at ttydev_leave+0x8d/frame 0xfffffe085c93a580
ttydev_close() at ttydev_close+0xaf/frame 0xfffffe085c93a5a0
devfs_close() at devfs_close+0x223/frame 0xfffffe085c93a610
VOP_CLOSE_APV() at VOP_CLOSE_APV+0xf1/frame 0xfffffe085c93a640
vn_close() at vn_close+0xcd/frame 0xfffffe085c93a6b0
vn_closefile() at vn_closefile+0x4a/frame 0xfffffe085c93a730
devfs_close_f() at devfs_close_f+0x2c/frame 0xfffffe085c93a760
_fdrop() at _fdrop+0x1a/frame 0xfffffe085c93a780
closef() at closef+0x1e1/frame 0xfffffe085c93a810
fdescfree_fds() at fdescfree_fds+0x9d/frame 0xfffffe085c93a850
fdescfree() at fdescfree+0x46c/frame 0xfffffe085c93a910
exit1() at exit1+0x4e6/frame 0xfffffe085c93a990
sys_sys_exit() at sys_sys_exit+0xd/frame 0xfffffe085c93a9a0
amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe085c93aab0

-- 
John Baldwin


More information about the svn-src-head mailing list