diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-10-11 00:08:52 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-10-11 00:08:52 +0000 |
commit | 741aac9aa6df333c4f5d87098533a58859142964 (patch) | |
tree | 6b11e6555e45dcfc0416363b2a4b926105375b3c /sys/dev/pci | |
parent | 2c727643c8903b3b8cee7a5e242eae444c6e5775 (diff) |
call xge_stop() at the top of xge_init().
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_xge.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index 1dcc46e020e..abed519f7d4 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xge.c,v 1.32 2006/10/10 23:39:15 brad Exp $ */ +/* $OpenBSD: if_xge.c,v 1.33 2006/10/11 00:08:51 brad Exp $ */ /* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */ /* @@ -722,6 +722,14 @@ xge_init(struct ifnet *ifp) { struct xge_softc *sc = ifp->if_softc; uint64_t val; + int s; + + s = splnet(); + + /* + * Cancel any pending I/O + */ + xge_stop(ifp, 0); /* 31+32, setup MAC config */ PIF_WKEY(MAC_CFG, TMAC_EN|RMAC_EN|TMAC_APPEND_PAD|RMAC_STRIP_FCS| @@ -741,6 +749,7 @@ xge_init(struct ifnet *ifp) bitmask_snprintf(val, QUIESCENT_BMSK, buf, sizeof buf); printf("%s: ADAPTER_STATUS missing bits %s\n", XNAME, buf); #endif + splx(s); return (1); } @@ -778,6 +787,8 @@ xge_init(struct ifnet *ifp) ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; + splx(s); + return (0); } @@ -985,7 +996,7 @@ xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } } else { if (ifp->if_flags & IFF_RUNNING) - xge_stop(ifp, 0); + xge_stop(ifp, 1); } sc->xge_if_flags = ifp->if_flags; break; |