Preamble

The Seagate GoFlex Home is fitted with a Toshiba TC58NVG1S3ETA00 256Mbyte NAND flash.

During boot the NAND driver detects it as:

NAND device: Manufacturer ID: 0x98, Chip ID: 0xda (Toshiba NAND 256MiB 3,3V 8-bit)

When loading a new kernel or a new UBI image we get the following error which suggests either a buggy NAND driver, a problem with ECC or a subpage problem.

uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes

Below are the results of various MTD Tests.

MTD Nand ECC Test

[root@fedora-arm tests]# insmod mtd_nandecctest.ko
mtd_nandecctest: ok - nand-ecc-256
mtd_nandecctest: ok - nand-ecc-512

The ECC checks out . .

MTD PageTest

[root@fedora-arm tests]# insmod mtd_pagetest.ko dev=2


=================================================
mtd_pagetest: MTD device: 2
mtd_pagetest: MTD device size 261095424, eraseblock size 131072, page size 2048, count of eraseblocks 1992, pages per eraseblock 64, OOB size 64
mtd_pagetest: scanning for bad eraseblocks
mtd_pagetest: scanned 1992 eraseblocks, 0 are bad
mtd_pagetest: erasing whole device
mtd_pagetest: erased 1992 eraseblocks
mtd_pagetest: writing whole device
mtd_pagetest: written up to eraseblock 0
mtd_pagetest: written up to eraseblock 256
mtd_pagetest: written up to eraseblock 512
mtd_pagetest: written up to eraseblock 768
mtd_pagetest: written up to eraseblock 1024
mtd_pagetest: written up to eraseblock 1280
mtd_pagetest: written up to eraseblock 1536
mtd_pagetest: written up to eraseblock 1792
mtd_pagetest: written 1992 eraseblocks
mtd_pagetest: verifying all eraseblocks
mtd_pagetest: verified up to eraseblock 0
mtd_pagetest: verified up to eraseblock 256
mtd_pagetest: verified up to eraseblock 512
mtd_pagetest: verified up to eraseblock 768
mtd_pagetest: verified up to eraseblock 1024
mtd_pagetest: verified up to eraseblock 1280
mtd_pagetest: verified up to eraseblock 1536
mtd_pagetest: verified up to eraseblock 1792
mtd_pagetest: verified 1992 eraseblocks
mtd_pagetest: crosstest
mtd_pagetest: reading page at 0x0
mtd_pagetest: reading page at 0xf8ff800
mtd_pagetest: reading page at 0x0
mtd_pagetest: verifying pages read at 0x0 match
mtd_pagetest: crosstest ok
mtd_pagetest: erasecrosstest
mtd_pagetest: erasing block 0
mtd_pagetest: writing 1st page of block 0
mtd_pagetest: reading 1st page of block 0
mtd_pagetest: verifying 1st page of block 0
mtd_pagetest: erasing block 0
mtd_pagetest: writing 1st page of block 0
mtd_pagetest: erasing block 1991
mtd_pagetest: reading 1st page of block 0
mtd_pagetest: verifying 1st page of block 0
mtd_pagetest: erasecrosstest ok
mtd_pagetest: erasetest
mtd_pagetest: erasing block 0
mtd_pagetest: writing 1st page of block 0
mtd_pagetest: erasing block 0
mtd_pagetest: reading 1st page of block 0
mtd_pagetest: verifying 1st page of block 0 is all 0xff
mtd_pagetest: erasetest ok
mtd_pagetest: finished with 0 errors
=================================================

No problems with the page test ...

MTD Sub Page Test

[root@fedora-arm tests]# insmod mtd_subpagetest.ko dev=2

=================================================
mtd_subpagetest: MTD device: 2
mtd_subpagetest: MTD device size 261095424, eraseblock size 131072, page size 2048, subpage size 512, count of eraseblocks 1992, pages per eraseblock 64, OOB size 64
mtd_subpagetest: scanning for bad eraseblocks
mtd_subpagetest: scanned 1992 eraseblocks, 0 are bad
mtd_subpagetest: erasing whole device
mtd_subpagetest: erased 1992 eraseblocks
mtd_subpagetest: writing whole device
mtd_subpagetest: written up to eraseblock 0
mtd_subpagetest: written up to eraseblock 256
mtd_subpagetest: written up to eraseblock 512
mtd_subpagetest: written up to eraseblock 768
mtd_subpagetest: written up to eraseblock 1024
mtd_subpagetest: written up to eraseblock 1280
mtd_subpagetest: written up to eraseblock 1536
mtd_subpagetest: written up to eraseblock 1792
mtd_subpagetest: written 1992 eraseblocks
mtd_subpagetest: verifying all eraseblocks
uncorrectable error :
mtd_subpagetest: error: read failed at 0x200
mtd_subpagetest: error -74 occurred
=================================================
insmod: error inserting 'mtd_subpagetest.ko': -1 Bad message

Bingo. Looks like we have a subpage problem. This is probably why the GoFlex Home boots from the UBI using the ubi.mtd=2,2048 kernel parameter. This sets the VID header to an offset of 2048 bytes (same than the page size) and avoids subpages.

MTD Read Test

[root@fedora-arm tests]# insmod mtd_readtest.ko dev=2

=================================================
mtd_readtest: MTD device: 2
mtd_readtest: MTD device size 261095424, eraseblock size 131072, page size 2048, count of eraseblocks 1992, pages per eraseblock 64, OOB size 64
mtd_readtest: scanning for bad eraseblocks
mtd_readtest: scanned 1992 eraseblocks, 0 are bad
mtd_readtest: testing page read
mtd_readtest: finished
=================================================