- if (pt->t.sequenceNumber != 0xFFFFFFFF) {
- /* Page is in use */
-#ifdef YAFFS_IGNORE_TAGS_ECC
- {
- t->eccResult = YAFFS_ECC_RESULT_NO_ERROR;
- }
-#else
- {
- yaffs_ECCOther ecc;
- int result;
- yaffs_ECCCalculateOther((unsigned char *)&pt->t,
- sizeof
- (yaffs_PackedTags2TagsPart),
- &ecc);
- result =
- yaffs_ECCCorrectOther((unsigned char *)&pt->t,
- sizeof
- (yaffs_PackedTags2TagsPart),
- &pt->ecc, &ecc);
- switch(result){
- case 0:
- t->eccResult = YAFFS_ECC_RESULT_NO_ERROR;
- break;
- case 1:
- t->eccResult = YAFFS_ECC_RESULT_FIXED;
- break;
- case -1:
- t->eccResult = YAFFS_ECC_RESULT_UNFIXED;
- break;
- default:
- t->eccResult = YAFFS_ECC_RESULT_UNKNOWN;
- }
+ if (pt->t.sequenceNumber != 0xFFFFFFFF &&
+ tagsECC){
+ /* Chunk is in use and we need to do ECC */
+
+ yaffs_ECCOther ecc;
+ int result;
+ yaffs_ECCCalculateOther((unsigned char *)&pt->t,
+ sizeof(yaffs_PackedTags2TagsPart),
+ &ecc);
+ result = yaffs_ECCCorrectOther((unsigned char *)&pt->t,
+ sizeof(yaffs_PackedTags2TagsPart),
+ &pt->ecc, &ecc);
+ switch (result) {
+ case 0:
+ eccResult = YAFFS_ECC_RESULT_NO_ERROR;
+ break;
+ case 1:
+ eccResult = YAFFS_ECC_RESULT_FIXED;
+ break;
+ case -1:
+ eccResult = YAFFS_ECC_RESULT_UNFIXED;
+ break;
+ default:
+ eccResult = YAFFS_ECC_RESULT_UNKNOWN;