[UBI] is ubi_self_check_all_ff() with mtd_read() return value not match?
Ted Juan
ted.juan at gmail.com
Mon May 5 18:59:50 PDT 2014
Hi All,
int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len)
{
............................ // skip
err = mtd_read(ubi->mtd, addr, len, &read, buf);
if (err && !mtd_is_bitflip(err)) {
ubi_err("error %d while reading %d bytes from PEB
%d:%d, read %zd bytes",
err, len, pnum, offset, read);
goto error;
}
err = ubi_check_pattern(buf, 0xFF, len);
........................... // skip
}
In the low level nand flash driver (nand_base.c), the nand_read_page()
always return "max_bitflips".
That will cause the above code something wrong, err = mtd_read(), err
is max_bitflips.
It will "goto error" but not got to check pattern 0xff.
Is it something wrong, or I am misunderstanding?
Thanks much.
regards,
Ted
More information about the linux-mtd
mailing list