diff options
author | Tom Rini <trini@konsulko.com> | 2025-08-01 08:47:50 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-08-01 08:47:50 -0600 |
commit | 231b40724dee2915acfff5e0f5c50feff31cd637 (patch) | |
tree | 6626291977868f30252cc772aa9736fab80b6d8d /drivers/net/phy/phy.c | |
parent | f5e968a28e7cdc2c4365f5a382e02f074ee03fac (diff) | |
parent | 5a4bfe38775ad5febf9b9fc58f0432f786a3d5d5 (diff) |
Merge tag 'net-20250801' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request for net-20250801
net:
- Support overriding Auto Negotiation timeout with env variable
'phy_aneg_timeout'
- Add missing virtqueue_kick() in free_pkt()
- Remove bcm281xx ethernet driver
- Tighten some network driver dependencies in Kconfig
- Add <cpu_func.h> to some platforms
- Fix a debug print in ftgmac100.cA
- Add parentheses around PSEUDO_HDR_SIZE
net-lwip:
- Fix build error with CONFIG_LWIP_DEBUG=y
- Remove eth_init() from net_init() as it is called later
- Simplify net_lwip_eth_start()
net-legacy:
- wget: Fix comparison of unsigned variable
- Incorrect macro used (TCP_0_NOP instead of TCP_1_NOP)
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e6fed8c41d7..9702d042296 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -9,6 +9,7 @@ */ #include <console.h> #include <dm.h> +#include <env.h> #include <log.h> #include <malloc.h> #include <net.h> @@ -242,7 +243,9 @@ int genphy_update_link(struct phy_device *phydev) if ((phydev->autoneg == AUTONEG_ENABLE) && !(mii_reg & BMSR_ANEGCOMPLETE)) { - int i = 0; + u32 i = 0; + u32 aneg_timeout = env_get_ulong("phy_aneg_timeout", 10, + CONFIG_PHY_ANEG_TIMEOUT); printf("%s Waiting for PHY auto negotiation to complete", phydev->dev->name); @@ -250,7 +253,7 @@ int genphy_update_link(struct phy_device *phydev) /* * Timeout reached ? */ - if (i > (CONFIG_PHY_ANEG_TIMEOUT / 50)) { + if (i > (aneg_timeout / 50)) { printf(" TIMEOUT !\n"); phydev->link = 0; return -ETIMEDOUT; |