From owner-svn-src-all@FreeBSD.ORG Thu Oct 23 20:09:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D70A106566B; Thu, 23 Oct 2008 20:09:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E12158FC1B; Thu, 23 Oct 2008 20:09:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m9NK9hMO030923; Thu, 23 Oct 2008 16:09:43 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ed Schouten Date: Thu, 23 Oct 2008 15:55:06 -0400 User-Agent: KMail/1.9.7 References: <200810231911.m9NJBisd064280@svn.freebsd.org> In-Reply-To: <200810231911.m9NJBisd064280@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810231555.06892.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 23 Oct 2008 16:09:43 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8479/Thu Oct 23 13:54:32 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184208 - head/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 23 Oct 2008 20:09:50 -0000 On Thursday 23 October 2008 03:11:44 pm Ed Schouten wrote: > Author: ed > Date: Thu Oct 23 19:11:44 2008 > New Revision: 184208 > URL: http://svn.freebsd.org/changeset/base/184208 > > Log: > Fix detaching of uart(4) devices. > > With our new TTY layer we use a two step device destruction procedure. > The TTY first gets abandoned by the device driver. When the TTY layer > notices all threads have left the TTY layer, it deallocates the TTY. > > This means that the device unit number should not be reused before a > callback from the TTY layer to the device driver has been made. newbus > doesn't seem to support this concept (yet), so right now just add a > destructor with a big comment in it. It's not ideal, but at least it's > better than panicing. Perhaps have tty drivers sleep in detach until the tty is completely gone? Either that or free the unit number in the tty layer when the tty is abandoned. -- John Baldwin