[PATCH v2] mtd: gpmi: Deal with bitflips in erased regions regions

Brian Norris computersforpeace at gmail.com
Tue Dec 17 02:10:52 EST 2013


On Mon, Dec 16, 2013 at 12:30:41PM +0800, Huang Shijie wrote:
> On Sun, Dec 15, 2013 at 07:44:21PM +0100, Elie De Brauwer wrote:
> > --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
> > +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
> > @@ -286,6 +286,13 @@ int bch_set_geometry(struct gpmi_nand_data *this)
> >  			| BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(block_size, this),
> >  			r->bch_regs + HW_BCH_FLASH0LAYOUT1);
> >  
> > +	/*
> > +	 * Set the tolerance for bitflips when reading erased blocks
> > +	 * equal to the ecc_strength.
> > +	 */
> Please also add the following comment :
>    "We even detect the bitflips for SLC nand."

I don't think we need a comment specifically about SLC here in the code.
Unless otherwise stated, I think any comments should apply to both SLC
and MLC, right? But it could be worth mentioning in the _commit message_
that this problem occurs on both MLC and SLC, just for history's sake.

> > @@ -1094,6 +1101,16 @@ int gpmi_is_ready(struct gpmi_nand_data *this, unsigned chip)
> >  	return reg & mask;
> >  }
> >  
> > +/* Returns 1 if the last transaction consisted only out of ones. */
> > +int gpmi_allones(struct gpmi_nand_data *this)

Sorry to nitpick, but 'allones' is a bit confusing. It took me a few
seconds to parse that, since it almost looks like it could be a real
English word. Perhaps gpmi_all_ones()?

Thanks,
Brian



More information about the linux-mtd mailing list