Hi Tom: Yes, I checked that the base commit includes ff448fa9a1b8. I re-tested its change with and without my fix using downstream SDK U-Boot on VS640 and SL2610, rather than running the exact mainline base on hardware since these boards are not supported in mainline yet,
We are now adding SL2610 into U-Boot, below is the first patch from Richard GENOUD <[email protected]>. But only few interfaces are ready in it: https://lore.kernel.org/all/[email protected]/ ff448fa9a1b8 sets eth_errno when device_active() is false. In the failures I reproduced, however, the device is active and the driver's start() callback fails. eth_start_udev() returns that error without updating eth_errno, which remains zero. With ff448fa9a1b8 alone, the diagnostics showed: VS640: start_ret=-5, eth_errno=0, active=1 SL2610: start_ret=-110, eth_errno=0, active=1 In both cases, eth_init() overwrote the error with zero, and DHCP continued with 17 BOOTP attempts before timing out. With my patch added, DHCP failed at initialization without entering the BOOTP retry loop. Thanks, Terry On Mon, Oct 26, 2026 at 10:29 PM Tom Rini <[email protected]> wrote: > > On Mon, Oct 26, 2026 at 10:11:37AM +0100, Terry Zhou (Synaptics) wrote: > > > 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(-) > > > > diff --git a/net/eth-uclass.c b/net/eth-uclass.c > > index 07ec59b97f0..18efbfeda71 100644 > > --- a/net/eth-uclass.c > > +++ b/net/eth-uclass.c > > @@ -349,9 +349,7 @@ int eth_init(void) > > debug("Trying %s\n", current->name); > > > > ret = eth_start_udev(current); > > - if (ret < 0) > > - ret = eth_errno; > > - else > > + if (!ret) > > break; > > > > debug("FAIL\n"); > > > > base-commit: 8649a54d301a4d0ac526324c7a7ad2574939ff27 > > Did you re-validate this on your base-commit? The base-commit is after > ff448fa9a1b8 ("u-boot: fix error check in eth init") which I believe > evolved from a patch that looked like the above at first. Thanks. > > -- > Tom
