- 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;
-
- if (dev->readChunkWithTagsFromNAND)
- result = dev->readChunkWithTagsFromNAND(dev, realignedChunkInNAND, buffer,
- tags);
- else
- result = yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(dev,
- realignedChunkInNAND,
- buffer,
- tags);
- if(tags &&
- tags->eccResult > YAFFS_ECC_RESULT_NO_ERROR){
-
- yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, chunkInNAND/dev->nChunksPerBlock);
- bi->gcPrioritise = 1;
- dev->hasPendingPrioritisedGCs = 1;
+ struct yaffs_ext_tags local_tags;
+ int flash_chunk = apply_chunk_offset(dev, nand_chunk);
+
+ dev->n_page_reads++;
+
+ /* If there are no tags provided use local tags. */
+ if (!tags)
+ tags = &local_tags;
+
+ result = dev->tagger.read_chunk_tags_fn(dev, flash_chunk, buffer, tags);
+ if (tags && tags->ecc_result > YAFFS_ECC_RESULT_NO_ERROR) {
+
+ struct yaffs_block_info *bi;
+ bi = yaffs_get_block_info(dev,
+ nand_chunk /
+ dev->param.chunks_per_block);
+ yaffs_handle_chunk_error(dev, bi);