lkml.org 
[lkml]   [2017]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fsl_ifc_nand: fix handing of bit flips in erased nand
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

\
 
 \ /
  Last update: 2017-05-17 15:26    [W:0.137 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site