X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ea9f57570dd3f50535d8fd720153a88cefb7096b..e6a2f81c9cf8a6749cde3ea640150c2c496971b7:/target/linux/generic-2.6/files/fs/yaffs2/yaffs_nand.c?ds=inline 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 c33483c35..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: yaffs_nand.c,v 1.7 2007-02-14 01:09:06 wookey Exp $"; #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) } - +