[V2, 1/2] mtd: brcmnand: Add check for erased page bitflips

Kamal Dasu kamal.dasu at broadcom.com
Thu Jun 9 10:55:39 PDT 2016


Boris,

>> +
>> +     for (i = 0; i < chip->ecc.steps; i++, oob += sas) {
>> +             bitflips = nand_check_erased_ecc_chunk(buf, chip->ecc.size,
>> +                                                    oob, sas, NULL, 0,
>> +                                                    chip->ecc.strength);
>> +             /* Too many bitflips */
>> +             if (bitflips < 0)
>> +                     break;
>
> Hm, should be
>                 ret = nand_check_erased_ecc_chunk(buf, chip->ecc.size,
>                                                   oob, sas, NULL, 0,
>                                                   chip->ecc.strength);
>                 if (ret < 0)
>                         return ret;
>
>                 bitflips = max(bitflips, ret);
>

Sounds reasonable to  return max bitflips from a sector within a page
instead of the last count. I will  make the change accordingly and
send a V3 patch.

Thanks
Kamal



More information about the linux-mtd mailing list