summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ne2000.c
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-03-12 05:37:02 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-03-12 05:37:02 +0000
commitae5b9c617251f0bbde3b4bc036c9c4fa6ac03be0 (patch)
treefd8d5ce0859f439ce531740d6f199e6f7f58e0ec /sys/dev/ic/ne2000.c
parent6132c34e3bdb7699e0b9c86920b8c517208deef2 (diff)
Adjust the way that media is initialized on DP8390-compatibles; from NetBSD.
The dp8390_softc now has media_init and media_fini function pointers that do the work. fgsch@ ok
Diffstat (limited to 'sys/dev/ic/ne2000.c')
-rw-r--r--sys/dev/ic/ne2000.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/ne2000.c b/sys/dev/ic/ne2000.c
index ac92cae70c2..cd6906f2591 100644
--- a/sys/dev/ic/ne2000.c
+++ b/sys/dev/ic/ne2000.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ne2000.c,v 1.8 2000/05/30 14:31:39 fgsch Exp $ */
+/* $OpenBSD: ne2000.c,v 1.9 2001/03/12 05:36:58 aaron Exp $ */
/* $NetBSD: ne2000.c,v 1.12 1998/06/10 01:15:50 thorpej Exp $ */
/*-
@@ -103,10 +103,9 @@ struct cfdriver ne_cd = {
};
int
-ne2000_attach(nsc, myea, media, nmedia, defmedia)
+ne2000_attach(nsc, myea)
struct ne2000_softc *nsc;
u_int8_t *myea;
- int *media, nmedia, defmedia;
{
struct dp8390_softc *dsc = &nsc->sc_dp8390;
bus_space_tag_t nict = dsc->sc_regt;
@@ -280,7 +279,10 @@ ne2000_attach(nsc, myea, media, nmedia, defmedia)
/* Clear any pending interrupts that might have occurred above. */
bus_space_write_1(nict, nich, ED_P0_ISR, 0xff);
- if (dp8390_config(dsc, media, nmedia, defmedia)) {
+ if (dsc->sc_media_init == NULL)
+ dsc->sc_media_init = dp8390_media_init;
+
+ if (dp8390_config(dsc)) {
printf("%s: setup failed\n", dsc->sc_dev.dv_xname);
return (1);
}