From 4a6d160f7539caa50820c79f835b8de50df0de0b Mon Sep 17 00:00:00 2001 From: Michael Sparmann Date: Sat, 13 Mar 2010 20:21:18 +0000 Subject: 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 --- firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware') 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++) { -- cgit v1.2.3