Subject: Re: Q about "ahc" and "ahe" (was Re: README: changes to ep driver)
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Justin T. Gibbs <gibbs@freefall.freebsd.org>
List: port-i386
Date: 05/02/1996 11:06:28
>On Wed, 01 May 1996 23:31:56 -0700 
> "Justin T. Gibbs" <gibbs@freefall.freebsd.org> wrote:
>
> > Why make the names redundant and different than the FreeBSD file names?
> > In FreeBSD, the PCI probe code for the ahc device is in aic7870.c and
> > the EISA probe code is in aic7770.c since the names acurately describe
> > the chips the probes find.  It seems silly to add an "isa" or "pci"
> > suffix to files that are already in a directory of that name. 
>
>See the ep driver ... The NetBSD autoconfiguration scheme allows for 
>"devices" with "attachments".  The aic7xxx "driver" is called "ahc".  For 
>"ahc" devices that attach to pci, we have "ahc_pci" ... This is somewhat 
>intuitive, and has the pleasant side-effect of not tying ones self down 
>to a model number, which might change in the future.

The problem with using the device names at all is that they don't tell
you anything about what they support.  There is nothing intuitive about
if_ep* files supporting 3COM adapters of any type.

>If we were to name 
>the ep driver as you suggest, we'd have:
>
>	dev/isa/3c509.c
>	dev/eisa/3c579.c
>	dev/pci/3c590.c

Actually you'd have:

dev/isa/3c509.c
dev/eisa/3c5X9.c
dev/pci/3c59X.c

>BUT!  the 3c595 is handled by the PCI front-end ... and 3c509 cards that 
>masquerade as EISA are handled by the EISA front-end.  I like 
>"<driver>_<bus>" a lot better :-)

I know all about the ep driver since I did the break out of the EISA probe
in FreeBSD a month or so before it happened in NetBSD.  I still think
that having file names that have some correlation to the name of the
devices they support is better than forcing them to follow the device's
name which is often arbitrary.

>Another way to look at it: Why diverge from NetBSD's naming scheme just 
>because another OS happens to name the files differently?  :-)

Because I didn't know that there was a defined nameing scheme (it was only
recently that I saw some drivers renamed and the commit comments never
mentioned any policy or reason for the change) and so that, in the case of
the aic7xxx driver which comes from an external source, the author of the
driver can direct its users in diagnosing problems and applying fixes.

>
>----save the ancient forests - http://www.bayarea.net/~thorpej/forest/----
>Jason R. Thorpe                                       thorpej@nas.nasa.gov
>NASA Ames Research Center                               Home: 408.866.1912
>NAS: M/S 258-6                                          Work: 415.604.0935
>Moffett Field, CA 94035                                Pager: 415.428.6939

--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================