Subject: if_ed and __BROKEN_INDIRECT_CONFIG
To: None <current-users@NetBSD.ORG>
From: Ken Hornstein <>
List: current-users
Date: 04/22/1997 14:22:19
So I've been playing around with this new Alpha I have here.  It has an
ISA bus, and I've been trying to get this old 3C503 ethernet card
working with it (yes, I know, but it's only temporarily until I can get
the ATM card working .... but I'd like it on the net first :-) ).

After looking at other drivers and the changes done for
__BROKEN_INDIRECT_CONFIG, I was able to change the if_ed driver so that
it probes the card correctly, so at least I'm on the right track.

However, I'm not quite sure what to do now.  The way the new config
stuff seems to work is that it passes in a cfdata structure with all of
the device configuration.  However, the _old_ (ie -
BROKEN_INDIRECT_CONFIG) way passes in a device softc struct.

The problem here is that the if_ed driver sets a bunch of a stuff in
the softc structure that is used later by the attach routine.  Since a
softc structure is never passed back from probe to attach, there
doesn't seem to be a way to transmit the information back (at least,
not as far as I can tell).

I don't mind fixing this, but I'm not sure what's "right" way to it.  I
could keep a table in the driver around (kinda like what the ep driver
does) ... is that what "should" be done?  Or should most of the probe
logic be moved/copied into the attach routine?


(PS - I have no opinion about the actual brokenness of the indirect
config stuff - I'm only using the name of the preprocessor directive to
avoid confusion :-) ).