[PATCH] MTD: make s3c2410's correct_data indicate an error for multi-bit read errors

Artem Bityutskiy dedekind at infradead.org
Fri Oct 19 05:00:47 EDT 2007


On Fri, 2007-10-19 at 10:24 +0200, Jörn Engel wrote:
> > @@ -397,7 +397,7 @@ static int s3c2410_nand_correct_data(struct
> > mtd_info *mtd, u_char *dat,
> >         if ((diff0 & ~(1<<fls(diff0))) == 0)
> >                 return 1;
> > 
> > -       return 0;
> > +       return -1;
> >  }

Yup, Jörn is right, you should return -EBADMSG on ECC errors and
-EUCLEAN if there was a correctable bit-flip.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list