Mercurial > yaffs-ecoscentric
changeset 198:d26c7ca13430
Examine etags.eccResult before looking at etags.chunkUsed during query.
Set block status to SCANNING if we have a bad eccResult.
| author | imcd |
|---|---|
| date | Mon, 01 Oct 2007 20:43:12 +0100 |
| parents | 43f352d1d160 |
| children | 4551d577f9bb |
| files | yaffs_mtdif1.c |
| diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/yaffs_mtdif1.c +++ b/yaffs_mtdif1.c @@ -347,6 +347,10 @@ int nandmtd1_QueryNANDBlock(struct yaffs "block %d is marked bad", blockNo); state = YAFFS_BLOCK_STATE_DEAD; } + else if (etags.eccResult != YAFFS_ECC_RESULT_NO_ERROR) { + /* bad tags, need to look more closely */ + state = YAFFS_BLOCK_STATE_NEEDS_SCANNING; + } else if (etags.chunkUsed) { state = YAFFS_BLOCK_STATE_NEEDS_SCANNING; seqnum = etags.sequenceNumber;
