Subject: Re: port-i386/1936
To: None <gnats-bugs@gnats.netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: netbsd-bugs
Date: 01/15/1996 22:41:50
>Category:       port-i386
>Synopsis:       autoconfig "*" wildcards aren't supported for ISA devices

>How-To-Repeat:
        Configure an ISA device using a "*"; for example:

        ahb* at isa? port ? irq ?       # Adaptec 174[024] SCSI controllers
        ep* at isa? port 0x300 irq ?    # 3C509 ethernet cards

        Compile the kernel.
        Run, kernel, run!
        See kernel panic.

Seems to me that we shouldn't even get to the compile stage.  If I 
understand it right, config(8) won't let you "*" a device if it's 
qualified with "needs-count" in files*, contrasted with "needs-flag" or 
nothing which does.

Though, it may be annoying to have all those .h files created by 
needs-{count,flag}.

Firstly, though, lemme make sure I have this right...Say I have device 
foo, configured like this:

foo0	at foobus? addr ?
foo1	at foobus? addr ?

With neither qualifier, no .h files are created.  With needs-flag, we get 
a foo.h containing:

#define NFOO 1

With needs-count, we get:

#define NFOO 2

Note that to actually count the instances, a "*" must be disallowed.

So, if we don't particularly care about having foo.h, why not create a 
"no-star" (I'll be damned if I can remember exactly what Torek called the 
action of "starring" a device in his autoconfiguration paper...).  That 
way we can avoid these configuration mistakes (and cryptic panic 
messages) before we even get the kernel compiled.

--------------------------------------------------------------------------
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