X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=blobdiff_plain;f=target%2Flinux%2Fgeneric-2.6%2Ffiles%2Ffs%2Fyaffs2%2Fyaffs_nand.c;h=20e98afa01fe1be371486ed8ecf6735b18b03a6e;hp=db5ac8e382b69245fd1194dd0fdcc3c419b545d5;hb=796a9d1091884a07817e5c140d0ff6a0b8c76235;hpb=b78fbb9510cb5f9b682ffa1e59249f1c3429ea34 diff --git a/target/linux/generic-2.6/files/fs/yaffs2/yaffs_nand.c b/target/linux/generic-2.6/files/fs/yaffs2/yaffs_nand.c index db5ac8e38..20e98afa0 100644 --- a/target/linux/generic-2.6/files/fs/yaffs2/yaffs_nand.c +++ b/target/linux/generic-2.6/files/fs/yaffs2/yaffs_nand.c @@ -10,9 +10,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - + const char *yaffs_nand_c_version = - "$Id$"; #include "yaffs_nand.h" #include "yaffs_tagscompat.h" @@ -25,9 +24,9 @@ int yaffs_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, { int result; yaffs_ExtendedTags localTags; - + int realignedChunkInNAND = chunkInNAND - dev->chunkOffset; - + /* If there are no tags provided, use local tags to get prioritised gc working */ if(!tags) tags = &localTags; @@ -39,14 +38,14 @@ int yaffs_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, result = yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(dev, realignedChunkInNAND, buffer, - tags); - if(tags && + tags); + if(tags && tags->eccResult > YAFFS_ECC_RESULT_NO_ERROR){ - + yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, chunkInNAND/dev->nChunksPerBlock); yaffs_HandleChunkError(dev,bi); } - + return result; } @@ -57,7 +56,7 @@ int yaffs_WriteChunkWithTagsToNAND(yaffs_Device * dev, { chunkInNAND -= dev->chunkOffset; - + if (tags) { tags->sequenceNumber = dev->sequenceNumber; tags->chunkUsed = 1; @@ -131,4 +130,4 @@ int yaffs_InitialiseNAND(struct yaffs_DeviceStruct *dev) } - +