summaryrefslogtreecommitdiffstats
path: root/sys/dev/ie
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/dev/ie
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/dev/ie')
-rw-r--r--sys/dev/ie/if_ie.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 095725f..5e85521 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/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;
OpenPOWER on IntegriCloud