[PATCH] mtd: nand: docg4: ecc.read_page() returns 0 on uncorrectible errors
Brian Norris
computersforpeace at gmail.com
Fri Sep 14 23:20:55 EDT 2012
On Tue, Sep 11, 2012 at 8:50 AM, Mike Dunn <mikedunn at newsguy.com> wrote:
> diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
> index 793921e..deb718c 100644
> --- a/drivers/mtd/nand/docg4.c
> +++ b/drivers/mtd/nand/docg4.c
> @@ -776,6 +776,8 @@ static int read_page(struct mtd_info *mtd, struct nand_chip *nand,
> }
>
> writew(0, docptr + DOC_DATAEND);
> + if (bits_corrected == -EBADMSG) /* uncorrectible errors */
s/uncorrectible/uncorrectable/
> + return 0;
> return bits_corrected;
> }
>
With that change:
Acked-by: Brian Norris <computersforpeace at gmail.com>
Also, not a blocker for this patch, but this made me look elsewhere in docg4.c:
static int __init read_factory_bbt(struct mtd_info *mtd)
{
...
status = docg4_read_page(mtd, nand, buf, 0, DOCG4_FACTORY_BBT_PAGE);
if (status)
goto exit;
This could cause problems if there are ever bitflips on the BBT page.
Can the factory BBT contain bitflips?
Brian
More information about the linux-mtd
mailing list