From: Jon Ringle <jon@ringle.org>
To: barebox@lists.infradead.org
Subject: barebox nand ignoring bad eraseblocks or read/write
Date: Fri, 9 Sep 2011 23:29:45 -0400 [thread overview]
Message-ID: <CAMwGMjyne+ixbgzJ3_KJ9+=qHK+kGQgQGqL06stVvv-GQ6PYow@mail.gmail.com> (raw)
I have a NAND device with a few bad eraseblocks, which is not
uncommon. I figured that barebox would properly handle avoiding the
bad eraseblocks.
So I was surprised when I discovered that this is not entirely the
case when I #define DEBUG at the top of nand.c. erase seems to honor
the bad eraseblocks, but write still silently uses the bad erase block
and read fails when it reads the bad eraseblock at 0x001e0000. Am I
missing something?
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB
3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 15 at 0x001e0000
Bad eraseblock 279 at 0x022e0000
Bad eraseblock 507 at 0x03f60000
Bad eraseblock 874 at 0x06d40000
<...snip...>
[barebox]: / update -t kernel -d nand -m mem -f 0x81000000
erasing partition /dev/nand0.kernel_bb
erase 393216 131072
erase 524288 131072
erase 655360 131072
erase 786432 131072
erase 917504 131072
erase 1048576 131072
erase 1179648 131072
erase 1310720 131072
erase 1441792 131072
erase 1572864 131072
erase 1703936 131072
erase 1835008 131072
erase 1966080 131072
Skipping bad block at 0x001e0000
erase 2097152 131072
<...snip...>
erase 8650752 131072
flashing 0x81000000 to /dev/nand0.kernel_bb
write: 0x00060000 0x00001000
offset: 0x00060000 now: 0x00000800 retlen: 0x00000800
offset: 0x00060800 now: 0x00000800 retlen: 0x00000800
write: 0x00061000 0x00001000
offset: 0x00061000 now: 0x00000800 retlen: 0x00000800
offset: 0x00061800 now: 0x00000800 retlen: 0x00000800
<...snip...>
write: 0x001e0000 0x00001000
offset: 0x001e0000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e0800 now: 0x00000800 retlen: 0x00000800
write: 0x001e1000 0x00001000
offset: 0x001e1000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e1800 now: 0x00000800 retlen: 0x00000800
write: 0x001e2000 0x00001000
offset: 0x001e2000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e2800 now: 0x00000800 retlen: 0x00000800
write: 0x001e3000 0x00001000
offset: 0x001e3000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e3800 now: 0x00000800 retlen: 0x00000800
write: 0x001e4000 0x00001000
offset: 0x001e4000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e4800 now: 0x00000800 retlen: 0x00000800
write: 0x001e5000 0x00001000
offset: 0x001e5000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e5800 now: 0x00000800 retlen: 0x00000800
write: 0x001e6000 0x00001000
offset: 0x001e6000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e6800 now: 0x00000800 retlen: 0x00000800
write: 0x001e7000 0x00001000
offset: 0x001e7000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e7800 now: 0x00000800 retlen: 0x00000800
write: 0x001e8000 0x00001000
offset: 0x001e8000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e8800 now: 0x00000800 retlen: 0x00000800
write: 0x001e9000 0x00001000
offset: 0x001e9000 now: 0x00000800 retlen: 0x00000800
offset: 0x001e9800 now: 0x00000800 retlen: 0x00000800
write: 0x001ea000 0x00001000
offset: 0x001ea000 now: 0x00000800 retlen: 0x00000800
offset: 0x001ea800 now: 0x00000800 retlen: 0x00000800
write: 0x001eb000 0x00001000
offset: 0x001eb000 now: 0x00000800 retlen: 0x00000800
offset: 0x001eb800 now: 0x00000800 retlen: 0x00000800
write: 0x001ec000 0x00001000
offset: 0x001ec000 now: 0x00000800 retlen: 0x00000800
offset: 0x001ec800 now: 0x00000800 retlen: 0x00000800
write: 0x001ed000 0x00001000
offset: 0x001ed000 now: 0x00000800 retlen: 0x00000800
offset: 0x001ed800 now: 0x00000800 retlen: 0x00000800
write: 0x001ee000 0x00001000
offset: 0x001ee000 now: 0x00000800 retlen: 0x00000800
offset: 0x001ee800 now: 0x00000800 retlen: 0x00000800
write: 0x001ef000 0x00001000
offset: 0x001ef000 now: 0x00000800 retlen: 0x00000800
offset: 0x001ef800 now: 0x00000800 retlen: 0x00000800
write: 0x001f0000 0x00001000
offset: 0x001f0000 now: 0x00000800 retlen: 0x00000800
offset: 0x001f0800 now: 0x00000800 retlen: 0x00000800
<...snip...>
write: 0x0085f000 0x00001000
offset: 0x0085f000 now: 0x00000800 retlen: 0x00000800
offset: 0x0085f800 now: 0x00000800 retlen: 0x00000800
[barebox]:
[barebox]: / md5sum /dev/nand0.kernel_bb 0+4159380
nand_read: 0x00060000 0x00001000
nand_read: 0x00061000 0x00001000
<...snip...>
nand_read: 0x001df000 0x00001000
nand_read: 0x001e0000 0x00001000
err -74
read: error 74
[barebox]: /
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2011-09-10 3:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-10 3:29 Jon Ringle [this message]
2011-09-12 1:35 ` Jon Ringle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMwGMjyne+ixbgzJ3_KJ9+=qHK+kGQgQGqL06stVvv-GQ6PYow@mail.gmail.com' \
--to=jon@ringle.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox