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


Groups > linux.kernel > #1643362

Re: [PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand
Date 2017-05-17 15:30 +0200
Message-ID <tI7bB-3B5-27@gated-at.bofh.it> (permalink)
References (4 earlier) <tyiL0-8qv-13@gated-at.bofh.it> <tyEsa-4NC-25@gated-at.bofh.it> <tI6fw-32g-19@gated-at.bofh.it> <tI6pc-35o-17@gated-at.bofh.it> <tI6Se-3uO-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 17 May 2017 15:00:59 +0200
Pavel Machek <pavel@ucw.cz> wrote:

> 
> > > @@ -904,6 +922,21 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
> > >  		chip->ecc.algo = NAND_ECC_HAMMING;
> > >  	}
> > >  
> > > +	{
> > > +		struct mtd_oob_region oobregion = { };
> > > +
> > > +		mtd_ooblayout_ecc(mtd, 0, &oobregion);
> > > +		if (!oobregion.length) {
> > > +			dev_err(priv->dev, "No ECC in oobregion?\n");
> > > +			return -EINVAL;
> > > +		}
> > > +		mtd_ooblayout_ecc(mtd, 1, &oobregion);
> > > +		if (oobregion.length) {
> > > +			dev_err(priv->dev, "Extra data in oobregion?\n");
> > > +			return -EINVAL;
> > > +		}
> > > +	}  
> > 
> > This clearly doesn't belong in this patch. And if you really want to
> > check that, please create a separate function instead of defining a
> > non-conditional code block inside fsl_ifc_chip_init().  
> 
> I am not sure I want to check that. check_erased_page() can only
> handle layout with just one oobregion. If you think check is not
> needed, I'll happily remove the checking.

Let's drop it then. And please change the subject to "mtd: nand:
fsl_ifc: fix handing of bit flips in erased pages".

Thanks,

Boris

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


Thread

[PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand Pavel Machek <pavel@ucw.cz> - 2017-05-17 14:30 +0200
  Re: [PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-05-17 14:40 +0200
    Re: [PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand Pavel Machek <pavel@ucw.cz> - 2017-05-17 15:10 +0200
      Re: [PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-05-17 15:30 +0200
        [PATCH] mtd: nand: fsl_ifc: fix handing of bit flips in erased pages Pavel Machek <pavel@ucw.cz> - 2017-05-17 22:10 +0200

csiph-web