From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Sakoman Date: Thu, 18 Nov 2010 16:33:43 -0800 Subject: [U-Boot] fw_setenv broken? In-Reply-To: <20101118182014.75730ae2@udp111988uds.am.freescale.net> References: <1290011424.2927.1123.camel@quadra> <4CE4092B.7090209@denx.de> <20101117173933.665FE14EA7E@gemini.denx.de> <20101117204722.E34FC14EA7E@gemini.denx.de> <20101117214049.52CA614EA7E@gemini.denx.de> <20101117160802.5bacf545@udp111988uds.am.freescale.net> <1290125632.2927.1620.camel@quadra> <20101118182014.75730ae2@udp111988uds.am.freescale.net> Message-ID: <1290126823.2927.1623.camel@quadra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2010-11-18 at 18:20 -0600, Scott Wood wrote: > On Thu, 18 Nov 2010 16:13:52 -0800 > Steve Sakoman wrote: > > > The code generating both errors is in the nand_do_read_ops function in nand_base.c: > > > > if (mtd->ecc_stats.failed - stats.failed) > > return -EBADMSG; > > > > return mtd->ecc_stats.corrected - stats.corrected ? -EUCLEAN : 0; > > } > > > > I understand that the -EUCLEAN error indicates a correctable ECC error. What does the -EBADMSG error indicate? > > An uncorrectable ECC error (or other failure). > > > This condition doesn't seem to bother the linux driver, but u-boot doesn't like it at all! > > Check whether the ECC layout and code is the same for this driver in > both U-Boot and Linux. Since fw_printenv in Linux always can successfully read an environment written by U-boot (aqs well as those written by fw_setenv), wouldn't this indicate that they are using the same ECC layout? If they were different I would expect that compatibility in both directions would be broken. This is not my area of expertise, so perhaps I am just ignorant of how things work. Steve