X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_mtdif1.c;h=990e0fb7673801a3fd439f27163b118b9db5100c;hp=f4d35fc5a659900f62f191d3b0f366fb4c88329a;hb=fb246b6eb57f7a7bd318d12b0562ee8708404f25;hpb=3e5718ec7f0df7b76837d10583419b745cb27474 diff --git a/yaffs_mtdif1.c b/yaffs_mtdif1.c index f4d35fc..990e0fb 100644 --- a/yaffs_mtdif1.c +++ b/yaffs_mtdif1.c @@ -24,6 +24,7 @@ */ #include "yportenv.h" +#include "yaffs_trace.h" #include "yaffs_guts.h" #include "yaffs_packedtags1.h" #include "yaffs_tagscompat.h" /* for yaffs_CalcTagsECC */ @@ -36,7 +37,7 @@ /* Don't compile this module if we don't have MTD's mtd_oob_ops interface */ #if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17)) -const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.9 2009-03-06 17:20:52 wookey Exp $"; +const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.12 2010-01-11 04:06:46 charles Exp $"; #ifndef CONFIG_YAFFS_9BYTE_TAGS # define YTAG1_SIZE 8 @@ -102,8 +103,6 @@ int nandmtd1_WriteChunkWithTagsToNAND(yaffs_Device *dev, compile_time_assertion(sizeof(yaffs_PackedTags1) == 12); compile_time_assertion(sizeof(yaffs_Tags) == 8); - dev->nPageWrites++; - yaffs_PackTags1(&pt1, etags); yaffs_CalcTagsECC((yaffs_Tags *)&pt1); @@ -180,8 +179,6 @@ int nandmtd1_ReadChunkWithTagsFromNAND(yaffs_Device *dev, int retval; int deleted; - dev->nPageReads++; - memset(&ops, 0, sizeof(ops)); ops.mode = MTD_OOB_AUTO; ops.len = (data) ? chunkBytes : 0; @@ -336,9 +333,8 @@ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, /* We don't yet have a good place to test for MTD config prerequists. * Do it here as we are called during the initial scan. */ - if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK) { + if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK) return YAFFS_FAIL; - } retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags); etags.blockBad = (mtd->block_isbad)(mtd, addr);