linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: richard@nod.at,  vigneshr@ti.com,  wens@csie.org,
	jernej.skrabec@gmail.com,  samuel@sholland.org,
	 ruanjinjie@huawei.com, u.kleine-koenig@baylibre.com,
	 linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev,  stable@vger.kernel.org
Subject: Re: [PATCH] mtd: nand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
Date: Mon, 26 May 2025 10:12:09 +0200	[thread overview]
Message-ID: <8734cr3i5i.fsf@bootlin.com> (raw)
In-Reply-To: <20250526034344.517-1-vulab@iscas.ac.cn> (Wentao Liang's message of "Mon, 26 May 2025 11:43:44 +0800")

Hi Liang,

On 26/05/2025 at 11:43:44 +08, Wentao Liang <vulab@iscas.ac.cn> wrote:

> The function sunxi_nfc_hw_ecc_write_chunk() calls the
> sunxi_nfc_hw_ecc_write_chunk(), but does not call the configuration
> function sunxi_nfc_randomizer_config(). Consequently, the randomization
> might not conduct correctly, which will affect the lifespan of NAND flash.
> A proper implementation can be found in sunxi_nfc_hw_ecc_write_page_dma().
>
> Add the sunxi_nfc_randomizer_config() to config randomizer.
>
> 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 9179719f639e..162cd5f4f234 100644
> --- a/drivers/mtd/nand/raw/sunxi_nand.c
> +++ b/drivers/mtd/nand/raw/sunxi_nand.c
> @@ -1050,6 +1050,7 @@ static int sunxi_nfc_hw_ecc_write_chunk(struct nand_chip *nand,
>  	if (ret)
>  		return ret;
>  
> +	sunxi_nfc_randomizer_config(nand, page, false);
>  	sunxi_nfc_randomizer_enable(nand);
>  	sunxi_nfc_hw_ecc_set_prot_oob_bytes(nand, oob, 0, bbm, page);

Please next time send all these "identical" changes in a single patch.

Cheers,
Miquèl



  reply	other threads:[~2025-05-26  8:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26  3:43 [PATCH] mtd: nand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk Wentao Liang
2025-05-26  8:12 ` Miquel Raynal [this message]
2025-05-26  9:31 ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734cr3i5i.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=richard@nod.at \
    --cc=ruanjinjie@huawei.com \
    --cc=samuel@sholland.org \
    --cc=stable@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=vigneshr@ti.com \
    --cc=vulab@iscas.ac.cn \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).