diff options
author | Dimitry Andric <dim@cvs.openbsd.org> | 2006-09-18 21:33:33 +0000 |
---|---|---|
committer | Dimitry Andric <dim@cvs.openbsd.org> | 2006-09-18 21:33:33 +0000 |
commit | 4458493a8254e497ee8d753fe86ed8d3d0ba20e9 (patch) | |
tree | 2f69c4c2d8548a07b39ed5e54ae2975a30738d9d /sys | |
parent | da60693861d2597a49ad622406e287847e083369 (diff) |
Fix for re_stop() being called from re_cardbus_shutdown() with the
wrong arguments, causing uvm_fault on halt/reboot, with a cardbus re
inserted. While here, cleanup prototypes and use revar.h everywhere.
ok brad@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cardbus/if_re_cardbus.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/re.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/revar.h | 6 |
3 files changed, 8 insertions, 11 deletions
diff --git a/sys/dev/cardbus/if_re_cardbus.c b/sys/dev/cardbus/if_re_cardbus.c index 32075884e51..fcdf87cb1a5 100644 --- a/sys/dev/cardbus/if_re_cardbus.c +++ b/sys/dev/cardbus/if_re_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_cardbus.c,v 1.7 2006/07/01 21:48:08 brad Exp $ */ +/* $OpenBSD: if_re_cardbus.c,v 1.8 2006/09/18 21:33:32 dim Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -277,8 +277,9 @@ void re_cardbus_shutdown(void *arg) { struct rl_softc *sc = (struct rl_softc *)arg; + struct ifnet *ifp = &sc->sc_arpcom.ac_if; - re_stop(sc); + re_stop(ifp, 1); } void diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 97c90172caa..f781b37cdaf 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.45 2006/09/17 18:18:57 brad Exp $ */ +/* $OpenBSD: re.c,v 1.46 2006/09/18 21:33:32 dim Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -149,12 +149,11 @@ #include <dev/pci/pcivar.h> #include <dev/ic/rtl81x9reg.h> +#include <dev/ic/revar.h> int redebug = 0; #define DPRINTF(x) if (redebug) printf x -int re_attach(struct rl_softc *); - int re_encap(struct rl_softc *, struct mbuf *, int *); int re_newbuf(struct rl_softc *, int, struct mbuf *); @@ -165,12 +164,9 @@ void re_fixup_rx(struct mbuf *); #endif void re_rxeof(struct rl_softc *); void re_txeof(struct rl_softc *); -int re_intr(void *); void re_tick(void *); void re_start(struct ifnet *); int re_ioctl(struct ifnet *, u_long, caddr_t); -int re_init(struct ifnet *); -void re_stop(struct ifnet *, int); void re_watchdog(struct ifnet *); int re_ifmedia_upd(struct ifnet *); void re_ifmedia_sts(struct ifnet *, struct ifmediareq *); diff --git a/sys/dev/ic/revar.h b/sys/dev/ic/revar.h index 46b07b12c27..8593990cb66 100644 --- a/sys/dev/ic/revar.h +++ b/sys/dev/ic/revar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: revar.h,v 1.2 2006/07/01 21:48:08 brad Exp $ */ +/* $OpenBSD: revar.h,v 1.3 2006/09/18 21:33:32 dim Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -17,6 +17,6 @@ */ extern int re_intr(void *); -extern void re_attach(struct rl_softc *); +extern int re_attach(struct rl_softc *); extern int re_init(struct ifnet *); -extern void re_stop(struct rl_softc *); +extern void re_stop(struct ifnet *, int); |