Skip to contentSkip to conversation

mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome

PATCH Applied Boris BREZILLON 2 participants 2 messages Feb 1, 2014 – Feb 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: fix erronous read_buf call in nand_write_page_raw_syndrome

read_buf is called in place of write_buf in the
nand_write_page_raw_syndrome function.

---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/nand_base.c +1 -1
index 15069ec..f59a465 100644
@@ -1902,7 +1902,7 @@ static int nand_write_page_raw_syndrome(struct mtd_info *mtd,
 			oob += chip->ecc.prepad;
 		}
 
-		chip->read_buf(mtd, oob, eccbytes);
+		chip->write_buf(mtd, oob, eccbytes);
 		oob += eccbytes;
 
 		if (chip->ecc.postpad) {
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 4 lines · Boris BREZILLON

read_buf is called in place of write_buf in the
nand_write_page_raw_syndrome function.

Good catch! I guess no one really tests this function. I can understand that, since it's in the "raw" version (i.e., without ECC), which should really only be used for special debugging purposes. And many drivers don't use the defaults for page writes.

Pushed to l2-mtd.git.

Brian