svn commit: r184208 - head/sys/dev/uart
John Baldwin
jhb at freebsd.org
Thu Oct 23 20:09:50 UTC 2008
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
More information about the svn-src-all
mailing list