Linux 3.10.24 Oops with Freescale MTD_NAND_FSL_ELBC

Barry G mr.scada at gmail.com
Tue Jan 21 10:34:30 EST 2014


On Fri, Jan 17, 2014 at 10:08 AM, Barry G <mr.scada at gmail.com> wrote:

> LR [c01cb430] nand_write_subpage_hwecc+0x6c/0x16c

I bisected down the issue and the commit that breaks our system is:
837a6ba4f - mtd: nand: subpage write support for hardware based ECC schemes

The problem is nand_write_subpage_hwecc gets called, but ecc.hwctl
and ecc.calculate are NULL since they aren't setup in the fsl_elbc_nand
driver (or anywhere else).

My 8308 has the DECC in the BR configured as binary 10 - ECC checking and
generation are enabled for FCM on full-page transfers.  There isn't
a setting for sub-page ECC.

A correct and working version of the kernel reports:
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: max. sequence number:       689932
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "ubi"
UBI: MTD device size:            512 MiB
UBI: number of good PEBs:        4089
UBI: number of bad PEBs:         7
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     2
UBI: available PEBs:             61
UBI: total number of reserved PEBs: 4028
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 239/169
UBI: image sequence number:  -80103396
UBI: background thread "ubi_bgt0d" started, PID 191


Failed Workarounds I tried:
I tried setting options = NAND_NO_SUBPAGE_WRITE but that results in:
UBI: attaching mtd1 to ubi0
UBI error: validate_ec_hdr: bad VID header offset 512, expected 2048
UBI error: validate_ec_hdr: bad EC header

Futher forcing everything to 512 offset (ubi=1,512) results in:
UBI warning: io_init: EC and VID headers are in the same minimal I/O
unit, switch to read-only mode

Successful Workarounds:
Backing out 837a6ba4f "fixes" it and allows my system to boot on v3.10.24.

Not sure how best to proceed.

Thanks for the help,

Barry



More information about the linux-mtd mailing list