summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-03-13 18:07:42 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-03-13 18:07:42 +0000
commit4a7b2cc9f349c9991d84cca2aae59e070f7524ac (patch)
tree130a9fbda3bc38beb8f0c8cd2e8b6f795ec78fd8 /firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
parent394b579c4d83825fd9dd63c3b1cf01b51297c1da (diff)
downloadrockbox-4a7b2cc9f349c9991d84cca2aae59e070f7524ac.tar.gz
rockbox-4a7b2cc9f349c9991d84cca2aae59e070f7524ac.zip
Isolate and commit some innocent Nano2G FTL bugfixes that were introduced as part of the performance improvements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25143 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
index 0cc7841cd5..e85830d642 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
@@ -547,7 +547,7 @@ uint32_t ftl_vfl_store_cxt(uint32_t bank)
nand_write_page(bank, page, &ftl_vfl_cxt[bank], &ftl_sparebuffer, 1);
}
uint32_t good = 0;
- for (i = 0; i < 8; i++)
+ for (i = 1; i <= 8; i++)
{
uint32_t index = ftl_vfl_cxt[bank].activecxtblock;
uint32_t block = ftl_vfl_cxt[bank].vflcxtblocks[index];
@@ -1553,6 +1553,7 @@ struct ftl_log_type* ftl_allocate_log_entry(uint32_t block)
{
uint32_t i;
struct ftl_log_type* entry = ftl_get_log_entry(block);
+ (*entry).usn = ftl_cxt.nextblockusn - 1;
if (entry != (struct ftl_log_type*)0) return entry;
for (i = 0; i < 0x11; i++)
@@ -1778,6 +1779,7 @@ uint32_t ftl_write(uint32_t sector, uint32_t count, const void* buffer)
i++;
}
}
+ if ((*logentry).pagesused == ppb) ftl_remove_scattered_block(logentry);
}
if (ftl_cxt.swapcounter >= 300)
{