You need to sign in or sign up before continuing.
提交 8fce6f0e 编写于 作者: M Miquel Raynal 提交者: Yang Yingliang

mtd: spinand: Propagate ECC information to the MTD structure

[ Upstream commit 3507273d5a4d3c2e46f9d3f9ed9449805f5dff07 ]

This is done by default in the raw NAND core (nand_base.c) but was
missing in the SPI-NAND core. Without these two lines the ecc_strength
and ecc_step_size values are not exported to the user through sysfs.

Fixes: 7529df46 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: stable@vger.kernel.org
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 ebafb2b0
...@@ -1045,6 +1045,10 @@ static int spinand_init(struct spinand_device *spinand) ...@@ -1045,6 +1045,10 @@ static int spinand_init(struct spinand_device *spinand)
mtd->oobavail = ret; mtd->oobavail = ret;
/* Propagate ECC information to mtd_info */
mtd->ecc_strength = nand->eccreq.strength;
mtd->ecc_step_size = nand->eccreq.step_size;
return 0; return 0;
err_cleanup_nanddev: err_cleanup_nanddev:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册