From: Yao Zi <me@ziyao.cc>
To: "Johan Alvarado" <contact@c127.dev>, <davem@davemloft.net>,
<kuba@kernel.org>, <pabeni@redhat.com>, <edumazet@google.com>
Cc: <ggo@tuxedocomputers.com>, <andrew+netdev@lunn.ch>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: stmmac: dwmac-motorcomm: fix eFUSE MAC address read failure
Date: Mon, 6 Apr 2026 12:42:29 +0000 [thread overview]
Message-ID: <adOqNTRBOF2BQi_r@pie> (raw)
In-Reply-To: <4aaa214c-4286-4c24-ab5c-b17a3a1a8f1e@smtp-relay.sendinblue.com>
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 <me@ziyao.cc>
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 <ggo@tuxedocomputers.com>
> Closes: https://lore.kernel.org/all/24cfefff-1233-4745-8c47-812b502d5d19@tuxedocomputers.com/
> Signed-off-by: Johan Alvarado <contact@c127.dev>
prev parent reply other threads:[~2026-04-06 12:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 9:34 [PATCH RESEND net-next v6 0/3] Add DWMAC glue driver for Motorcomm YT6801 Yao Zi
2026-01-09 9:34 ` [PATCH RESEND net-next v6 1/3] net: phy: motorcomm: Support YT8531S PHY in YT6801 Ethernet controller Yao Zi
2026-01-09 10:06 ` Russell King (Oracle)
2026-01-09 9:34 ` [PATCH RESEND net-next v6 2/3] net: stmmac: Add glue driver for Motorcomm YT6801 ethernet controller Yao Zi
2026-01-12 6:10 ` Sai Krishna Gajula
2026-01-12 7:51 ` Yao Zi
2026-01-12 10:17 ` Russell King (Oracle)
2026-01-09 9:34 ` [PATCH RESEND net-next v6 3/3] MAINTAINERS: Assign myself as maintainer of Motorcomm DWMAC glue driver Yao Zi
2026-01-13 3:30 ` [PATCH RESEND net-next v6 0/3] Add DWMAC glue driver for Motorcomm YT6801 patchwork-bot+netdevbpf
2026-01-19 15:33 ` Georg Gottleuber
2026-01-19 15:43 ` Russell King (Oracle)
2026-01-19 17:45 ` Georg Gottleuber
2026-01-19 17:57 ` Georg Gottleuber
2026-01-20 2:45 ` Yao Zi
2026-01-20 9:42 ` Georg Gottleuber
2026-01-20 11:52 ` Yao Zi
2026-01-21 7:10 ` Xi Ruoyao
2026-04-06 7:44 ` [PATCH net] net: stmmac: dwmac-motorcomm: fix eFUSE MAC address read failure Johan Alvarado
2026-04-06 13:41 ` Andrew Lunn
[not found] ` <4aaa214c-4286-4c24-ab5c-b17a3a1a8f1e@smtp-relay.sendinblue.com>
2026-04-06 12:42 ` Yao Zi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adOqNTRBOF2BQi_r@pie \
--to=me@ziyao.cc \
--cc=andrew+netdev@lunn.ch \
--cc=contact@c127.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ggo@tuxedocomputers.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox