summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-02-12 21:21:07 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-02-12 21:21:07 +0000
commitfc2473780f61b4c9dd85d160e8f11a93c61cd1b6 (patch)
tree593b6e8f651a9c833bd332f6f323e5a2aae5b59d /sys/dev/pci/if_em.c
parent44dfbbcfc3edbc0227165aa41b0b80a5fa55b364 (diff)
don't reset the PHY when IPs are configured; from freebsd revision 1.16
avoids hang when using gigabit copper; ok henric@, beck@
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c10
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);