linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: Mike Dunn <mikedunn@newsguy.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org,
	David Woodhouse <David.Woodhouse@intel.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH 4/4] MTD: drivers return max_bitflips, mtd returns -EUCLEAN
Date: Sat, 31 Mar 2012 09:37:52 +0300	[thread overview]
Message-ID: <20120331093752.341037b4@halley> (raw)
In-Reply-To: <4F765873.6090209@newsguy.com>

Hi Mike,

On Fri, 30 Mar 2012 18:05:55 -0700 Mike Dunn <mikedunn@newsguy.com> wrote:
> > This seems wrong in the case that mtd->euclean_threshold == 0. 
> 
> > This could be the case for any of the following:
> > (1) NAND that uses ECC_NONE
> > (2) NAND drivers with HW_ECC that don't initialize chip->ecc.strength
> > (3) MTD without ECC (e.g., NOR)
> > (4) Other drivers that might have missed initializing mtd->ecc_strength
> > 
> 
> 
> > If I'm correct, (3) is quite significant, since non-ECC'd MTDs would
> > produce EUCLEAN statuses on every read.
> 
> 
> Yup.  Again, oops!
> 

Please re-consider having the 'euclean_threshold' comparison within the
NAND infrastructure (nand_base.c and clones), instead of within the
generic 'mtd_read()' wrapper, as discussed in [1].

This would inherently fix (3).

For code unification, we can have a small inlined function that does the
comparison, which may be used by nand_base.c and the clones.

[1]
http://lists.infradead.org/pipermail/linux-mtd/2012-March/040371.html
http://lists.infradead.org/pipermail/linux-mtd/2012-March/040343.html

Regards,
Shmulik

  reply	other threads:[~2012-03-31  6:38 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-11 21:21 [PATCH 0/4] MTD: Change meaning of -EUCLEAN return code on reads Mike Dunn
2012-03-11 21:21 ` [PATCH 1/4] MTD: add ecc_strength fields to mtd structs Mike Dunn
2012-03-13 12:25   ` Artem Bityutskiy
2012-03-11 21:21 ` [PATCH 2/4] MTD: flash drivers set ecc strength Mike Dunn
2012-03-13 12:27   ` Artem Bityutskiy
2012-03-16 14:13   ` Ivan Djelic
2012-03-16 20:02     ` Mike Dunn
2012-03-29 17:24   ` Brian Norris
2012-03-31  0:05     ` Mike Dunn
2012-04-02 17:34     ` Mike Dunn
2012-04-03  8:03       ` Ivan Djelic
2012-03-11 21:21 ` [PATCH 3/4] MTD: euclean_threshold added to mtd_info and sysfs Mike Dunn
2012-03-13 12:29   ` Artem Bityutskiy
2012-03-11 21:21 ` [PATCH 4/4] MTD: drivers return max_bitflips, mtd returns -EUCLEAN Mike Dunn
2012-03-14 11:05   ` Shmulik Ladkani
2012-03-14 11:45     ` Shmulik Ladkani
2012-03-29 17:30   ` Brian Norris
2012-03-30 12:13     ` Artem Bityutskiy
2012-03-31  1:17       ` Mike Dunn
2012-04-02  7:17         ` Artem Bityutskiy
2012-04-02 15:33           ` Mike Dunn
2012-03-31  1:05     ` Mike Dunn
2012-03-31  6:37       ` Shmulik Ladkani [this message]
2012-04-02 16:40         ` Mike Dunn
2012-04-03  8:48           ` Shmulik Ladkani
2012-04-13 15:54             ` Artem Bityutskiy
2012-04-13 18:18               ` Mike Dunn
2012-03-13 12:03 ` [PATCH 0/4] MTD: Change meaning of -EUCLEAN return code on reads Artem Bityutskiy
2012-03-13 17:46   ` Mike Dunn
2012-03-13 22:14     ` Mike Dunn
2012-03-14 10:56     ` Artem Bityutskiy

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=20120331093752.341037b4@halley \
    --to=shmulik.ladkani@gmail.com \
    --cc=David.Woodhouse@intel.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mikedunn@newsguy.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).