summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_el.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-04-12 20:48:13 +0000
committerwollman <wollman@FreeBSD.org>1995-04-12 20:48:13 +0000
commit6a8d3a357d2d39cf1274d89e9ee73459574e038d (patch)
tree3733f361a8298b0f38c2e4586c976a9240816ec2 /sys/i386/isa/if_el.c
parent669ed5b46ea62e3997fc8495702ddc9078fa7031 (diff)
downloadFreeBSD-src-6a8d3a357d2d39cf1274d89e9ee73459574e038d.zip
FreeBSD-src-6a8d3a357d2d39cf1274d89e9ee73459574e038d.tar.gz
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.
Diffstat (limited to 'sys/i386/isa/if_el.c')
-rw-r--r--sys/i386/isa/if_el.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index 6a60e6a..baaa3ba 100644
--- a/sys/i386/isa/if_el.c
+++ b/sys/i386/isa/if_el.c
@@ -6,7 +6,7 @@
*
* Questions, comments, bug reports and fixes to kimmel@cs.umass.edu.
*
- * $Id: if_el.c,v 1.10 1994/12/22 21:56:06 wollman Exp $
+ * $Id: if_el.c,v 1.11 1995/03/28 07:55:29 bde Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@@ -106,8 +106,9 @@ static struct kern_devconf kdc_el[NEL] = { {
isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
&kdc_isa0, /* parent */
0, /* parentdata */
- DC_BUSY, /* network interfaces are always busy */
- "3Com 3C501 Ethernet adapter"
+ DC_UNCONFIGURED, /* state */
+ "Ethernet adapter: 3Com 3C501",
+ DC_CLS_NETIF /* class */
} };
static inline void
@@ -133,6 +134,10 @@ int el_probe(struct isa_device *idev)
sc->el_base = idev->id_iobase;
base = sc->el_base;
+#ifndef DEV_LKM
+ el_registerdev(idev);
+#endif
+
/* First check the base */
if((base < 0x280) || (base > 0x3f0)) {
printf("el%d: ioaddr must be between 0x280 and 0x3f0\n",
@@ -212,7 +217,7 @@ int el_attach(struct isa_device *idev)
/* Now we can attach the interface */
dprintf(("Attaching interface...\n"));
if_attach(ifp);
- el_registerdev(idev);
+ kdc_el[idev->id_unit].kdc_state = DC_BUSY;
/* Put the station address in the ifa address list's AF_LINK
* entry, if any.
OpenPOWER on IntegriCloud