yaffs: Improve debug chunk erased checking, change refreshPeriod
[yaffs2.git] / yaffs_mtdif2.c
index 8cbe19f37b2500d3bea737a1c182b600e2abb4e6..c1d447819970e7ccab5a81bc0e7b576ae807b233 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2007 Aleph One Ltd.
+ * Copyright (C) 2002-2010 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -13,9 +13,6 @@
 
 /* mtd interface for YAFFS2 */
 
-const char *yaffs_mtdif2_c_version =
-       "$Id: yaffs_mtdif2.c,v 1.27 2010-02-18 01:18:04 charles Exp $";
-
 #include "yportenv.h"
 #include "yaffs_trace.h"
 
@@ -182,8 +179,14 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev, int chunkInNAND,
        if (localData)
                yaffs_ReleaseTempBuffer(dev, data, __LINE__);
 
-       if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
+       if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) {
                tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
+               dev->eccUnfixed++;
+       }
+       if(tags && retval == -EUCLEAN && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) {
+               tags->eccResult = YAFFS_ECC_RESULT_FIXED;
+               dev->eccFixed++;
+       }
        if (retval == 0)
                return YAFFS_OK;
        else