[Gta04-owner] UBIFS instability

Dr. H. Nikolaus Schaller hns at goldelico.com
Fri May 17 10:18:58 CEST 2013

There have been several reports about UBIFS being instable.

I have done now some tests after compiling the MTD tests into the neil-plus kernel.

The result is clearly that the MTD layer (NAND flash driver) is not reliable.

If I repeat the same test, I sometimes get errors at different locations.
Or really strange things like:

[ 1087.417449] =================================================
[ 1087.424224] mtd_oobtest: MTD device: 4
[ 1087.428588] mtd_oobtest: MTD device size 530055168, eraseblock size 131072, page size 2048, count of eraseblocks 4044, pages per eraseblock 64, OOB size 64
[ 1087.443481] mtd_oobtest: scanning for bad eraseblocks
[ 1087.487060] mtd_oobtest: block 577 is bad
[ 1087.722625] mtd_oobtest: scanned 4044 eraseblocks, 1 are bad
[ 1087.729095] mtd_oobtest: test 1 of 5
[ 1087.733245] mtd_oobtest: erasing whole device
[ 1088.716247] nand_erase_nand: attempt to erase a bad block at page 0x00021f40
[ 1088.724884] mtd_oobtest: error -5 while erasing EB 2121
[ 1088.730346] mtd_oobtest: error -5 occurred
[ 1088.734954] =================================================

I.e. the driver reports an I/O error because it is instructed to erase a bad block. This
is not allowed by the flash driver as discussed here


A second run did pass this page and did fail elsewhere, but only in the third of 5 loops.

So the bad-block table does not match.

Most likely this is a clock/timing/configuration problem of the NAND controller on the DM3730 SoC.
Maybe also some interrupt issue. Maybe triggered by the MPURATE setting.

It did work better (but I had never run these tests) with the 2.6.32 kernel. But that old one was
based on the BeagleBoard XM kernel where TI had added tons of patches to the NAND driver.

So I would assume that only some fraction of the (necessary) patches did find their way
into the 3.7 mainline kernel.

We may have to look into Robert Nelsons kernel (If I could find the sources for direct access
anywhere) and watch for diffs.

-- hns

More information about the Gta04-owner mailing list