linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Mike Dunn <mikedunn@newsguy.com>
Cc: Nick Spence <nick.spence@freescale.com>,
	linux-mtd@lists.infradead.org,
	Chuanxiao Dong <chuanxiao.dong@intel.com>,
	Jamie Iles <jamie@jamieiles.com>, Axel Lin <axel.lin@gmail.com>,
	Roy Zang <tie-fei.zang@freescale.com>,
	Prabhakar Kushwaha <prabhakar@freescale.com>
Subject: Re: [PATCH 5/7] mtd: nand: read_page() returns max_bitflips
Date: Tue, 24 Apr 2012 14:45:44 -0500	[thread overview]
Message-ID: <4F9702E8.2070106@freescale.com> (raw)
In-Reply-To: <1335295105-7981-6-git-send-email-mikedunn@newsguy.com>

On 04/24/2012 02:18 PM, Mike Dunn wrote:
> diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
> index 872cc96..df36037 100644
> --- a/drivers/mtd/nand/fsl_ifc_nand.c
> +++ b/drivers/mtd/nand/fsl_ifc_nand.c
> @@ -63,6 +63,7 @@ struct fsl_ifc_nand_ctrl {
>  	unsigned int oob;	/* Non zero if operating on OOB data	*/
>  	unsigned int eccread;	/* Non zero for a full-page ECC read	*/
>  	unsigned int counter;	/* counter for the initializations	*/
> +	unsigned int max_bitflips;  /* Saved during READ0 cmd		*/
>  };
>  
>  static struct fsl_ifc_nand_ctrl *ifc_nand_ctrl;
> @@ -268,6 +269,8 @@ static void fsl_ifc_run_command(struct mtd_info *mtd)
>  		int sector = bufnum * chip->ecc.steps;
>  		int sector_end = sector + chip->ecc.steps - 1;
>  
> +		nctrl->max_bitflips = 0;
> +
>  		for (i = sector / 4; i <= sector_end / 4; i++)
>  			eccstat[i] = in_be32(&ifc->ifc_nand.nand_eccstat[i]);
>  

I'd prefer to clear max_bitflips before this if-block, so that we can
rely on max_bitflips being zero when ECC wasn't requested.

Otherwise ACK the eLBC and IFC changes.

-Scott

  reply	other threads:[~2012-04-24 19:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 19:18 [PATCH 0/7] mtd: Change meaning of -EUCLEAN return code on reads Mike Dunn
2012-04-24 19:18 ` [PATCH 1/7] mtd: ecc_strength is at ecc step granularity Mike Dunn
2012-04-24 19:18 ` [PATCH 2/7] mtd: nand: fix incorrect ecc strength values Mike Dunn
2012-05-01 19:07   ` Jiandong Zheng
2012-04-24 19:18 ` [PATCH 3/7] mtd: expose ecc_strength through sysfs Mike Dunn
2012-04-24 19:18 ` [PATCH 4/7] mtd: bitflip threshold added to mtd_info and sysfs Mike Dunn
2012-04-24 19:18 ` [PATCH 5/7] mtd: nand: read_page() returns max_bitflips Mike Dunn
2012-04-24 19:45   ` Scott Wood [this message]
2012-04-25 15:35     ` Mike Dunn
2012-04-25  9:20   ` Shmulik Ladkani
2012-04-24 19:18 ` [PATCH 6/7] mtd: nand: sanity checks of ecc strength in nand_scan_tail() Mike Dunn
2012-04-25  4:09   ` Brian Norris
2012-04-25 15:08     ` Mike Dunn
2012-04-24 19:18 ` [PATCH 7/7] mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN Mike Dunn
2012-04-25 10:14   ` Shmulik Ladkani
2012-04-25 18:27   ` Robert Jarzmik
2012-04-25 19:13     ` Mike Dunn
2012-04-29 19:24       ` Artem Bityutskiy
2012-04-30 19:55         ` Mike Dunn
2012-04-30 20:31           ` Robert Jarzmik
2012-05-01 12:20           ` Artem Bityutskiy
2012-05-01 17:27             ` Mike Dunn
2012-05-01 18:51               ` Shmulik Ladkani
2012-05-02  3:59               ` Artem Bityutskiy
2012-04-25 11:23 ` [PATCH 0/7] mtd: Change meaning of -EUCLEAN return code on reads Ivan Djelic
2012-04-25 15:56   ` Mike Dunn

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=4F9702E8.2070106@freescale.com \
    --to=scottwood@freescale.com \
    --cc=axel.lin@gmail.com \
    --cc=chuanxiao.dong@intel.com \
    --cc=jamie@jamieiles.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mikedunn@newsguy.com \
    --cc=nick.spence@freescale.com \
    --cc=prabhakar@freescale.com \
    --cc=tie-fei.zang@freescale.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).