From: Thomas Gleixner <tglx@linutronix.de>
To: shadow <saturn@structure.biochem.nchu.edu.tw>,
linux-mtd@lists.infradead.org
Subject: Re: IF eraseall will destryed(phys) the nand flash ?
Date: Wed, 04 Dec 2002 11:01:02 +0100 [thread overview]
Message-ID: <200212041101.02598.tglx@linutronix.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0212030354100.2327-100000@structure.biochem.nchu.edu.tw>
On Tuesday 03 December 2002 22:42, shadow wrote:
> Hi all,
> I got an Input/Output error when I erase the nand flash. It printed these
> messages.
> -------------------------
> Erasinand_erase: attempt to erase a bad block at page 0x00000020
> ng 8 Kibyte @ 4000 -- 0 % complete.
> eraseall: /dev/mtd/6: Mnand_erase: attempt to erase a bad block at page
> 0x00000030
> TD Erase failure: Input/output error
> Erasing 8 Kibyte @ 6000 -- 1 % complete.
> eraseall: /dev/mtd/6: Mnand_erase: attempt to erase a bad block at page
> 0x00000040
> TD Erase failure: Input/output error
> Erasing 8 Kibyte @ 8000 -- 1 % complete.
> eraseall: /dev/mtd/6: MTD Erase failure: Input/output error
> Erased 2048 Kibyte @ 0 -- 100% complete.
> -----------------------------
>
> I found the Input/output error always occurred at the same page even if it
> is a new SMC. But I have a question, the block_size is larger than
> page_size, isn't it ? IF larger why nand driver attempt to erase a bad
> block at page 0x00000020. In my mind, I think one block includes many
> ^^
> pages.
512Bytes (Pagesize) * 16 (0x10) pages = 8192 Byte = Blocksize
NAND driver refuses to erase a bad blocks.
The attempt comes from eraseall, which does not know that the block is bad.
And there is no need to know it, as the driver takes care.
So you have 3 bad blocks:
Block Nr. 2 at page 0x20 (32)
Block Nr. 3 at page 0x30 (48)
Block Nr. 4 at page 0x40 (64)
> Another problem is why the new SMC has some bad blocks and occurred
> at the same page with using eraseall program erase it.
NAND FLASH can have factory marked bad blocks at shipping time. See datasheet.
Bad block is bad block and does not go away by erasing it. In fact you _MUST
NOT_ erase it, as bad block information is lost and
> Then I put this SMC that has bad blocks into Digital Camera that can erase
> data on the SMC. The DC Can't format it, what's up ? eraseall destroyed it
Nope eraseall did not destroy anything. It just erased the card.
Your DC can probably use only preformatted SMC. The formatting is SmartMedia
FAT Filesystem, which is not supported by MTD. By erasing the SMC you deleted
the SMC FAT preformat.
> IF the SMC has some bad blocks, then how to correct it ?
Bad block is a bad block and will be a bad block all the time. NAND aware
filesystems handle bad blocks correctly. Bad blocks just reduce the available
storage size of your chip. Your 2MB partition has now 2MB - 3*8kB storage
size. Don't worry about. Mount JFFS2 and see what happens.
--
Thomas
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
next prev parent reply other threads:[~2002-12-04 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-03 21:42 IF eraseall will destryed(phys) the nand flash ? shadow
2002-12-04 10:01 ` Thomas Gleixner [this message]
2002-12-03 22:46 ` shadow
2002-12-04 10:35 ` Thomas Gleixner
2002-12-04 13:00 ` shadow
2002-12-04 10:51 ` Henrik Nordstrom
2002-12-04 13:03 ` shadow
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=200212041101.02598.tglx@linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-mtd@lists.infradead.org \
--cc=saturn@structure.biochem.nchu.edu.tw \
/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