summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-10-26 19:25:35 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-10-26 19:25:35 +0000
commit6c34c66bc712c312a72442f85c9158215981eb62 (patch)
tree3484287c9be75a2896f0c0f2a37f70acd2c46d7c /sys/dev/ic
parent858c61cb78e5beff76dc6baa138e28b70b61dc3d (diff)
fix fxp(4) so that it will reset the link when you change the speed... This
will fix a problem where you boot w/ the default of autoselect, but then set the speed to 100/full, the switch will keep the autoselect/100/full negotiation... This will continue to work till someone resets the switch or unplugs the cable resulting in the switch failing to autoneg and falling back to 100/half, causing a hard to track down duplex mismatch.. From nCircle Network Security, Inc. via FreeBSD Tested by ckuethe@, pedro@, brad@, craig at creative dot com dot au
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/fxp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index be387315bdd..27633cef5c6 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.79 2006/07/01 21:48:08 brad Exp $ */
+/* $OpenBSD: fxp.c,v 1.80 2006/10/26 19:25:34 brad Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -1480,7 +1480,13 @@ fxp_mediachange(ifp)
struct ifnet *ifp;
{
struct fxp_softc *sc = ifp->if_softc;
+ struct mii_data *mii = &sc->sc_mii;
+ if (mii->mii_instance) {
+ struct mii_softc *miisc;
+ LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
+ mii_phy_reset(miisc);
+ }
mii_mediachg(&sc->sc_mii);
return (0);
}