From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.nokia.com ([131.228.20.172] helo=mgw-ext13.nokia.com) by pentafluge.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1Iinm4-000769-KC for linux-mtd@lists.infradead.org; Fri, 19 Oct 2007 10:04:10 +0100 Subject: Re: [PATCH] MTD: make s3c2410's correct_data indicate an error for multi-bit read errors From: Artem Bityutskiy To: =?ISO-8859-1?Q?J=F6rn?= Engel In-Reply-To: <20071019082438.GA26913@lazybastard.org> References: <20071019082438.GA26913@lazybastard.org> Content-Type: text/plain; charset=UTF-8 Date: Fri, 19 Oct 2007 12:00:47 +0300 Message-Id: <1192784447.3421.27.camel@sauron> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: linux-mtd@lists.infradead.org, Matt Reimer Reply-To: dedekind@infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2007-10-19 at 10:24 +0200, J=C3=B6rn Engel wrote: > > @@ -397,7 +397,7 @@ static int s3c2410_nand_correct_data(struct > > mtd_info *mtd, u_char *dat, > > if ((diff0 & ~(1< > return 1; > >=20 > > - return 0; > > + return -1; > > } Yup, J=C3=B6rn is right, you should return -EBADMSG on ECC errors and -EUCLEAN if there was a correctable bit-flip. --=20 Best regards, Artem Bityutskiy (=D0=91=D0=B8=D1=82=D1=8E=D1=86=D0=BA=D0=B8=D0=B9 =D0=90= =D1=80=D1=82=D1=91=D0=BC)