[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3e16b2f5-5aeb-4988-bf6f-63c7309f53a4@linaro.org>
Date: Tue, 10 Dec 2024 13:52:14 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Sascha Hauer <s.hauer@...gutronix.de>, Shawn Guo <shawnguo@...nel.org>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Peng Fan <peng.fan@....com>
Cc: imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, stable <stable@...nel.org>
Subject: Re: [PATCH v2 0/4] nvmem: imx-ocotp-ele: fix reading from ELE OCOTP
On 02/12/2024 11:22, Sascha Hauer wrote:
> Commits b2ab0edaf484 ("arm64: dts: imx93: add nvmem property for fec1")
> and 0d4fbaffbdca ("arm64: dts: imx93: add nvmem property for eqos")
> introduced NVMEM cell bindings for reading MAC addresses from the ELE
> OCOTP. This doesn't work as expected due to bugs in the driver:
>
> - imx_ocotp_reg_read() interprets the incoming offset as 32bit word
> offset, but it really is in bytes which means the driver reads bogus
> values whenever the offset is non zero
> - imx_ocotp_reg_read() reads wrong results when the offset is not 32bit
> word aligned
> - MAC addresses are stored in reverse byte order in the ELE OCOTP, we
> have to swap the order before passing them to the upper layer
>
> This likely went through unnoticed because the bootloader normally adds
> the MAC addresses to the ethernet nodes and in this case they are
> preferred over the NVMEM addresses.
>
> This series fixes these issues.
>
> Sascha
>
> Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
> ---
> Changes in v2:
> - Add Fixes: and Cc: stable tag as requested by Fabio
> - Link to v1: https://lore.kernel.org/r/20241023-imx-ele-ocotp-fixes-v1-0-4adc00ce288f@pengutronix.de
>
> ---
> Sascha Hauer (4):
> nvmem: imx-ocotp-ele: simplify read beyond device check
> nvmem: imx-ocotp-ele: fix reading from non zero offset
> nvmem: imx-ocotp-ele: fix MAC address byte order
> nvmem: imx-ocotp-ele: set word length to 1
Applied thanks,
--srini
>
> drivers/nvmem/imx-ocotp-ele.c | 38 +++++++++++++++++++++++++++++++-------
> 1 file changed, 31 insertions(+), 7 deletions(-)
> ---
> base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
> change-id: 20241023-imx-ele-ocotp-fixes-f7b216171e1e
>
> Best regards,
Powered by blists - more mailing lists