- 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);
- yaffs_HandleChunkError(dev,bi);
- }
+ 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;