summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia/if_ne_pcmcia.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/pcmcia/if_ne_pcmcia.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/pcmcia/if_ne_pcmcia.c')
-rw-r--r--sys/dev/pcmcia/if_ne_pcmcia.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/dev/pcmcia/if_ne_pcmcia.c b/sys/dev/pcmcia/if_ne_pcmcia.c
index b158cb98396..7a525b95453 100644
--- a/sys/dev/pcmcia/if_ne_pcmcia.c
+++ b/sys/dev/pcmcia/if_ne_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ne_pcmcia.c,v 1.35 2001/02/27 08:41:51 fgsch Exp $ */
+/* $OpenBSD: if_ne_pcmcia.c,v 1.36 2001/03/12 05:37:01 aaron Exp $ */
/* $NetBSD: if_ne_pcmcia.c,v 1.17 1998/08/15 19:00:04 thorpej Exp $ */
/*
@@ -443,13 +443,6 @@ ne_pcmcia_attach(parent, self, aux)
const struct ne2000dev *ne_dev;
int i;
u_int8_t myea[6], *enaddr;
- void (*npp_init_media) __P((struct dp8390_softc *, int **,
- int *, int *));
- int *media, nmedia, defmedia;
-
- npp_init_media = NULL;
- media = NULL;
- nmedia = defmedia = 0;
psc->sc_pf = pa->pf;
@@ -610,10 +603,10 @@ again:
== RTL0_8019ID0 &&
bus_space_read_1(dsc->sc_regt, dsc->sc_regh, NERTL_RTL0_8019ID1)
== RTL0_8019ID1) {
- npp_init_media = rtl80x9_init_media;
dsc->sc_mediachange = rtl80x9_mediachange;
dsc->sc_mediastatus = rtl80x9_mediastatus;
dsc->init_card = rtl80x9_init_card;
+ dsc->sc_media_init = rtl80x9_media_init;
}
/* set up the interrupt */
@@ -624,11 +617,7 @@ again:
printf("\n");
- /* Initialize media, if we have it. */
- if (npp_init_media != NULL)
- (*npp_init_media)(dsc, &media, &nmedia, &defmedia);
-
- if (ne2000_attach(nsc, enaddr, media, nmedia, defmedia))
+ if (ne2000_attach(nsc, enaddr))
goto fail_5;
#if notyet