> eth_init() overwrites the error from eth_start_udev() with eth_errno,
> which may still be zero after a successful device probe. This can
> report success even when no Ethernet device could be started, causing
> DHCP to enter the BOOTP retry loop instead of failing immediately.
>
> Preserve the return value from eth_start_udev() so that callers can
> detect the initialization failure.
>
> Signed-off-by: Terry Zhou (Synaptics) <[email protected]>
> ---
> Validated using downstream SDK U-Boot on Synaptics VS640 and SL2610
> Without the fix, driver startup errors are followed by BOOTP retries.
> With the fix, DHCP fails without entering the BOOTP retry loop.
> DHCP succeeds with the cable connected.
>
>  net/eth-uclass.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied to u-boot-net branch for-main [1], thanks!

[1] 
https://git.u-boot-project.org/u-boot/custodians/u-boot-net/-/commits/for-main

[1/1] net: preserve the driver error in eth_init()
      commit: 59068d4817767bf94bddcc38bb0f08e60638c4d1

Best regards,
-- 
Jerome Forissier <[email protected]>

Reply via email to