From: Adrian Hunter <ext-adrian.hunter@nokia.com>
To: ext Kyungmin Park <kyungmin.park@samsung.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD][OneNAND] Check the initial bad block using ONENAND_CTRL_ERROR
Date: Wed, 12 Dec 2007 12:57:04 +0200 [thread overview]
Message-ID: <475FBE80.1060202@nokia.com> (raw)
In-Reply-To: <20071212083309.GA32235@party>
ext Kyungmin Park wrote:
> Some chips don't set the ONENAND_CTRL_LOAD bit.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mtd/onenand/onenand_base.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> index bfc8399..e9aac83 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -1121,8 +1121,8 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
>
> if (ctrl & ONENAND_CTRL_ERROR) {
> printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl);
> - /* Initial bad block case */
> - if (ctrl & ONENAND_CTRL_LOAD)
> + /* Initial bad block case: 0x2400 or 0x0400 */
> + if (ctrl & ONENAND_CTRL_ERROR)
> return ONENAND_BBT_READ_ERROR;
> return ONENAND_BBT_READ_FATAL_ERROR;
> }
You have:
if (ctrl & ONENAND_CTRL_ERROR) {
printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl);
/* Initial bad block case: 0x2400 or 0x0400 */
if (ctrl & ONENAND_CTRL_ERROR)
return ONENAND_BBT_READ_ERROR;
return ONENAND_BBT_READ_FATAL_ERROR;
}
which is the same as:
if (ctrl & ONENAND_CTRL_ERROR) {
printk(KERN_DEBUG "onenand_bbt_wait: controller error = 0x%04x\n", ctrl);
return ONENAND_BBT_READ_ERROR;
}
Is that what you intended?
next prev parent reply other threads:[~2007-12-12 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 8:33 [PATCH] [MTD][OneNAND] Check the initial bad block using ONENAND_CTRL_ERROR Kyungmin Park
2007-12-12 10:57 ` Adrian Hunter [this message]
2007-12-12 11:52 ` Kyungmin Park
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=475FBE80.1060202@nokia.com \
--to=ext-adrian.hunter@nokia.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mtd@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