summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-03-13 20:21:18 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-03-13 20:21:18 +0000
commit4a6d160f7539caa50820c79f835b8de50df0de0b (patch)
tree1d9b53add674b07e92109025c60b160653121590 /firmware
parent2cfd0f2e7339e58f9c2cff70eda1aa9fc020a8b8 (diff)
Re-commit another small Nano2G FTL bugfix that got lost
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25146 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
index ed594b42e3..a188e986d6 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
@@ -1614,7 +1614,7 @@ uint32_t ftl_commit_cxt(void)
uint32_t mappages = ((*ftl_nand_type).userblocks + 0x3ff) >> 10;
uint32_t ctrpages = ((*ftl_nand_type).userblocks + 23 + 0x3ff) >> 10;
uint32_t endpage = ftl_cxt.ftlctrlpage + mappages + ctrpages + 1;
- if (endpage % ppb > ppb - 1)
+ if (endpage >= (ftl_cxt.ftlctrlpage / ppb + 1) * ppb)
ftl_cxt.ftlctrlpage |= ppb - 1;
for (i = 0; i < ctrpages; i++)
{