- Status Closed
- Percent Complete
- Task Type Patches
- Category Operating System/Drivers
-
Assigned To
TheSeven - Operating System iPod Nano 2G
- Severity Medium
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#10775 - IPod NANO 2G NAND issues
Some IPod Nano 2G’s(with a specific flash type) seem to need a delay after clearing the NAND write FIFO. Without that delay i cant view files, play files or start apps/games/demos, FTL errors occur frequently when writing ⇒ i had to restore my ipod nearly every day)
I dont know why they need this delay and a loop that counts from 0 to 3500 is propably not the best solution(a sleep would be too slow) but its working properly with this flash type.
Closed by TheSeven
2010-02-08 18:37
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2010-02-08 18:37
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Looks like we finally fixed it.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
this should be a more proper fix now
the problem was, we didnt wait for the write fifo as described in the datasheet
wait for the r fifo too, add a timeout
the previous ones locked up sometimes, hopefully this one doesnt. if rockbox still locks up with this patch the problem might have a different root than not waiting for the fifos…
this one should be fully working, i have tested it thoroughly and its working fine - the fifo waiting has to be done before flushing it, thats why the previous ones failed sometimes
I have tried your patch with r23991. It failed on boot after display rockbox logo.
*PANIC*
FTL: Lowlevel NAND driver init failed!
Switching back to r23991 and the nano boot without error.
its failing with some ipods but with others not… (i have tried it with 3 different nanos)
on mine it dont get read/write problems anymore but still its failing sometimes.. i am still looking for a better(the right) solution
Great for the nano patch 3, it has solved many problems on my ipod nano 2gen.
The last one make the error wich is described by laurent papier.
So, the third works fine with my ipod. Thanks a lot.
i have updated my patch
would be great if you could test it and report how it works
I'm sorry but i obtain the following error with the console when i try to apply the patch :
patch : malformed patch at line 110: @@ -287,18 +314,21 @@
You can notice i'm working with the version 24085 (downloaded right now).
After a few day trying the 2nd version (in fact, it was the 2nd and not the third, but we can't edit, the third obtain the same error with "Lowlevel NAND Driver init failed"), i often get crash, when the firmware works on files (for instance, when i launch a music, the firmware crashes sometimes, and sometimes it doesn't).
I had a question too, (i'm a "newbie" in applying patch in svn files) : how can i apply a patch over an old one, in order to recompile without compile again from start (and redownloading sources)?
Thanks for the patches, i wish this error will be soon corrected :).
I try your patch as soon as it's available.
I've tried the patch by editing manually the source code, and put in the original files the corrections of the patch.
I get the initial error, i.e, i can't go in the directories, launch app…
Maybe it's because what i ve done to apply the patch is a little hazardous (i'm not sure to have done the correct manipulations, as i have edited the files without applying the patch with the console), but maybe not.
hm seems like there was something wrong with the patch, this one should work, sorry
i forgot to delete some undervolting stuff from the previous patch, again sorry…
I've tried right now, and it works fine.
I've noticed that the version need a little bit more time to boot.
So, thank you really much, i will post if I notice anything which works bad.
I couldn't properly navigate anymore with recent builds (about 3 weeks) but r23850 with that patch solves that problems for me. Thanks again!
please also try this patch or binary, that can help me debugging
Hey! Just wanted to say thanks liar! i just successfully compiled 24099 witch your patch and that solved it for me on my nano 2g (8gb)! So thanks again and merry X-mas!
this one shows the nand id. please tell me what it is(only if you have nand problems without my patch)
liar, the binary works great!
hope that it gets added to svn soon
Thx the patch is working fine and it saved me and my friends day.
It is working correctly without any misbehaviour.
I've got
*PANIC*
nand_reset:nand_wait_rfifo_d ne
on boot. Build from svn today(r24148-100102), ipod nano 2gen 4gb, with last patch
this patch:
differences to my recent patch:
* revert the fifo waiting - it is not needed(just some bits need to be set at different places, see below)
* falling back to the TheSeven(Apple) way of waiting for the chips to be ready(i changed that because it failed once for me. but now i am sure it was because of a side effect - i could reproduce it) - the datasheet is inaccurate in this matter
differences to the current svn:
* do not reset the NAND in nand_get_chip_type - a select bank is enough as we already reset the NAND before(and resetting is slow on NANOs with the NAND issue)
* set the fifo flush bits like the datasheet does - this avoids data corruption.
* wait for the NAND to be ready ⇒ be sure the NAND is ready for new commands - this avoids data corruption during writing to the NAND. it also avoids data corruption and panics during poweroff
michallos:
do you have any problems with the NAND Driver?
i thought only 8GB nanos are affected by this problem
this patch should work for you.
I have a 2GB Nano 2g. With vanilla Rockbox I had multiple issues:
Over at IRC, mc2739 kindly directed me to this bug. The latest patch paniced on boot with "nand_power_up:nand_reset:2".
This patch, however, fixed all the aforementioned issues: http://www.rockbox.org/tracker/task/10775?getfile=21108
jho:
please try this patch and tell me which panic it throws
*PANIC*
nand_reset:nand_wait_chip_ready:2
Hope this helps. If there's anything else I can do, just give me a shout.
that means the TheSeven way of waiting for the chips to be ready does not work for you(it did not panic in previous patches because TheSeven did not check the return value of nand_reset)
nand_wait_status_ready fails for you too - as we found out while talking in IRC - so the sleep is the best solution as there is no other bit which is toggeling we could wait for.
jho:
this is another thing you could try(i only do nand_wait_staus_ready once instead of 4 times)
if that works we can drop that annoying sleep again
liar:
That patch works fine. Thanks.
so.. that should be working for everybody now.
Sratch that—
Actually I only yesterday really used my player with the new patch and found out there still are big issues with it. I'm still getting FTL errors with it, while the patch with sleep actually works (tested throughly this time, I promise! ;))
hm. cant think of anything else we could do then except the sleep
.. another update. hopefully the last.
jho: your nano2g has only 2 banks right?
that was the problem. my patch was waiting for bank 0-3 but you only have 0 and 1.
the current svn calls nand_wait_chip_ready for all banks too but it doesnt panic because the return value of nand_reset isnt checked.
Hi, and sorry for the late reply. I managed to get my Nano into the "use iTunes to restore" state, and only today got access to a Windows box so I could restore it.
That patch seems to work alright, so I guess my Nano only has two banks.
I've applied the patch to my 8GB 2nd.gen. Nano and get the PANIC nand_reset:nand_wait_chip_ready:0 message if I do some quick track skips, or other heavy file usage. In general running however, its fine. Occasionally, it has been PANIC nand_reset:nand_wait_chip_ready:2 - but much more often the code is 0. Is there anything I can do to help debug?
Hello!
Does the last patch included in r24284???
I have installed r24284 on my nano 2g (8 Gb) - the problem is steel - cant open any app or file…
MoSPDude: remove the nand_wait_chip_ready call in nand_reset. nand_wait_status_ready should be enough
brother_fox: no it is no included in the current svn
It's actually failing on the nand_wait_status_ready call. With the nand_wait_chip_ready call removed its a lot more unstable.
The panic message in the patch above shows the wrong call name for panic nand_wait_status_ready - it prints "nand_wait_chip_ready" for both lines in nand_reset.
@Craig: Same here. After deleting nand_wait_chip_ready, at least Rockbox booted properly without the panic message.
Sometimes, though, I've got a nand_wait_status_ready panic. I can remember this happening while playing a song and clicking on another one in the file browser.
The nand_wait_status_ready(bank) call seems to be necessary: I tried to leave it out once and then wasn't able to browse the file hierarchy anymore.
Just change the panicf(…) call to "return 1" and it won't crash anymore.
I've been using the above patch with these two minor changes for a few days and would consider it stable. Are there any reasons not to include in SVN yet?
I just got a "nand_power_up:nand_reset:3" panic. What does it mean? Can I safely delete this line?
that means nand_reset failed for bank 3(you got that message because you replaced the panicf in nand_reset with return 1).
use this patch: http://www.rockbox.org/tracker/task/10775?getfile=21164
update: dont ask the bank for its chip type before we reset that one.
final(!?) patch.
please test this one and report any problems regarding it.
Seems to work fine for me.
Please, can anyone send me the last release for nano 2g with this patch applied (or post a link to download it). I'd be very pleased. thanks in advance
Liar. It does not work for me. In fact I had to restore my Ipod after installing the firm you sent to me. Thank you for your fast answer anyway.
My nand ID is: A585D598.
It's strange, because this afternoon in the IRC channel #rockbox a guy there (nick Strife89) has compiled me a version of last nano 2g source applying this patch (the one in your last post) and it worked for me.
If you want me to send to you the compiled release send me an email please. It's 3.0Mb and I can't post it here…
sorry, the revision patched by Strife89 is 24364
uhh my mistake - i did something wrong the binary i sent to you, sorry… thanks for your test results
this patch didnt work for me , i got the error
*PANIC*
nand_reset:nand_wait_chip_ready:3
btw i am new :D
you are using an old version of the patch… please use the lastest one :)
http://www.rockbox.org/tracker/task/10775?getfile=21255
cheers it worked on one of my nano's on the other nano i just get
*PANIC*
nand_power_up :nand_reset (bank = 2) failed.
can you help me on this error as well cheers
in firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c
seek for the function: nand_power_up, replace that if(nand_reset(i)) panicf… with nand_reset(i);
this is what the current svn does… but the rest of the patch should still avoid the file system problems
thanks for the help
Patch committed as r24414. If there is any further trouble that could be related, please report it here.
Another related bug was caught and fixed in r24431.