All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Dunn <mikedunn@newsguy.com>
To: linux-mtd@lists.infradead.org
Cc: Mike Dunn <mikedunn@newsguy.com>
Subject: [PATCH 1/4] MTD: add ecc_strength fields to mtd structs
Date: Sun, 11 Mar 2012 14:21:10 -0700	[thread overview]
Message-ID: <1331500873-9792-2-git-send-email-mikedunn@newsguy.com> (raw)
In-Reply-To: <1331500873-9792-1-git-send-email-mikedunn@newsguy.com>

This adds 'ecc_strength' to struct mtd_info.  This stores the maximum number of
bit errors that can be corrected in one writesize region.

For consistency with the nand code, 'strength' is similiarly added to struct
nand_ecc_ctrl.  This stores the maximum number of bit errors that can be
corrected in one ecc step.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
---
 include/linux/mtd/mtd.h  |    3 +++
 include/linux/mtd/nand.h |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 726c2d1..cf5ea8c 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -164,6 +164,9 @@ struct mtd_info {
 	/* ECC layout structure pointer - read only! */
 	struct nand_ecclayout *ecclayout;
 
+	/* max number of correctible bit errors per writesize */
+	unsigned int ecc_strength;
+
 	/* Data for variable erase regions. If numeraseregions is zero,
 	 * it means that the whole device has erasesize as given above.
 	 */
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 609868f..1482340 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -324,6 +324,7 @@ struct nand_hw_control {
  * @steps:	number of ECC steps per page
  * @size:	data bytes per ECC step
  * @bytes:	ECC bytes per step
+ * @strength:	max number of correctible bits per ECC step
  * @total:	total number of ECC bytes per page
  * @prepad:	padding information for syndrome based ECC generators
  * @postpad:	padding information for syndrome based ECC generators
@@ -351,6 +352,7 @@ struct nand_ecc_ctrl {
 	int size;
 	int bytes;
 	int total;
+	int strength;
 	int prepad;
 	int postpad;
 	struct nand_ecclayout	*layout;
-- 
1.7.3.4

  reply	other threads:[~2012-03-11 22:22 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 ` Mike Dunn [this message]
2012-03-13 12:25   ` [PATCH 1/4] MTD: add ecc_strength fields to mtd structs 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
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=1331500873-9792-2-git-send-email-mikedunn@newsguy.com \
    --to=mikedunn@newsguy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.