mtd/drivers/mtd/nand nand_base.c,1.140,1.141
dbrown at infradead.org
dbrown at infradead.org
Wed Apr 6 16:13:09 EDT 2005
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv17791
Modified Files:
nand_base.c
Log Message:
Fix reading of autoplaced OOB when there are multiple free sections.
Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- nand_base.c 4 Apr 2005 18:56:29 -0000 1.140
+++ nand_base.c 6 Apr 2005 20:13:05 -0000 1.141
@@ -1285,13 +1285,12 @@
switch(oobsel->useecc) {
case MTD_NANDECC_AUTOPLACE:
/* Walk through the autoplace chunks */
- for (i = 0, j = 0; j < mtd->oobavail; i++) {
+ for (i = 0; oobsel->oobfree[i][1]; i++) {
int from = oobsel->oobfree[i][0];
int num = oobsel->oobfree[i][1];
memcpy(&oob_buf[oob], &oob_data[from], num);
- j+= num;
+ oob += num;
}
- oob += mtd->oobavail;
break;
case MTD_NANDECC_PLACE:
/* YAFFS1 legacy mode */
More information about the linux-mtd-cvs
mailing list