brcmnand (iproc): bitflips and ECC errors due to ignored ECC config

Rafał Miłecki zajec5 at gmail.com
Mon Jan 25 04:59:49 PST 2016


Hi,

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?

-- 
Rafał



More information about the linux-mtd mailing list