Subject: Re: problems with autoconfiguring 3c509 cards on -current
To: Michael Richardson <mcr@sandelman.ottawa.on.ca>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-i386
Date: 01/27/1997 18:10:03
On Sun, 26 Jan 1997 17:30:55 -0500 
 Michael Richardson <mcr@sandelman.ottawa.on.ca> wrote:

 >   It usually results in a requirement to go through SMC's ridiculously
 > slow/large setup program to reset the ram base address.. I had a 3c509
 > around, so I substituted it instead. Next boot had my 509 and my ast
 > four port clone at the same irq.

Well, strictly speaking, this Works.  I.e. I'm assuming that the
3c509 and the AST both are working...

NetBSD has IRQ staring; i.e. interrupts of the same type (LEVEL
or EDGE) can be shared.  (PULSE can't be shared with anything.)

Both the ast and ep use EDGE triggered interrupts, thus the line
can be shared.

However, it's worth noting that the side-effect of this configuration
is that when the kernel goes to splnet(), you will also block interrupts
from the ast card, since IRQ 5 will be in splnet()'s mask.  That is
probably undesirable :-)

 >   I took a look at ioconf.c and suspected that perhaps the 509 should
 > configure *after* the ast. I tried rearranging things in that file,
 > but that didn't do the trick, so I moved the AST to irq 2/9, and was
 > happy. (it is a production-ish machine, so I didn't want to muck
 > around too long)

That won't make any difference, actually, since the IRQs are not
allocated by the kernel.  The AST board probably has a jumper, I
guess, and the 3c509 is probably configurable via a 3Com config
utility...

 >   Shouldn't I get some complaint somewhere about this?

Well, you'll only get a complaint when two incompatible interrupt
types attempt to share the same IRQ... and it will be in the form
of a panic :-)

 > ep0 at isa0 port 0x280-0x28f irq 5: 3Com 3C509 Ethernet      <---
 > ep0: aui/bnc/utp address 00:60:97:14:d5:e9
 > ast0 at isa0 port 0x1a0-0x1bf irq 5                          <---

...anyhow, as I said above, this _should_ work OK.  You could
reconfigure the hardware, but it's not really necessary.

Ciao.

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