Subject: Re: nubus_attach() and the LC III
To: Denny Gentry <denny1@home.com>
From: Scott Reynolds <scottr@og.org>
List: port-mac68k
Date: 07/15/1997 02:08:22
On Wed, 9 Jul 1997, Denny Gentry wrote:

> It appears that the PDS slot in the LCIII maps in at a
> wide address range. nubus.c always probes for 6 nubus slots,
> but an ethernet card in an LCIII shows up in three of them:
> [...]
>   There is only one sn card. nubus_attach() gets fooled
> because the card's declaration ROM shows up at a very
> wide range of addresses.

Each `psuedoslot' that a PDS card can be located in has a different
interrupt; does your card post interrupts on every one of them?  It seems
really odd that you can see the declaration ROM on _all_ of the pseudoslot
addresses, as if they didn't fully decode the address as recommended on
page 350 of `Designing Cards and Drivers'.

>   The second question is how to fix it? A custom kernel can hard
> code only one sn0 device, but that means GENERIC kernels
> will not work well on the LCIII.

The only practical alternative that I can think of is a variation on the
idea of the NOLUNS quirk for the SCSI code; flag that specific card in
such a manner that it only matches once.  It's a nasty hack, but then my
suspicion is that this is poorly-behaved hardware, which we can't do much
about.

> Alternately, nubus.c can be changed
> to have some knowledge about "special" machines and how many
> slots they actually have, instead of always probing 6. Any
> thoughts?

Are you sure this will make a difference, in this case?  I suspect what's
really happening is that you're seeing the card in all 3 pseudoslots, not
that it's showing up in a nonexistent slot.  If I'm wrong, though, please
let me know.

Meanwhile, 

--scott