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@
-/* $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
/*
* 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);
}