[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1556306615-37990-1-git-send-email-kdasu.kdev@gmail.com>
Date: Fri, 26 Apr 2019 15:22:26 -0400
From: Kamal Dasu <kdasu.kdev@...il.com>
To: linux-mtd@...ts.infradead.org
Cc: bcm-kernel-feedback-list@...adcom.com,
linux-kernel@...r.kernel.org, Kamal Dasu <kdasu.kdev@...il.com>,
Brian Norris <computersforpeace@...il.com>,
Boris Brezillon <bbrezillon@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
David Woodhouse <dwmw2@...radead.org>,
Marek Vasut <marek.vasut@...il.com>
Subject: [PATCH] mtd: rawnand: brcmnand: fix bch ecc layout for large page nand
The oobregion->offset for large page nand parts was wrong, change
fixes this error in calculation.
Signed-off-by: Kamal Dasu <kdasu.kdev@...il.com>
---
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 482c6f0..3eefea7 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -939,7 +939,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;
--
1.9.0.138.g2de3478
Powered by blists - more mailing lists