lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96f2c395-82f0-4399-be3b-6b0e3f07f90e@lunn.ch>
Date: Thu, 22 Jan 2026 14:09:14 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Stefan Eichenberger <eichest@...il.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, mcoquelin.stm32@...il.com,
	alexandre.torgue@...s.st.com, shawnguo@...nel.org,
	s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
	hkallweit1@...il.com, linux@...linux.org.uk,
	linux-stm32@...md-mailman.stormreply.com,
	maxime.chevallier@...tlin.com, francesco.dolcini@...adex.com,
	netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	imx@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Stefan Eichenberger <stefan.eichenberger@...adex.com>
Subject: Re: [PATCH net-next v3 3/3] net: stmmac: dwmac-imx: keep preamble
 before sfd on i.MX8MP

On Tue, Jan 20, 2026 at 09:30:04PM +0100, Stefan Eichenberger wrote:
> From: Stefan Eichenberger <stefan.eichenberger@...adex.com>
> 
> The stmmac implementation used by NXP for the i.MX8MP SoC is subject to
> errata ERR050694. According to this errata, when no preamble byte is
> transferred before the SFD from the PHY to the MAC, the MAC will discard
> the frame.
> 
> Setting the PHY_F_KEEP_PREAMBLE_BEFORE_SFD flag instructs PHYs that
> support it to keep the preamble byte before the SFD. This ensures that
> the MAC successfully receives frames.
> 
> As this is an issue in the MAC implementation, only enable the flag for
> the i.MX8MP SoC where the errata applies but not for other SoCs using a
> working stmmac implementation.
> 
> The exact wording of the errata ERR050694 from NXP:
> The IEEE 802.3 standard states that, in MII/GMII modes, the byte
> preceding the SFD (0xD5), SMD-S (0xE6,0x4C, 0x7F, or 0xB3), or SMD-C
> (0x61, 0x52, 0x9E, or 0x2A) byte can be a non-PREAMBLE byte or there can
> be no preceding preamble byte. The MAC receiver must successfully
> receive a packet without any preamble(0x55) byte preceding the SFD,
> SMD-S, or SMD-C byte.
> However due to the defect, in configurations where frame preemption is
> enabled, when preamble byte does not precede the SFD, SMD-S, or SMD-C
> byte, the received packet is discarded by the MAC receiver. This is
> because, the start-of-packet detection logic of the MAC receiver
> incorrectly checks for a preamble byte.
> 
> NXP refers to IEEE 802.3 where in clause 35.2.3.2.2 Receive case (GMII)
> they show two tables one where the preamble is preceding the SFD and one
> where it is not. The text says:
> The operation of 1000 Mb/s PHYs can result in shrinkage of the preamble
> between transmission at the source GMII and reception at the destination
> GMII. Table 35-3 depicts the case where no preamble bytes are conveyed
> across the GMII. This case may not be possible with a specific PHY, but
> illustrates the minimum preamble with which MAC shall be able to
> operate. Table 35-4 depicts the case where the entire preamble is
> conveyed across the GMII.
> 
> This workaround was tested on a Verdin iMX8MP by enforcing 10 MBit/s:
> ethtool -s end0 speed 10
> Without keeping the preamble, no packet were received. With keeping the
> preamble, everything worked as expected.
> 
> Signed-off-by: Stefan Eichenberger <stefan.eichenberger@...adex.com>

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ