linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: sunxi: Add randomizer configuration before randomizer enable
@ 2025-05-19 15:42 Wentao Liang
  2025-05-20 15:35 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2025-05-19 15:42 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr, wens, jernej.skrabec, samuel,
	ruanjinjie, u.kleine-koenig
  Cc: linux-mtd, linux-arm-kernel, linux-sunxi, linux-kernel,
	Wentao Liang, stable

In sunxi_nfc_hw_ecc_read_chunk(), the sunxi_nfc_randomizer_enable() is
called without the config of randomizer. A proper implementation can be
found in sunxi_nfc_hw_ecc_read_chunks_dma().

Add sunxi_nfc_randomizer_config() before the start of randomization.

Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support")
Cc: stable@vger.kernel.org # v4.6
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/mtd/nand/raw/sunxi_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index fab371e3e9b7..9179719f639e 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -817,6 +817,7 @@ static int sunxi_nfc_hw_ecc_read_chunk(struct nand_chip *nand,
 	if (ret)
 		return ret;
 
+	sunxi_nfc_randomizer_config(nand, page, false);
 	sunxi_nfc_randomizer_enable(nand);
 	writel(NFC_DATA_TRANS | NFC_DATA_SWAP_METHOD | NFC_ECC_OP,
 	       nfc->regs + NFC_REG_CMD);
-- 
2.42.0.windows.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: nand: sunxi: Add randomizer configuration before randomizer enable
  2025-05-19 15:42 [PATCH] mtd: nand: sunxi: Add randomizer configuration before randomizer enable Wentao Liang
@ 2025-05-20 15:35 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2025-05-20 15:35 UTC (permalink / raw)
  To: richard, vigneshr, wens, jernej.skrabec, samuel, ruanjinjie,
	u.kleine-koenig, Wentao Liang
  Cc: linux-mtd, linux-arm-kernel, linux-sunxi, linux-kernel, stable

On Mon, 19 May 2025 23:42:24 +0800, Wentao Liang wrote:
> In sunxi_nfc_hw_ecc_read_chunk(), the sunxi_nfc_randomizer_enable() is
> called without the config of randomizer. A proper implementation can be
> found in sunxi_nfc_hw_ecc_read_chunks_dma().
> 
> Add sunxi_nfc_randomizer_config() before the start of randomization.
> 
> 
> [...]

Applied to nand/next, thanks!

[1/1] mtd: nand: sunxi: Add randomizer configuration before randomizer enable
      commit: 4a5a99bc79cdc4be63933653682b0261a67a0c9f

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-20 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-19 15:42 [PATCH] mtd: nand: sunxi: Add randomizer configuration before randomizer enable Wentao Liang
2025-05-20 15:35 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).