summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-02-05 23:32:07 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-02-05 23:32:07 +0000
commit0851bc5f1c88427c1e10f7d84ed845bf91505e81 (patch)
tree40fdd67e914da779b278c3133bdb121c03e7a0ed /sys/dev/pci
parent9145c74a84f6eb1d8d2d82518640f606f967634f (diff)
Eliminate a reset when configuring the IP address.
ok jsg@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_nfe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index f541cd58390..dca1ca3b446 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.17 2006/02/05 10:09:39 jsg Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.18 2006/02/05 23:32:06 brad Exp $ */
/*-
* Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -269,6 +269,7 @@ nfe_power(int why, void *arg)
if (why == PWR_RESUME) {
ifp = &sc->sc_arpcom.ac_if;
if (ifp->if_flags & IFF_UP) {
+ ifp->if_flags &= ~IFF_RUNNING;
nfe_init(ifp);
if (ifp->if_flags & IFF_RUNNING)
nfe_start(ifp);
@@ -939,6 +940,9 @@ nfe_init(struct ifnet *ifp)
struct nfe_softc *sc = ifp->if_softc;
uint32_t rxtxctl;
+ if (ifp->if_flags & IFF_RUNNING)
+ return 0;
+
nfe_stop(ifp, 0);
NFE_WRITE(sc, NFE_TX_UNK, 0);