Skip to content

Commit 8112084

Browse files
fix the bis cluster cache if too much data was read
1 parent 0129039 commit 8112084

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

source/storage/nx_emmc_bis.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ static int nx_emmc_bis_read_block(u32 sector, u32 count, void *buff)
219219
// Check if cache entry was previously in use in case of cache loop.
220220
if (cache_filled == 1 && bis_cache->cluster_cache[cluster_cache_end_index].dirty == 1)
221221
_nx_emmc_bis_flush_cluster(&bis_cache->cluster_cache[cluster_cache_end_index]);
222+
223+
if (cache_filled == 1)
224+
cluster_lookup[bis_cache->cluster_cache[cluster_cache_end_index].cluster_num] = -1;
225+
222226
bis_cache->cluster_cache[cluster_cache_end_index].cluster_num = cluster;
223227
bis_cache->cluster_cache[cluster_cache_end_index].visit_count = 1;
224228
bis_cache->cluster_cache[cluster_cache_end_index].dirty = 0;

0 commit comments

Comments
 (0)