From 6a8d3a357d2d39cf1274d89e9ee73459574e038d Mon Sep 17 00:00:00 2001 From: wollman Date: Wed, 12 Apr 1995 20:48:13 +0000 Subject: Add a class field to devconf and mst drivers. For those where it was easy, drivers were also fixed to call dev_attach() during probe rather than attach (in keeping with the new design articulated in a mail message five months ago). For a few that were really easy, correct state tracking was added as well. The `fd' driver was fixed to correctly fill in the description. The CPU identify code was fixed to attach a `cpu' device. The code was also massively reordered to fill in cpu_model with somethingremotely resembling what identifycpu() prints out. A few bytes saved by using %b to format the features list rather than lots of ifs. --- sys/i386/isa/if_ie.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sys/i386/isa/if_ie.c') diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c index 095725f..5e85521 100644 --- a/sys/i386/isa/if_ie.c +++ b/sys/i386/isa/if_ie.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.21 1995/03/19 14:28:45 davidg Exp $ + * $Id: if_ie.c,v 1.22 1995/03/28 07:55:31 bde Exp $ */ /* @@ -314,18 +314,18 @@ static struct kern_devconf kdc_ie[NIE] = { { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_BUSY, /* network interfaces are always ``busy'' */ - "" + DC_UNCONFIGURED, /* state */ + "Ethernet adapter", /* description */ + DC_CLS_NETIF /* class */ } }; static inline void -ie_registerdev(struct isa_device *id, const char *descr) +ie_registerdev(struct isa_device *id) { if(id->id_unit) kdc_ie[id->id_unit] = kdc_ie[0]; kdc_ie[id->id_unit].kdc_unit = id->id_unit; kdc_ie[id->id_unit].kdc_isa = id; - kdc_ie[id->id_unit].kdc_description = descr; dev_attach(&kdc_ie[id->id_unit]); } @@ -335,6 +335,8 @@ int ieprobe(dvp) { int ret; + ie_registerdev(dvp); + ret = sl_probe(dvp); if(!ret) ret = el_probe(dvp); if(!ret) ret = ni_probe(dvp); @@ -591,7 +593,7 @@ ieattach(dvp) #endif if_attach(ifp); - ie_registerdev(dvp, ie_hardware_names[ie_softc[unit].hard_type]); + kdc_ie[unit].kdc_description = ie_hardware_names[ie_softc[unit].hard_type]; { struct ifaddr *ifa = ifp->if_addrlist; -- cgit v1.1