OneNAND: Rate of write errors

Adrian Hunter ext-adrian.hunter at nokia.com
Thu Feb 22 04:28:57 EST 2007


ext Julianne C. wrote:
> We are still struggling to understand and manage the OneNAND part on a
> LogicPD PXA270 board.  We are using the mtd development snapshot build
> of 2-15-07 for the fs and device layers.  Our requirements lead us to
> use JFFS2 as the file system.
> 
> What we are seeing is that when we write to a file system that is
> freshly erased and mounted using the command:
>> mount -t jffs2 /dev/mtdblockx /mnt
> and then performing some operation like tar or rsync to place files in
> the new fs, we see about 5 to 8 "write errors" of the form per MB:
> 
> onenand_write: verify failed -74
> Write of 2663 bytes at 0x007a6e14 failed. returned -74, retlen 0
> Not marking the space at 0x007a6e14 as dirty because the flash driver
> returned retlen zero

Note that verify errors will not occur if you have ECC turned on because
you will get ECC errors instead, in which case I would say the block
is bad.  Possibly you have inadvertently removed a bad block marker.

The other possibility is that the data is not making it to OneNAND
correctly in the first place.  By default this is done by
onenand_write_bufferram.  You could add a comparison to be sure.

Also I guess jffs2 would be happier if the length was returned
when the verify fails, say like this:

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 1a38414..8fc1570 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1238,6 +1238,8 @@ static int onenand_write(struct mtd_info
 			break;
 		}
 
+		written += thislen;
+
 		/* Only check verify write turn on */
 		ret = onenand_verify(mtd, (u_char *) wbuf, to, thislen);
 		if (ret) {
@@ -1245,8 +1247,6 @@ static int onenand_write(struct mtd_info
 			break;
 		}
 
-		written += thislen;
-
 		if (written == len)
 			break;
 



> Is this common to see this many errors in that amount of page writes?

Not in my experience with OneNAND.






More information about the linux-mtd mailing list