On Thu, 10 Sept 2026 at 14:19, phodina <[email protected]> wrote: > > On Thursday, September 10th, 2026 at 12:53 PM, Ilias Apalodimas > <[email protected]> wrote: > > > On Thu, 10 Sept 2026 at 13:09, phodina <[email protected]> wrote: > > > > > > Hi Ilias, > > > > > > On Wednesday, September 9th, 2026 at 9:18 AM, Ilias Apalodimas > > > <[email protected]> wrote: > > > > > > > Hi Petr, > > > > > > > > On Wed, 9 Sept 2026 at 09:27, Petr Hodina via B4 Relay > > > > <[email protected]> wrote: > > > > > > > > > > From: Petr Hodina <[email protected]> > > > > > > > > > > Gate the initr_net() INITCALL on CONFIG_NET_SKIP_BOOT_INIT at the > > > > > call site in initcall_run_r(), so boards with no wired NIC can skip > > > > > the boot-time probe and "Net:" banner without touching initr_net() > > > > > itself. > > > > > > > > > > Signed-off-by: Petr Hodina <[email protected]> > > > > > --- > > > > > initr_net() probes for Ethernet and prints a "Net:" banner when `NET` > > > > > option > > > > > is enabled, which is not relevant for boards that use USB gadgets > > > > > for networking. > > > > > > > > Why? Doesn't that eventually print 'Net: No ethernet found.' ? > > > > > > > > > > The current implementation runs the `INITCALL(initr_net)` code only if > > > the `NET` > > > option is enabled. Otherwise you don't run it and initialize the Ethernet > > > interface > > > by calling `eth_initialize`. > > > > > > Given that the board doesn't have a physical NIC (on a mobile device) but > > > still > > > the networking stack is required wouldn't it be better to also skip > > > initialization > > > of peripheral that's not present? > > > > But that initialization is a single call that will exit immediately in > > uclass_first_device_check() no? > > > > Here are 3 items of concern behind the new config options: > Note this option is mainly targeted at mobile devices. > > 1. Print noise as "Net: " + log_err("No ethernet found.\n") will be > suppressed. > > 2. Entry into eth_initialize() > NET_SKIP_BOOT_INIT gates the INITCALL(initr_net) call site in board_r.c > therefore the function never gets called at all (like if the NET is not > enabled), > not just that its internal probe returns fast. > > 3. Rationale for keeping it decoupled > On mobile devices getting USB Ethernet up for PXE boot is genuinely useful > (CI can > netboot a device with no wired NIC) but that bring-up is inherently > board/gadget > specific. For the same reason this patch skips the wired NIC probe the USB > RNDIS/CDC > gadget bring up shouldn't happen at this boot stage either (not intending > to introduce > that) or print any log statement.
Yes, I understand all the points above. But personally I don't think we need another extra Kconfig option to guard against a print and a function call that returns immediately. Thanks /Ilias >
