Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2003 06:56:08 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= <des@des.no>
Cc:        cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/etc/etc.sparc64 ttys
Message-ID:  <20030912063325.A1562@gamplex.bde.org>
In-Reply-To: <xzpekyn5nmf.fsf@dwp.des.no>
References:  <200309110014.h8B0EHOX044603@repoman.freebsd.org> <xzpisnz68d0.fsf@dwp.des.no> <20030911151425.GA85714@dragon.nuxi.com> <20030911153213.GD12432@locore.ca> <xzpekyn5nmf.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 11 Sep 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:

> Jake Burkholder <jake@locore.ca> writes:
> > Apparently, On Thu, Sep 11, 2003 at 08:14:25AM -0700,
> > > On Thu, Sep 11, 2003 at 10:24:11AM +0200, Dag-Erling Sm?rgrav wrote:
> > > > Is there a good reason for uart to use ttyu instead of ttyd?  There=
's
> > > > no risk of conflict even if both uart and sio are present, thanks t=
o
> > > > devfs, so why not use the traditional name?
> > > I hate to say it -- as an owner of sparc64 and amd64, alpha, & i386
> > > FreeBSD machines using serial consoles and thus affected by this, I a=
gree
> > > with des.
> > I didn't pick the name and don't see that it makes much difference.  Yo=
u'll
> > have to take this up with Marcel.
>
> It *does* make a difference.  It makes it harder, for no good reason,
> to switch from sio to uart or back.  The device name is part of the
> exposed interface, and gratuitious changes to interfaces are never a
> good idea.

I once wanted all tty names in a uniform namespace (ttyd<number> and
cuaa<number>), but now think that the names should be at least hardware
specific.  One reason is that you want the numbers to correspond to
the hardware too, and not move around as (different) hardware is added
or be sparsely assigned to leave room for expansion.  As marcel said,
there are some difficulties assigning the names in different drivers
even for the same type of hardware.  Even the unit numbers tend to
move around for me.

Other uart(4) bugs in this area:
- the cua* devices are named uart*.  I think ps(1), etc. strip off the
  first 3 characters of device names, so uart0 becomes t0.
- no inital-state or lock devices.  This makes all my initialization
  scripts including rc.d/serial inapplicable, and leaves only a hard-coded
  initial state since the state set by stty(1) is discarded on first-open.

The initial state devices or equivalent functionalty are more important
than the cua devices IMO.  I also miss them when running serial benchmarks
under Linux.  Linux recently finished burning their cua devices.

Appart from this, all devices on device driver foo should be named
foo<number>, and no driver names should be longer than "foo".

Bruce



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