diff options
author | 2004-02-12 21:21:06 +0000 | |
---|---|---|
committer | 2004-02-12 21:21:06 +0000 | |
commit | 3a2d9e18c7645eb0a17aa30f4da1efc6d4ca06e0 (patch) | |
tree | 6546472da7a698598c7870e88d310118c247cc7b | |
parent | some typos and macro simplification; (diff) | |
download | wireguard-openbsd-3a2d9e18c7645eb0a17aa30f4da1efc6d4ca06e0.tar.xz wireguard-openbsd-3a2d9e18c7645eb0a17aa30f4da1efc6d4ca06e0.zip |
don't reset the PHY when IPs are configured; from freebsd revision 1.16
avoids hang when using gigabit copper; ok henric@, beck@
-rw-r--r-- | sys/dev/pci/if_em.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index f8136b259f2..0763549f461 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ /*$FreeBSD: if_em.c,v 1.26 2003/06/05 17:51:37 pdeuskar Exp $*/ -/* $OpenBSD: if_em.c,v 1.16 2003/12/09 23:41:35 henning Exp $ */ +/* $OpenBSD: if_em.c,v 1.17 2004/02/12 21:21:06 markus Exp $ */ #include "bpfilter.h" #include "vlan.h" @@ -807,6 +807,9 @@ em_init(void *arg) #endif /* DEVICE_POLLING */ em_enable_intr(sc); + /* Don't reset the phy next time init gets called */ + sc->hw.phy_reset_disable = TRUE; + splx(s); return; } @@ -1010,6 +1013,11 @@ em_media_change(struct ifnet *ifp) printf("%s: Unsupported media type\n", sc->sc_dv.dv_xname); } + /* As the speed/duplex settings my have changed we need to + * reset the PHY. + */ + sc->hw.phy_reset_disable = FALSE; + em_init(sc); return(0); |