From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Alexander Couzens <lynxis@fe80.eu>
Cc: linux-mtd@lists.infradead.org, Richard Weinberger <richard@nod.at>
Subject: Re: [PATCH 2/3][v2] nand_base: use nand_ooblayout_lp_hamming_ops for 1bit hamming as default
Date: Tue, 2 May 2017 10:49:02 +0200 [thread overview]
Message-ID: <20170502104902.2060d733@bbrezillon> (raw)
In-Reply-To: <20170502081323.3138-3-lynxis@fe80.eu>
On Tue, 2 May 2017 10:13:22 +0200
Alexander Couzens <lynxis@fe80.eu> wrote:
> commit 41b207a70d3a ("mtd: nand: implement the default mtd_ooblayout_ops")
> uses a different ooblayout for platforms which doesn't set the
> layout by itself. Use for 1bit hamming the old layout.
Please merge patch 1 and 2 so that we end up with a
simple/self-contained patch that can be backported to stable kernels.
>
> Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
> ---
> drivers/mtd/nand/nand_base.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index daf3df157885..6a9e99377181 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -4724,7 +4724,11 @@ int nand_scan_tail(struct mtd_info *mtd)
> break;
> case 64:
> case 128:
> - mtd_set_ooblayout(mtd, &nand_ooblayout_lp_ops);
> + if (ecc->algo == NAND_ECC_HAMMING && ecc->strength == 1)
> + mtd_set_ooblayout(mtd,
> + &nand_ooblayout_lp_hamming_ops);
> + else
> + mtd_set_ooblayout(mtd, &nand_ooblayout_lp_ops);
Why not unconditionally setting it to nand_ooblayout_lp_hamming_ops to
restore the initial behavior. If one wants to use the new "large page"
layout he can still explicitly assign it (which is a good practice
anyway).
> break;
> default:
> WARN(1, "No oob scheme defined for oobsize %d\n",
next prev parent reply other threads:[~2017-05-02 8:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-12 20:02 [PATCH] nand_base: fix regression on nand with 64/128 oob size Alexander Couzens
2017-03-13 6:46 ` Boris Brezillon
2017-05-02 8:13 ` [PATCH 0/3][v2] fixing 1bit hamming Alexander Couzens
2017-05-02 8:21 ` Boris Brezillon
2017-05-02 10:19 ` [PATCH][v3] mtd: nand: add ooblayout for old hamming layout Alexander Couzens
2017-05-02 12:03 ` Boris Brezillon
2017-05-03 1:57 ` Brian Norris
2017-05-02 8:13 ` [PATCH 1/3][v2] mtd/nand: " Alexander Couzens
2017-05-02 8:41 ` Boris Brezillon
2017-05-02 8:57 ` Boris Brezillon
2017-05-02 8:13 ` [PATCH 2/3][v2] nand_base: use nand_ooblayout_lp_hamming_ops for 1bit hamming as default Alexander Couzens
2017-05-02 8:49 ` Boris Brezillon [this message]
2017-05-02 8:13 ` [PATCH 3/3][v3] mtd: nand: davinci: set ECC algorithm explicitly for HW based ECC Alexander Couzens
2017-05-02 9:00 ` Boris Brezillon
2017-05-02 10:30 ` Boris Brezillon
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=20170502104902.2060d733@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
--cc=lynxis@fe80.eu \
--cc=richard@nod.at \
/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.