This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10775 - IPod NANO 2G NAND issues
Attached to Project:
Rockbox
Opened by Franz-Josef Haider (liar) - Wednesday, 11 November 2009, 23:55 GMT+2
Last edited by Michael Sparmann (TheSeven) - Monday, 08 February 2010, 19:37 GMT+2
Opened by Franz-Josef Haider (liar) - Wednesday, 11 November 2009, 23:55 GMT+2
Last edited by Michael Sparmann (TheSeven) - Monday, 08 February 2010, 19:37 GMT+2
|
DetailsSome 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. |
This task depends upon
Closed by Michael Sparmann (TheSeven)
Monday, 08 February 2010, 19:37 GMT+2
Reason for closing: Fixed
Additional comments about closing: Looks like we finally fixed it.
Monday, 08 February 2010, 19:37 GMT+2
Reason for closing: Fixed
Additional comments about closing: Looks like we finally fixed it.
the problem was, we didnt wait for the write fifo as described in the datasheet
*PANIC*
FTL: Lowlevel NAND driver init failed!
Switching back to r23991 and the nano boot without error.
on mine it dont get read/write problems anymore but still its failing sometimes.. i am still looking for a better(the right) solution
The last one make the error wich is described by laurent papier.
So, the third works fine with my ipod. Thanks a lot.
would be great if you could test it and report how it works
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 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.
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.
hope that it gets added to svn soon
It is working correctly without any misbehaviour.
*PANIC*
nand_reset:nand_wait_rfifo_d ne
on boot. Build from svn today(r24148-100102), ipod nano 2gen 4gb, with last 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 could not browse any files on the system. Pressing select would only throw the "selector" to the topmost entry at the top level of the file structure
· The database initialization never finished. It hung when it got around to updating the last file present on the file system. The database debug info told that the process was at -1% by then.
· My computer (Linux 2.6.31-gentoo-r5) would not recognize the player when it was plugged in via USB. Dmesg told me "sdb: unknown partition table". Only thing that helped was to reboot back into the original firmware.
· After unplugging the USB cable I got a panic: "mount: 0". When I rebooted after that, I got a panic with FTL error about trying to read an out-of-bounds page.
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
please try this patch and tell me which panic it throws
nand_reset:nand_wait_chip_ready:2
Hope this helps. If there's anything else I can do, just give me a shout. :-)
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.
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
That patch works fine. Thanks.
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! ;))
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.
That patch seems to work alright, so I guess my Nano only has two banks.
Does the last patch included in r24284???
brother_fox: no it is no included in the current svn
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.
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?
use this patch: http://www.rockbox.org/tracker/task/10775?getfile=21164
please test this one and report any problems regarding it.
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...
thanks for your test results
*PANIC*
nand_reset:nand_wait_chip_ready:3
btw i am new :D
http://www.rockbox.org/tracker/task/10775?getfile=21255
*PANIC*
nand_power_up :nand_reset (bank = 2) failed.
can you help me on this error as well cheers
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