From nobody Sun Jun 14 20:20:37 2026 Received: from id.d.sender-sib.com (id.d.sender-sib.com [77.32.148.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA27D29C325 for ; Mon, 6 Apr 2026 07:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.32.148.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775461571; cv=none; b=E90ZYpM9c9ZWvVii+p/nlgdyXREyS765dufwHx7NlsD6D629nEir5715ChpevRjmRXixMykJznlNhvRRnBMp728rocflAtrTR6kdO6I28EmdyCSS75FG8NaY/1vLEaAzQQjSOwhEXzYnuER+cHPoxPn74Gf+ZBrwBhC4k0FYE3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775461571; c=relaxed/simple; bh=N290AWiFEHAAiPU29ssnlMzp/XNYahkGwbt5U10QA/E=; h=From:Date:Subject:Message-Id:To:Mime-Version:In-Reply-To:Cc: References; b=uJkHhgJqFQOEtlmLUBMXQ3ZlEpPqWsYmSgOi3I/xGHYMSVTKUvPpEfHeWiXd1QQYOX+YZv92VX3xNKJI/lUUam3FiRmKSuyg/yoNt6tZkLHGvm9BsVTIWbmKZ1OG2/c2NOVLEPo+xmcU9Ra5PLECXkua3Fimoe9QGXvZr5Va06c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c127.dev; spf=pass smtp.mailfrom=id.d.sender-sib.com; dkim=pass (1024-bit key) header.d=c127.dev header.i=@c127.dev header.b=x7kMbYPk; arc=none smtp.client-ip=77.32.148.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c127.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=id.d.sender-sib.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=c127.dev header.i=@c127.dev header.b="x7kMbYPk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c127.dev; q=dns/txt; s=mail; bh=9qBxcin593450fPqTE2zgVJwATrkI1D81Rr9zKWIaJY=; h=from:subject:date:to:cc:mime-version:content-transfer-encoding:in-reply-to:references:list-unsubscribe:x-csa-complaints:list-unsubscribe-post:message-id:x-sib-id:feedback-id; b=x7kMbYPk1Ao3YtI2Ii3bdlguzWVGDAM3mqMZ3BqTMnbqx+WfJ/L8F6Uckq4/frVce0FDNTmnF8p0 BQPJCcQIVVq7QrvgZu6zo3U2uVGwEdoKxwguPt0ZGGG5ie37PtwqAMYGK0+lxTDbukGeq7XI7WgV KflSg2BTZSG5YwxUnU8= From: "Johan Alvarado" Date: Mon, 6 Apr 2026 07:44:25 +0000 Subject: [PATCH net] net: stmmac: dwmac-motorcomm: fix eFUSE MAC address read failure Message-Id: <22e2a606-ce4c-4e96-ae97-dbe29c3583e7@smtp-relay.sendinblue.com> Origin-messageId: <20260406074425.15947-1-contact@c127.dev> List-Unsubscribe-Post: List-Unsubscribe=One-Click Feedback-ID: 77.32.148.56:6940426_-1:6940426:Sendinblue X-CSA-Complaints: csa-complaints@eco.de X-Mailin-EID: MjQyODY3MzE0fmxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmd%2BPDIwMjYwNDA2MDc0NDI1LjE1OTQ3LTEtY29udGFjdEBjMTI3LmRldj5%2BaWQuZC5zZW5kZXItc2liLmNvbQ%3D%3D To: ,,,, X-sib-id: Ezi7Vozj8cmWXzYephNcO4IYnjAuZDTuE223A5j38rYpC8GOxqKvcHJbLxm1VM2exfkKQupAxNlZRlzWjisbjSKdw6KFQa3tFQ1f-WnU3-3L4M02XtUAXuhHBuSXCzUvSGatdJsSah8jE33NQk-PZOh19ZKvd_Bh-u5BNEqHvZHZxUO0ezDzNxa7 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 In-Reply-To: <24cfefff-1233-4745-8c47-812b502d5d19@tuxedocomputers.com> Content-Transfer-Encoding: quoted-printable Cc: , , , X-Mailer: git-send-email 2.53.0 References: <24cfefff-1233-4745-8c47-812b502d5d19@tuxedocomputers.com> Content-Type: text/plain; charset="utf-8" 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 addr= ess. 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. Fixes: 02ff155ea281 ("net: stmmac: Add glue driver for Motorcomm YT6801 eth= ernet controller") Reported-by: Georg Gottleuber Closes: https://lore.kernel.org/all/24cfefff-1233-4745-8c47-812b502d5d19@tu= xedocomputers.com/ Signed-off-by: Johan Alvarado --- drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c b/driver= s/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c index 8b45b9cf7202..663d87ccfa0f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c @@ -6,6 +6,7 @@ */ =20 #include +#include #include #include #include @@ -334,6 +335,13 @@ static int motorcomm_probe(struct pci_dev *pdev, const= struct pci_device_id *id) =20 motorcomm_reset(priv); =20 + /* + * After system reset, the eFuse controller needs time to load + * its internal data. Without this delay, eFuse reads return + * all zeros, causing MAC address detection to fail. + */ + usleep_range(2000, 5000); + ret =3D motorcomm_efuse_read_mac(&pdev->dev, priv, res.mac); if (ret =3D=3D -ENOENT) { dev_warn(&pdev->dev, "eFuse contains no valid MAC address\n"); --=20 2.53.0