Re: [PATCH v5 3/5] net: of_net: Derive MAC addresses from a unique device ID
From: Alexey Charkov
Date: Mon Nov 30 2026 - 23:17:20 EST
On Tue, Dec 1, 2026 at 5:30 AM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > @@ -142,7 +239,11 @@ int of_get_mac_address(struct device_node *np, u8 *addr)
> > if (!ret)
> > return 0;
> >
> > - return of_get_mac_address_nvmem(np, addr);
> > + ret = of_get_mac_address_nvmem(np, addr);
> > + if (!ret || ret == -EPROBE_DEFER)
> > + return ret;
>
> You need to be careful here. There might be devices which currently
> work because they return EPROBE_DEFER here and try again later.
But that's exactly why I'm catching EPROBE_DEFER and returning it
immediately, so that the driver core can retry once the NVMEM cell
appears, instead of falling through to the next case. Am I missing
anything?
> Also, none of the other sources of the MAC address in this function
> special case it.
I don't think any of the others can defer, because they don't rely on
an external provider. While NVMEM relies on the nvmem driver, which
might be a module.
Best regards,
Alexey