Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380779

Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field
Date 2016-04-17 19:00 +0200
Message-ID <roYdc-7sb-15@gated-at.bofh.it> (permalink)
References <roi4i-8kL-5@gated-at.bofh.it> <roi4k-8kL-53@gated-at.bofh.it> <rotj4-8tm-7@gated-at.bofh.it> <roXKb-7en-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 17 Apr 2016 18:27:40 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:

> On 16 April 2016 at 09:58, Boris Brezillon
> <boris.brezillon@free-electrons.com> wrote:
> > On Fri, 15 Apr 2016 21:54:10 +0200
> > Rafał Miłecki <zajec5@gmail.com> wrote:
> >
> >> Now we have all drivers properly setting this new field we can start
> >> using it and proceed with deprecating NAND_ECC_SOFT_BCH.
> >>
> >> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> >> ---
> >>  drivers/mtd/nand/nand_base.c | 98 ++++++++++++++++++++++++--------------------
> >>  1 file changed, 53 insertions(+), 45 deletions(-)
> >>
> >> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> >> index e1f3cf8..ffd1b32 100644
> >> --- a/drivers/mtd/nand/nand_base.c
> >> +++ b/drivers/mtd/nand/nand_base.c
> >> @@ -4154,7 +4154,7 @@ int nand_scan_tail(struct mtd_info *mtd)
> >>       /*
> >>        * If no default placement scheme is given, select an appropriate one.
> >>        */
> >> -     if (!mtd->ooblayout && (ecc->mode != NAND_ECC_SOFT_BCH)) {
> >> +     if (!mtd->ooblayout && ecc->algo != NAND_ECC_BCH) {
> >
> > Should be:
> >
> >         if (!mtd->ooblayout && ecc->algo == NAND_ECC_SOFT &&
> >             ecc->algo != NAND_ECC_BCH) {
> >
> > Otherwise you're also taking the NAND_ECC_HW + NAND_ECC_BCH into
> > account.
> 
> Pretty much yes, but without
> [PATCH 11/12] of: mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
> we may be getting NAND_ECC_SOFT as well as NAND_ECC_SOFT_BCH. And
> 11/12 can't be applied before 10/12. We'll need to support both values
> for this very short moment (after 10/12 but before 11/12).


Why can't you move patch 11 before patch 10. The DT parsing code has
already been patched to set both ecc->algo to NAND_ECC_BCH and
ecc->mode to NAND_ECC_SOFT, so, to it seems perfectly safe to reorder
those changes to me (and change the test as suggested).

Am I missing something?

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 10/12] mtd: nand: read ECC algorithm from the new field Rafał Miłecki <zajec5@gmail.com> - 2016-04-15 22:00 +0200
  Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-16 10:00 +0200
    Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-16 10:20 +0200
    Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field Rafał Miłecki <zajec5@gmail.com> - 2016-04-17 18:30 +0200
      Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field Rafał Miłecki <zajec5@gmail.com> - 2016-04-17 19:00 +0200
      Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-17 19:00 +0200
        Re: [PATCH 10/12] mtd: nand: read ECC algorithm from the new field Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-17 19:00 +0200

csiph-web