From owner-svn-src-all@freebsd.org Wed Jan 20 02:14:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 381B5A890A1; Wed, 20 Jan 2016 02:14:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A831BF7; Wed, 20 Jan 2016 02:14:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 97A91B97D; Tue, 19 Jan 2016 21:14:16 -0500 (EST) From: John Baldwin To: Marius Strobl Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294362 - in head/sys: dev/uart kern sys Date: Tue, 19 Jan 2016 18:14:14 -0800 Message-ID: <2881455.20ba4MY9ds@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201601192334.u0JNYST5080954@repo.freebsd.org> References: <201601192334.u0JNYST5080954@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 19 Jan 2016 21:14:16 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2016 02:14:18 -0000 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