Subject: Re: [PATCH net] net: stmmac: dwmac-motorcomm: fix eFUSE MAC address read failure

From: Yao Zi <[email-masked]>
Date: Mon, 6 Apr 2026 12:42:29 +0000

On Mon, Apr 06, 2026 at 07:44:25AM +0000, Johan Alvarado wrote:
> 
> This patch fixes an issue where reading the MAC address from the eFUSE
> fails due to a race condition.
> 
> The root cause was identified by comparing the driver's behavior with a
> custom U-Boot port. In U-Boot, the MAC address was read successfully
> every time because the driver was loaded later in the boot process, giving
> the hardware ample time to initialize. In Linux, reading the eFUSE
> immediately returns all zeros, resulting in a fallback to a random MAC address.
> 
> Hardware cold-boot testing revealed that the eFUSE controller requires a
> short settling time to load its internal data. Adding a 2000-5000us
> delay after the reset ensures the hardware is fully ready, allowing the
> native MAC address to be read consistently.

Sounds like a reasonable explanation. The vendor driver reads MAC
address from eFuse before issuing a system reset, which explains why
this doesn't reproduce on it. However, I'd prefer your approach which
ensures a clean hardware state before any operations are performed.

I'm currently on travel thus couldn't verify it against real hardware,
but here's mine tag,

Reviewed-by: Yao Zi <[email-masked]>

Much thanks for investigating into it.

Best regards,
Yao Zi

> Fixes: 02ff155ea281 ("net: stmmac: Add glue driver for Motorcomm YT6801 ethernet controller")
> Reported-by: Georg Gottleuber <[email-masked]>
> Closes: https://lore.kernel.org/all/[email-masked]/
> Signed-off-by: Johan Alvarado <[email-masked]>