FBSDID("$FreeBSD: stable/10/sys/dev/nand/nand_generic.c 259371 2013-12-14 00:54:05Z ian $"); 10.1-BETA2 from 20140925 Line 395: chip_params->spare_bytes_per_page = le32dec(¶ms.spare_bytes_per_page); should be chip_params->spare_bytes_per_page = le16dec(¶ms.spare_bytes_per_page); On my AT91SAM9G20-based system (EMAC SOM-9G20M, 64 MB SDRAM) onfi_is_blk_bad() hung trying to malloc 0x20000040 bytes instead of 0x40. Thanks; FBSD rocks!
Updated 10.1-BETA and 10.1-RC versioned bugs to 10.1-STABLE.
A commit references this bug: Author: brueffer Date: Wed Jul 1 14:54:14 UTC 2015 New revision: 285006 URL: https://svnweb.freebsd.org/changeset/base/285006 Log: Use the correct le*dec function to decode a 16bit type. PR: 194228 Submitted by: David Horwitt MFC after: 2 weeks Changes: head/sys/dev/nand/nand_generic.c
Good catch David! I have committed this to HEAD and will merge it to the STABLE branches soon. Sorry for the long delay in getting this fixed.
A commit references this bug: Author: brueffer Date: Wed Jul 15 11:58:31 UTC 2015 New revision: 285599 URL: https://svnweb.freebsd.org/changeset/base/285599 Log: MFC: r285006 Use the correct le*dec function to decode a 16bit type. PR: 194228 Submitted by: David Horwitt Approved by: re (marius) Changes: _U stable/10/ stable/10/sys/dev/nand/nand_generic.c
Merged and will be in 10.2-RELEASE. Thanks again!