Skip to content

Commit 3ff0231

Browse files
committed
Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"
We've gotten a report of this breaking a fixed no autoneg setup. Since no link is worse than what this intends to fix (negotiating full duplex at forced speed), revert for the undeway 15.0 release cycle until this can be further reviewed. PR: 288827 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47336 This reverts commit 645c45e.
1 parent dea5f97 commit 3ff0231

File tree

2 files changed

+8
-41
lines changed

2 files changed

+8
-41
lines changed

sys/dev/e1000/e1000_phy.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,10 +1707,9 @@ s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)
17071707
* autonegotiation.
17081708
*/
17091709
ret_val = e1000_copper_link_autoneg(hw);
1710-
if (ret_val && !hw->mac.forced_speed_duplex)
1710+
if (ret_val)
17111711
return ret_val;
1712-
}
1713-
if (!hw->mac.autoneg || (ret_val && hw->mac.forced_speed_duplex)) {
1712+
} else {
17141713
/* PHY will be set to 10H, 10F, 100H or 100F
17151714
* depending on user settings.
17161715
*/

sys/dev/e1000/if_em.c

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,18 +2000,7 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr)
20002000
(sc->hw.phy.media_type == e1000_media_type_internal_serdes)) {
20012001
if (sc->hw.mac.type == e1000_82545)
20022002
fiber_type = IFM_1000_LX;
2003-
switch (sc->link_speed) {
2004-
case 10:
2005-
ifmr->ifm_active |= IFM_10_FL;
2006-
break;
2007-
case 100:
2008-
ifmr->ifm_active |= IFM_100_FX;
2009-
break;
2010-
case 1000:
2011-
default:
2012-
ifmr->ifm_active |= fiber_type | IFM_FDX;
2013-
break;
2014-
}
2003+
ifmr->ifm_active |= fiber_type | IFM_FDX;
20152004
} else {
20162005
switch (sc->link_speed) {
20172006
case 10:
@@ -2024,12 +2013,11 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr)
20242013
ifmr->ifm_active |= IFM_1000_T;
20252014
break;
20262015
}
2016+
if (sc->link_duplex == FULL_DUPLEX)
2017+
ifmr->ifm_active |= IFM_FDX;
2018+
else
2019+
ifmr->ifm_active |= IFM_HDX;
20272020
}
2028-
2029-
if (sc->link_duplex == FULL_DUPLEX)
2030-
ifmr->ifm_active |= IFM_FDX;
2031-
else
2032-
ifmr->ifm_active |= IFM_HDX;
20332021
}
20342022

20352023
/*********************************************************************
@@ -2063,34 +2051,14 @@ em_if_media_change(if_ctx_t ctx)
20632051
sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL;
20642052
break;
20652053
case IFM_100_TX:
2066-
sc->hw.mac.autoneg = DO_AUTO_NEG;
2067-
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
2068-
sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL;
2069-
sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL;
2070-
} else {
2071-
sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF;
2072-
sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF;
2073-
}
2074-
break;
2075-
case IFM_10_T:
2076-
sc->hw.mac.autoneg = DO_AUTO_NEG;
2077-
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
2078-
sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL;
2079-
sc->hw.mac.forced_speed_duplex = ADVERTISE_10_FULL;
2080-
} else {
2081-
sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF;
2082-
sc->hw.mac.forced_speed_duplex = ADVERTISE_10_HALF;
2083-
}
2084-
break;
2085-
case IFM_100_FX:
20862054
sc->hw.mac.autoneg = false;
20872055
sc->hw.phy.autoneg_advertised = 0;
20882056
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
20892057
sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL;
20902058
else
20912059
sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF;
20922060
break;
2093-
case IFM_10_FL:
2061+
case IFM_10_T:
20942062
sc->hw.mac.autoneg = false;
20952063
sc->hw.phy.autoneg_advertised = 0;
20962064
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)

0 commit comments

Comments
 (0)