Skip to content

Commit a89dbda

Browse files
committed
stm32/eth: Add warning for autonegotiation timeout fallback.
Print warning message when autonegotiation times out and code falls back to 10Mbps Half-Duplex mode. Issue: After 5-second autonegotiation timeout (PHY_AUTONEG_TIMEOUT_MS), code silently falls back to 10Mbps Half-Duplex - 10x slower than typical 100Mbps Full-Duplex. Users experience slow network with no indication of root cause. Solution: Print warning message to console when fallback occurs: "ETH: Autonegotiation timeout, using 10Mbps Half-Duplex" Impact: Users can diagnose slow network performance and investigate autonegotiation failures (bad cable, switch issues, etc.). Signed-off-by: Andrew Leech <[email protected]>
1 parent 8f44b6b commit a89dbda

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ports/stm32/eth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,7 @@ void eth_phy_link_status_poll() {
837837
// If autoneg timed out and speed couldn't be read, use safe default (10Mbps Half)
838838
if (autoneg_timeout && phy_speed == 0) {
839839
phy_speed = PHY_SPEED_10HALF;
840+
mp_printf(&mp_plat_print, "ETH: Autonegotiation timeout, using 10Mbps Half-Duplex\n");
840841
}
841842

842843
// Set flag to prevent IRQ handler from processing packets during reconfiguration

0 commit comments

Comments
 (0)