Unclear comment about nand->ecc.read_page ?
Masahiro Yamada
yamada.masahiro at socionext.com
Mon Nov 21 19:34:11 PST 2016
I take back this question.
2016-11-22 9:56 GMT+09:00 Masahiro Yamada <yamada.masahiro at socionext.com>:
> Hi.
>
> I have a question about the following comment in
> include/linux/mtd/nand.h:
>
> * @read_page: function to read a page according to the ECC generator
> * requirements; returns maximum number of bitflips corrected in
> * any single ECC step, 0 if bitflips uncorrectable, -EIO hw error
>
>
>
> The "0 if bitflips uncorrectable" sounds like
> "the read function could not correct bitflips"
> (=uncorrectable ECC (EBADMSG) error).
>
The comment block is correct.
It was my misunderstanding.
nand->ecc.correct() should return -EBADMSG for uncorrectable ECC error,
while nand->ecc.read_page() should return zero.
Sorry for noise.
--
Best Regards
Masahiro Yamada
More information about the linux-mtd
mailing list