projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Examine etags.eccResult before looking at etags.chunkUsed during query.
[yaffs2.git]
/
yaffs_mtdif1.c
diff --git
a/yaffs_mtdif1.c
b/yaffs_mtdif1.c
index c3c2436d759ee4a593afeb2b5b1927257c94ac6e..c5a02c7bf0d1b45588705321c2bf825e464c156a 100644
(file)
--- a/
yaffs_mtdif1.c
+++ b/
yaffs_mtdif1.c
@@
-36,7
+36,7
@@
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
-const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.
3 2007-10-01 19:40:33
imcd Exp $";
+const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.
4 2007-10-01 19:43:12
imcd Exp $";
#ifndef CONFIG_YAFFS_9BYTE_TAGS
# define YTAG1_SIZE 8
#ifndef CONFIG_YAFFS_9BYTE_TAGS
# define YTAG1_SIZE 8
@@
-347,6
+347,10
@@
int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
"block %d is marked bad", blockNo);
state = YAFFS_BLOCK_STATE_DEAD;
}
"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;
else if (etags.chunkUsed) {
state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
seqnum = etags.sequenceNumber;