From: Mike Dunn <mikedunn@newsguy.com>
To: "Shah, Minal" <minal.shah@ti.com>
Cc: Mike Frysinger <vapier@gentoo.org>,
"Mukherjee, Somnath" <somnath@ti.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"Gupta, Pekon" <pekon@ti.com>,
Brian Norris <computersforpeace@gmail.com>,
"Parikh, Urmil" <urmil@ti.com>
Subject: Re: MTD utils v1.5.0: MEMERASE64 ioctl failed error
Date: Tue, 15 Oct 2013 07:17:43 -0700 [thread overview]
Message-ID: <525D4E87.7010908@newsguy.com> (raw)
In-Reply-To: <566CE8F1DB913147957287757DA6396B3E9D6A93@DBDE04.ent.ti.com>
On 10/15/2013 01:32 AM, Shah, Minal wrote:
> Hi Brian,
> Thanks a lot for the explanation; I understood the reason for failure.
>
>> So why do you want to erase bad blocks?
> The reason why I want to erase bad blocks is because they actually don't seem to be bad.
> Block0 itself is shown as bad.
> I have few partitions (like MLO and u-boot env) of size equal to 1 erase block. The block is marked as bad and hence I cannot write anything to this partition.
> One of the solutions is to increase that partition size to 2 blocks so even if 1 block is bad then it will atleast be able to write to the other block of the same partition. But I don't think I should do this while the block is not really bad (what if all the blocks for some reason are marked as bad while they are actually not).
>
> This question came in my mind from the fact that "nand scrub" command is allowed from u-boot which allows to also completely erase all the bad blocks; so why not from the kernel level.
>
> Regards,
> Minal
>
> -----Original Message-----
> From: Brian Norris [mailto:computersforpeace@gmail.com]
> Sent: Saturday, October 12, 2013 3:55 AM
> To: Shah, Minal
> Cc: Mike Frysinger; Mukherjee, Somnath; linux-mtd@lists.infradead.org; Gupta, Pekon; Parikh, Urmil
> Subject: Re: MTD utils v1.5.0: MEMERASE64 ioctl failed error
>
> Hi Minal,
>
> On Wed, Oct 09, 2013 at 05:05:11AM +0000, Shah, Minal wrote:
>> I am using MTD utils version 1.5.0 for DRA7 (Vayu) platform.
>>
>> I have bad blocks in some of my NAND partitions which I am not able to erase from linux kernel.
>
> MTD does not allow erasing bad blocks. This is prohibited by NAND
> datasheets. There are occasions where, for debugging purposes, one might
> need to erase a "bad" block that is not actually bad, but MTD does not
> provide an interface for doing this. An interface for doing so was
> discussed a while back, but nothing was merged.
Yes, this is a shortcoming in mtd, I think. Blocks can be marked as bad, but
never "un-marked". This is the reason I needed a module parameter
"ignore_badblocks" in the docg4 driver.
But any solution is complicated by the diversity of methods for marking bad
blocks (fixed or relocatable flash table, oob marker), and various reasons why
it is so marked (factory, user). This is why u-boot says that 'nand scrub' is
potentially "unsafe". You have to know the internals of your device.
Mike
next prev parent reply other threads:[~2013-10-15 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-09 5:05 MTD utils v1.5.0: MEMERASE64 ioctl failed error Shah, Minal
2013-10-11 22:24 ` Brian Norris
2013-10-12 16:47 ` Ezequiel Garcia
2013-10-15 8:32 ` Shah, Minal
2013-10-15 14:17 ` Mike Dunn [this message]
2013-10-15 16:26 ` Mike Frysinger
2013-10-15 19:12 ` Brian Norris
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=525D4E87.7010908@newsguy.com \
--to=mikedunn@newsguy.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=minal.shah@ti.com \
--cc=pekon@ti.com \
--cc=somnath@ti.com \
--cc=urmil@ti.com \
--cc=vapier@gentoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.