Skip to content

Commit 44ed1f5

Browse files
ISCAS-Vulabmiquelraynal
authored andcommitted
mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
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: 4be4e03 ("mtd: nand: sunxi: add randomizer support") Cc: [email protected] # v4.6 Signed-off-by: Wentao Liang <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent 528b541 commit 44ed1f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mtd/nand/raw/sunxi_nand.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,7 @@ static int sunxi_nfc_hw_ecc_write_chunk(struct nand_chip *nand,
10501050
if (ret)
10511051
return ret;
10521052

1053+
sunxi_nfc_randomizer_config(nand, page, false);
10531054
sunxi_nfc_randomizer_enable(nand);
10541055
sunxi_nfc_hw_ecc_set_prot_oob_bytes(nand, oob, 0, bbm, page);
10551056

0 commit comments

Comments
 (0)