From: borasah@gmail.com
To: linux-mtd@lists.infradead.org
Cc: Ricard Wanderlof <ricard.wanderlof@axis.com>
Subject: Re: NAND flash write goes wrong
Date: Fri, 11 May 2007 20:58:14 +0300 [thread overview]
Message-ID: <200705112058.14662.borasah@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0705111621430.3951@lnxricardw.se.axis.com>
> > Input file is not page aligned
> > Data did not fit into device, due to bad blocks
> >
> > : Success
> >
> > In fact, I tried without -p and with -n before. Without -p nandwrite
> > gives the above message. Then I put -p and nandwrite started to write...
>
> Sorry, I didn't get it completely right last time. It is good practice to
> pad the image to a complete eraseblock size, but it shouldn't fill the
> whole nand flash partition space available, in case there are bad blocks.
Hmm, you say if the erase block size is 100, and the last part of the image is
64, the remaining 36 should be padded with 0xFF, but all the other free ones
can remain as is?
mkfs.jffs2 -p without SIZE does the above one or to the end of the NAND flash?
I think the first one...
> So yes, it should be padded with -p, but not to the full size of the
> partition, but a couple of eraseblocks less.
You mean "NAND_size - erase_size * x"?
> -p specified to nandwrite should also work as it pads the image with 0xff.
Hmm. You dont have to specify -p to the mkfs.jffs2, nandwrite can also do it
for you, right?
> >> If there indeed are bad blocks it is correct to skip them both when
> >> erasing and writing.
> >
> > OK. What I wanted to learn was different. In the begining there was no
> > bad sector but by the passage of time, when I tried different
> > combinations, bad sector numbers started to increase. Is this normal? Or
> > are there some fundamentally different things between kernel version and
> > mtd-utils so these marks them as bad?
>
> Blocks (nand flash terminology rejects the name 'sectors' in favor of
> 'blocks' and 'pages') can go bad with time, but we're talking about
> thousands if not tens of thousands of erase/write cycles here. So it seems
> there's something wrong here.
Yes, I think too. Now ~140 bad sector is reported during the boot. I just did
at most 50 read/write...
> There was a patch posted just a week or so ago here which fixed a problem
> with bad block marking and recognition when not using a flash-based bad
> block table.
I'm new to the list. Is this Artem's patch? I applied it, but no success...
Maybe http://lists.infradead.org/pipermail/linux-mtd/2007-May/018087.html?
> My (limited) experience is that when the jffs2 driver detects more and
> more bad blocks over a short period of time, it is the result of a
> hardware problem i.e. the communication with the nand flash doesn't work
> properly, causing some reads, writes or erase operations to fail. (Case in
> point: during debugging of one of our products I accidentally allocated a
> network traffic indicator output pin to one of the nand flash signals,
> which caused all sorts of weird nand flash problems if the flash was
> accessed at the same time as the network. As long as the network was
> silent, there were no problems whatsoever).
Ricard, thanks for the the information...
--
Bora SAHIN
next prev parent reply other threads:[~2007-05-11 17:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 18:50 NAND flash write goes wrong borasah
2007-05-10 19:16 ` Josh Boyer
2007-05-10 21:37 ` borasah
2007-05-10 22:15 ` Thomas Gleixner
2007-05-10 22:42 ` borasah
2007-05-11 6:36 ` Ricard Wanderlof
2007-05-11 6:57 ` Artem Bityutskiy
2007-05-11 7:16 ` Matthieu CASTET
2007-05-11 7:42 ` Artem Bityutskiy
2007-05-11 7:49 ` Artem Bityutskiy
2007-05-11 13:56 ` borasah
2007-05-11 14:31 ` Ricard Wanderlof
2007-05-11 17:58 ` borasah [this message]
2007-05-14 6:56 ` Ricard Wanderlof
2007-05-21 9:30 ` borasah
[not found] <42E999AD7A0E4647BF159F467EE4FBCB017B5155@BLR-SGM-MSG01.wipro.com>
2007-05-14 7:39 ` Ricard Wanderlof
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=200705112058.14662.borasah@gmail.com \
--to=borasah@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=ricard.wanderlof@axis.com \
/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;
as well as URLs for NNTP newsgroup(s).