Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2008 15:55:06 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Ed Schouten <ed@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r184208 - head/sys/dev/uart
Message-ID:  <200810231555.06892.jhb@freebsd.org>
In-Reply-To: <200810231911.m9NJBisd064280@svn.freebsd.org>
References:  <200810231911.m9NJBisd064280@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810231555.06892.jhb>