summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s5l8700/ipodnano2g
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-03-14 15:12:08 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-03-14 15:12:08 +0000
commit884147c5e225af3cce71900e47ce70abd260dfd5 (patch)
treead9d64dc156b2eb4880c0d84574e988f7185519d /firmware/target/arm/s5l8700/ipodnano2g
parenta0692a40b238669059822f1af0bb11a1c9d20639 (diff)
downloadrockbox-884147c5e225af3cce71900e47ce70abd260dfd5.tar.gz
rockbox-884147c5e225af3cce71900e47ce70abd260dfd5.zip
Nano 2G VFL: try slow read twice if fast read failed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25166 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
index 9bac47e5bb..b5f179ce89 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
@@ -893,20 +893,27 @@ uint32_t ftl_vfl_read_fast(uint32_t vpage, void* buffer, void* sparebuffer,
if ((rc >> (i << 2)) & 0x2) continue;
if ((rc >> (i << 2)) & 0xf)
{
- rc &= ~(0xf << (i << 2));
nand_reset(i);
uint32_t ret = nand_read_page(i, physpage,
(void*)((uint32_t)buffer + 0x800 * i),
(void*)((uint32_t)sparebuffer + 0x40 * i),
1, checkempty);
+ if ((ret & 0x11D) != 0 && (ret & 2) == 0)
+ {
+ ret = nand_read_page(i, physpage,
+ (void*)((uint32_t)buffer + 0x800 * i),
+ (void*)((uint32_t)sparebuffer + 0x40 * i),
+ 1, checkempty);
#ifdef FTL_READONLY
- (void)remaponfail;
+ (void)remaponfail;
#else
- if (remaponfail == 1 && (ret & 0x11D) != 0 && (ret & 2) == 0)
- panicf("FTL: VFL fast read failed, RC %04X, bank %d, RET %03X, base %d",
- rc, i, ret, vpage);
-// ftl_vfl_schedule_block_for_remap(i, block);
+ if (remaponfail == 1 && (ret & 0x11D) != 0 && (ret & 2) == 0)
+ panicf("FTL: VFL fast read failed, RC %04X, bank %d, RET %03X, base %d",
+ rc, i, ret, vpage);
+// ftl_vfl_schedule_block_for_remap(i, block);
#endif
+ }
+ rc &= ~(0xf << (i << 2));
if (ret & 1) rc |= 1 << (i << 2);
if (ret & 2) rc |= 2 << (i << 2);
if (ret & 0x10) rc |= 4 << (i << 2);