public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Kyungmin Park <kyungmin.park@samsung.com>
To: 'Bernhard Priewasser' <priewasser@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: RE: [PATCH] OneNAND: Simple Bad Block handling support
Date: Thu, 25 Aug 2005 08:36:29 +0900	[thread overview]
Message-ID: <0ILR00B812WSF3@mmp1.samsung.com> (raw)
In-Reply-To: <430C50D3.5080808@gmail.com>


Thank you for replay and check the code

> 
> Is the following code valid (assuming patch has been run)?
>  > ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
> 
>  > if (ctrl & ONENAND_CTRL_ERROR) {
>  > 	/* It maybe occur at initial bad block */
>  > 	DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: controller error 
> = 0x%04x\n", 
> ctrl);
>  > 	/* Clear other interrupt bits for preventing ECC error */
>  > 	interrupt &= ONENAND_INT_MASTER;
>  > }
> 
>  > if (ctrl & ONENAND_CTRL_LOCK) {
>  > 	DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: it's locked error = 
> 0x%04x\n", ctrl);
>  > 	return -EACCES;
>  > }
> 
>  > if (interrupt & ONENAND_INT_READ) {
>  > 	ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
>  > 	if (ecc & ONENAND_ECC_2BIT_ALL) {
>  > 		DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: ECC 
> error = 0x%04x\n", ecc);
>  > 		return -EBADMSG;
>  > 	}
>  > }
> 
> 1) interrupt &= ONENAND_INT_MASTER instead of return?

	=> Yes It's valid. During the initial bad block scanning, the
OneNAND controller return ctrl error. If we use return -EIO then OneNAND
scan failed, then we can't detect OneNAND chip. So we don't return any ctrl
error.
	=> interrupt &= ONENAND_INT_MASTER. we always set master interrupt
bit in any case

> 2) return -EACCES instead of return -EIO?
	=> I don't know which error code are correct. but I think locked
block access is EACCES instead of EIO



Kyungmin Park

  reply	other threads:[~2005-08-24 23:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18  8:16 [PATCH] OneNAND: Simple Bad Block handling support Kyungmin Park
2005-08-23 13:56 ` Bernhard Priewasser
2005-08-23 23:42   ` Kyungmin Park
2005-08-24  9:24     ` Bernhard Priewasser
2005-08-24 10:49     ` Bernhard Priewasser
2005-08-24 23:36       ` Kyungmin Park [this message]
2005-08-25  7:56         ` Bernhard Priewasser
2005-09-01  9:30         ` Bernhard Priewasser
2005-09-01 10:03           ` Kyungmin Park
2005-09-01 10:09             ` Bernhard Priewasser
2005-09-07  8:09             ` Bernhard Priewasser
2005-09-07 11:44               ` 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=0ILR00B812WSF3@mmp1.samsung.com \
    --to=kyungmin.park@samsung.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=priewasser@gmail.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