From patchwork Wed Apr 1 09:53:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [resending,MTD,NAND] nand_ecc.c: Bug fix in nand ecc Date: Tue, 31 Mar 2009 23:53:52 -0000 From: "Singh, Vimal" X-Patchwork-Id: 25480 Message-Id: <34437.192.168.10.89.1238579632.squirrel@dbdmail.itg.ti.com> To: linux-mtd@lists.infradead.org I do not see this patch on tree, yet. ------------------------------ Original Message ------------------------------- Subject: [PATCH] [MTD] [NAND] nand_ecc.c: Bug fix in nand ecc From: "vimal singh" Date: Mon, February 23, 2009 1:46 pm To: linux-mtd@lists.infradead.org ------------------------------------------------------------------------------- Type of 'byte_addr' needed to change for 512 byte ecc support. Signed-off-by: Vimal Singh --- (((struct nand_chip *)mtd->priv)->ecc.size) >> 8; diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index 868147a..6b19058 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c @@ -429,7 +429,8 @@ int nand_correct_data(struct mtd_info *mtd, unsigned char *buf, unsigned char *read_ecc, unsigned char *calc_ecc) { unsigned char b0, b1, b2; - unsigned char byte_addr, bit_addr; + uint32_t byte_addr; + unsigned char bit_addr; /* 256 or 512 bytes/ecc */ const uint32_t eccsize_mult =