[PATCH 2/2] nvmem: imx: Swap only the first 6 bytes of the MAC address

Fabio Estevam festevam at gmail.com
Fri Jul 11 05:05:16 PDT 2025


Hi Christian,

On Fri, Jul 11, 2025 at 9:01 AM Christian Eggers <ceggers at arri.de> wrote:
>
> Since commit 55d4980ce55b ("nvmem: core: support specifying both: cell
> raw data & post read lengths"), the aligned length (e.g. '8' instead of
> '6') is passed to the read_post_process callback. This causes that the 2
> bytes following the MAC address in the ocotp are swapped to the
> beginning of the address. As a result, an invalid MAC address is
> returned and to make it even worse, this address can be equal on boards
> with the same OUI vendor prefix.
>
> Fixes: 55d4980ce55b ("nvmem: core: support specifying both: cell raw data & post read lengths")
> Signed-off-by: Christian Eggers <ceggers at arri.de>
> Cc: stable at vger.kernel.org
> ---
> Tested on i.MX6ULL, but I assume that this is also required for.
> imx-ocotp-ele.c (i.MX93).

Steffen has recently sent a similar fix:

https://lore.kernel.org/linux-arm-kernel/20250708101206.70793-1-steffen@innosonix.de/

Does this work for you?



More information about the linux-arm-kernel mailing list