diff options
author | 2014-10-24 23:30:05 +0000 | |
---|---|---|
committer | 2014-10-24 23:30:05 +0000 | |
commit | 145f04acffc15e79984fa26fc6bfb5ec029c74b3 (patch) | |
tree | 15a13245cc81cc388b801d91449ef01a6d983389 | |
parent | Another uvm_km_valloc(9) -> km_alloc(9) conversion. (diff) | |
download | wireguard-openbsd-145f04acffc15e79984fa26fc6bfb5ec029c74b3.tar.xz wireguard-openbsd-145f04acffc15e79984fa26fc6bfb5ec029c74b3.zip |
Always put controller into known state before device intialization.
From FreeBSD
ok sthen@ chris@
-rw-r--r-- | sys/dev/ic/re.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index c0d41497873..41b9e175616 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.158 2014/10/08 22:52:08 brad Exp $ */ +/* $OpenBSD: re.c,v 1.159 2014/10/24 23:30:05 brad Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1058,7 +1058,6 @@ re_attach(struct rl_softc *sc, const char *intrstr) /* * Call MI attach routine. */ - re_reset(sc); if_attach(ifp); ether_ifattach(ifp); @@ -1525,7 +1524,6 @@ re_intr(void *arg) } if (status & RL_ISR_SYSTEM_ERR) { - re_reset(sc); re_init(ifp); claimed = 1; } @@ -1837,6 +1835,9 @@ re_init(struct ifnet *ifp) */ re_stop(ifp); + /* Put controller into known state. */ + re_reset(sc); + /* * Enable C+ RX and TX mode, as well as VLAN stripping and * RX checksum offload. We must configure the C+ register diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 9b7f8b594cb..2cee64ba592 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.42 2014/09/06 04:46:58 brad Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.43 2014/10/24 23:30:05 brad Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -248,7 +248,6 @@ re_pci_activate(struct device *self, int act) re_stop(ifp); break; case DVACT_RESUME: - re_reset(sc); if (ifp->if_flags & IFF_UP) re_init(ifp); break; |