提交 917cc594 编写于 作者: K Kamal Dasu 提交者: Miquel Raynal

mtd: rawnand: brcmnand: Fix BCH ECC layout for large page NAND parts

The way oobregion->offset is derived for large page NAND parts is
wrong, fixes it.

Fixes: ef5eeea6 ("mtd: nand: brcm: switch to mtd_ooblayout_ops")
Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
上级 855eff21
......@@ -931,7 +931,7 @@ static int brcmnand_bch_ooblayout_ecc(struct mtd_info *mtd, int section,
if (section >= sectors)
return -ERANGE;
oobregion->offset = (section * (sas + 1)) - chip->ecc.bytes;
oobregion->offset = ((section + 1) * sas) - chip->ecc.bytes;
oobregion->length = chip->ecc.bytes;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册