Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix esp_eth startup #63

Merged
merged 4 commits into from
Nov 19, 2023
Merged

Fix esp_eth startup #63

merged 4 commits into from
Nov 19, 2023

Conversation

SpComb
Copy link
Member

@SpComb SpComb commented Nov 19, 2023

Debug ethernet 100BASE-TX auto-negotation issues by adding new ESP_LOGD(...) for register dumps.

Tweak the autonego_timeout_ms vs check_link_period_ms to avoid unnecessary 4s hang on boot at esp_eth_start(), bring up the eth netif later once the link is up.

Small optimizations to lan87xx_reset(), lan87xx_negotiate(), lan87xx_pwrctl() to avoid 10ms/100ms waits.

Change lan87xx_negotiate() to not unnecessarily restart auto-negotation when it is already enabled, and started after reset:

When enabled, auto-negotiation is started by the occurrence of one of the following events:
• Hardware reset
• Software reset
• Power-down reset
• Link status down
• Setting the Restart Auto-Negotiate bit of the Basic Control Register

Add new ETH_CMD_G_ERROR_COUNTER ioctl and log this on eth connect/disconnect events.

@SpComb SpComb merged commit d53f0ae into master Nov 19, 2023
3 checks passed
@SpComb SpComb deleted the esp-eth-fixes branch November 19, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant