diff options
author | 2006-10-26 19:25:34 +0000 | |
---|---|---|
committer | 2006-10-26 19:25:34 +0000 | |
commit | 5554b2c221c96fe306afa43d8db8918aca876c96 (patch) | |
tree | 9f3b5a5f8a18acfbb61f6a8ce7628c224f1822ba | |
parent | no need to cause every reference to pf to be an Xr; on the other (diff) | |
download | wireguard-openbsd-5554b2c221c96fe306afa43d8db8918aca876c96.tar.xz wireguard-openbsd-5554b2c221c96fe306afa43d8db8918aca876c96.zip |
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
-rw-r--r-- | sys/dev/ic/fxp.c | 8 |
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); } |