From: uwe Date: Tue, 5 Dec 2023 11:06:05 +0000 (+0000) Subject: Remove "disable auto-negotiation" workaround for Marvell Alaska PHYs X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5f5f6dacbc114c2e663cbaeb6f7d772e6dbf27b7;p=openbsd Remove "disable auto-negotiation" workaround for Marvell Alaska PHYs This avoids an intermediate link state (10baseT) before the interface is configured via ifconfig(8), and is consistent with other MII drivers and OSes. The original reason for this workaround is mainly thought be related to either reducing the time required for auto-negotiation to complete or indeed incorrect advertisement of link capabilities. Tested on Intel Elkhart Lake with dwqe(4) and 88E1512 PHY. Originally from stsp@ with feedback from kettenis@. ok kettenis@ claudio@ --- diff --git a/sys/dev/mii/eephy.c b/sys/dev/mii/eephy.c index e33abe38431..efcea2b43ec 100644 --- a/sys/dev/mii/eephy.c +++ b/sys/dev/mii/eephy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eephy.c,v 1.60 2022/04/06 18:59:29 naddy Exp $ */ +/* $OpenBSD: eephy.c,v 1.61 2023/12/05 11:06:05 uwe Exp $ */ /* * Principal Author: Parag Patel * Copyright (c) 2001 @@ -290,11 +290,8 @@ eephy_reset(struct mii_softc *sc) /* * Do a software reset for these settings to take effect. - * Disable autonegotiation, such that all capabilities get - * advertised when it is switched back on. */ reg = PHY_READ(sc, E1000_CR); - reg &= ~E1000_CR_AUTO_NEG_ENABLE; PHY_WRITE(sc, E1000_CR, reg | E1000_CR_RESET); }