From: Mike Dunn <mikedunn@newsguy.com>
To: Ivan Djelic <ivan.djelic@parrot.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 0/7] mtd: Change meaning of -EUCLEAN return code on reads
Date: Wed, 25 Apr 2012 08:56:11 -0700 [thread overview]
Message-ID: <4F981E9B.9050602@newsguy.com> (raw)
In-Reply-To: <20120425112319.GA23701@parrot.com>
On 04/25/2012 04:23 AM, Ivan Djelic wrote:
>
> Thanks for this new version.
> The whole series of patches looks OK to me, except for one small glitch:
> 'mtd->bitflip_threshold' can be customized by the driver, but in that case it is not
> propagated to the slave partition devices (the same way 'ecc_strength' is propagated).
> Something like this is missing:
>
> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
> index d6321f6..d518e4d 100644
> --- a/drivers/mtd/mtdpart.c
> +++ b/drivers/mtd/mtdpart.c
> @@ -517,6 +517,8 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
>
> slave->mtd.ecclayout = master->ecclayout;
> slave->mtd.ecc_strength = master->ecc_strength;
> + slave->mtd.bitflip_threshold = master->bitflip_threshold;
> +
> if (master->_block_isbad) {
> uint64_t offs = 0;
>
Yes, you're right. Without this it breaks if the driver sets bitflip_threshold.
> Apart from that, I was able to run a few tests on a BeagleBoard revC3 with simulated
> bitflips, dropping my own error concealment code in favor of your patch. I did the
> following checks:
> - when errors_corrected < bitflip_threshold, check that mtd_read() returns 0
> - when errors_corrected >= bitflip_threshold, check that mtd_read() returns -EUCLEAN
> - check if driver customization of bitflip_threshold works
I guess I should have performed this test too :)
> - check if per-partition customization of bitflip_threshold through sysfs works
> Everything worked as expected.
Thanks once again Ivan. I'll follow up with a new version of the patch set in a
day or too.
Mike
prev parent reply other threads:[~2012-04-25 15:56 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
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 [this message]
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=4F981E9B.9050602@newsguy.com \
--to=mikedunn@newsguy.com \
--cc=ivan.djelic@parrot.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;
as well as URLs for NNTP newsgroup(s).