brcmnand (iproc): bitflips and ECC errors due to ignored ECC config
Kamal Dasu
kdasu.kdev at gmail.com
Mon Feb 8 11:15:16 PST 2016
When SECTOR_SIZE = 512B, SPARE_AREA_SIZE = 16, ECC_LEVEL = 15 enables
1-bit Hamming ECC protection. So the ecc_level field is the SoC
internal representation for 1-bit hamming. If you mean by "removing
handling" you made strength=ecc_level=1, then you are now using 1-bit
BCH.
Kamal
On Mon, Feb 8, 2016 at 4:54 AM, Rafał Miłecki <zajec5 at gmail.com> wrote:
> On 25 January 2016 at 13:59, Rafał Miłecki <zajec5 at gmail.com> wrote:
>> I've a D-Link DIR-885L router with following NAND:
>> nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
>> nand: AMD/Spansion NAND 128MiB 3,3V 8-bit
>> nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
>>
>> It uses ECC strength 1 with step size 512 so I created DT with:
>> nand-ecc-strength = <1>;
>> nand-ecc-step-size = <512>;
>>
>> Unfortunately all I get from mtd_read are -EUCLEAN (6%) and -EBADMSG
>> (94%) errors. It's becase of the following code in brcmnand_setup_dev:
>> if (chip->ecc.strength == 1) /* Hamming */
>> cfg->ecc_level = 15;
>>
>> After removing this special handling of strength 1 I can use my NAND
>> as expected.
>>
>> Is there a good reason for this hamming condition? Can we add some way
>> of using strength 1?
>
> Ping?
>
> --
> Rafał
More information about the linux-mtd
mailing list