Subject: Re: config problem
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu>
List: current-users
Date: 06/27/1996 17:05:48
> For "indirect" busses (e.g. ISA, VME), you have different semantics...the 
> bus has no mechanism for cards to say "I'm here", and no discrete 
> "slots".  Thus, the driver is called to probe for the device.  This is 
> why "indirect" busses don't support "cloning" (e.g. ed*).

Piffle.  Certainly, on indirect config busses you can't know what's
at each location until you look at it.  however, that doesn't mean
that the unit-number-allocation policies that go with cloning devices
don't make sense, and it doesn't mean that you can't do real cloning
for some devices.


(1) indirect configuration busses _can_ support 'cloning' devices at a
minimal level, i.e. for unit number allocation purposes.

At the very least, remember that cloning devices could be used to say
"give me the next available unit number for this device," and that use
of cloning device specs should not cause serious problems.  e.g. you
should be able to say (now that config supports multiple cloning
devices of a single type):

	ed* at isa? port 0x280
	ed* at isa? port 0x300

The existing configuration machinery for indirect-config busses, each
of those would be examined once and the right thing would happen.
It's in the code now, and the autoconfiguration code has always been
able to support cloning devices on indirect-config busses.  Only the
ISA code's own brokenness (or, perhaps lack of understanding of the
autoconfig functions) causes it to panic when it sees a cloning
device.


(2) It's possible that it may make sense to have indirect config
busses support 'real' cloning of devices, but that would require
changes to the autoconfiguration code.

Consider that, at least for most boards on indirect-config busses,
there's a limited set of addresses which one of those boards can live
at, e.g.:

	ed* at isa? port ?

would look at all the possible ports where an 'ed' could live, and
check for one.  Given that you can (perhaps should) now do port and
memory space accounting for e.g. ISA, it could make sure that it isn't
looking a space already occupied, etc.

In fact, it might very well be that a method similar to this is _the_
right way to handle boards like the 3c5x9...



cgd