From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo-p05-ob.rzone.de ([81.169.146.181]) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1MeNbD-0006Dp-KB for linux-mtd@lists.infradead.org; Fri, 21 Aug 2009 06:27:48 +0000 From: Stefan Roese To: u-boot@lists.denx.de Subject: Re: [U-Boot] NAND ECC Error with wrong SMC ording bug Date: Fri, 21 Aug 2009 08:27:13 +0200 References: <19081.57584.173693.798535@cargo.ozlabs.ibm.com> <20090820153644.631dbd7b@lappy.seanm.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200908210827.13700.sr@denx.de> Cc: linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org, vimal singh , Sean MacLennan List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 21 August 2009 07:17:09 vimal singh wrote: > > diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c > > index 89bf85a..497e175 100644 > > --- a/drivers/mtd/nand/ndfc.c > > +++ b/drivers/mtd/nand/ndfc.c > > @@ -101,9 +101,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtd, > > > > wmb(); > > ecc = in_be32(ndfc->ndfcbase + NDFC_ECC); > > - /* The NDFC uses Smart Media (SMC) bytes order */ > > - ecc_code[0] = p[2]; > > - ecc_code[1] = p[1]; > > + ecc_code[0] = p[1]; > > + ecc_code[1] = p[2]; > > ecc_code[2] = p[3]; > > > > return 0; > > > > Does anybody see a problem with my method of reproducing the bug? This > > bug is deadly for our customers. I don't want to make the change unless > > it is absolutely necessary.. > > Just one question: did you enabled MTD_NAND_ECC_SMC in configs? Yes, MTD_NAND_ECC_SMC is selected via Kconfig for this driver. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de