Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2022 12:05:34 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 218009b18d5e - stable/12 - Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"
Message-ID:  <202210121205.29CC5YJ4057472@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kbowling (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=218009b18d5ee135ae3d91617bdc4a8b3e9aa862

commit 218009b18d5ee135ae3d91617bdc4a8b3e9aa862
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2022-10-12 12:01:12 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2022-10-12 12:05:28 +0000

    Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"
    
    This reverts commit 9ab4dfce8feda8cf3545be0c3c7569095b1fcd24.
    
    OPNsense users have reported a regression with fixed configs.
    
    The e1000 api is not ready for this change.
    
    (cherry picked from commit 66dad2db0a484d65df331df76db0b68ef518f4db)
---
 sys/dev/e1000/if_em.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 821bb87f0ff3..a9ab2fb21535 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -1629,24 +1629,20 @@ em_if_media_change(if_ctx_t ctx)
 		sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL;
 		break;
 	case IFM_100_TX:
-		sc->hw.mac.autoneg = DO_AUTO_NEG;
-		if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
-			sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL;
+		sc->hw.mac.autoneg = false;
+		sc->hw.phy.autoneg_advertised = 0;
+		if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
 			sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL;
-		} else {
-			sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF;
+		else
 			sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF;
-		}
 		break;
 	case IFM_10_T:
-		sc->hw.mac.autoneg = DO_AUTO_NEG;
-		if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
-			sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL;
+		sc->hw.mac.autoneg = false;
+		sc->hw.phy.autoneg_advertised = 0;
+		if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
 			sc->hw.mac.forced_speed_duplex = ADVERTISE_10_FULL;
-		} else {
-			sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF;
+		else
 			sc->hw.mac.forced_speed_duplex = ADVERTISE_10_HALF;
-		}
 		break;
 	default:
 		device_printf(sc->dev, "Unsupported media type\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210121205.29CC5YJ4057472>