[PATCH] [MTD] [OneNAND] Do not stop reading for ECC errors
Jörn Engel
joern at logfs.org
Mon Nov 5 08:25:12 EST 2007
On Fri, 2 November 2007 13:30:04 +0200, Adrian Hunter wrote:
>
> diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> index dd28355..616747c 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -855,6 +855,8 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
> this->command(mtd, ONENAND_CMD_READ, from, writesize);
> ret = this->wait(mtd, FL_READING);
> onenand_update_bufferram(mtd, from, !ret);
> + if (ret == -EBADMSG)
> + ret = 0;
Why is -EBADMSG dropped here?
> @@ -988,18 +995,16 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from,
> onenand_update_bufferram(mtd, from, 0);
>
> ret = this->wait(mtd, FL_READING);
> - /* First copy data and check return value for ECC handling */
> + if (ret && ret != -EBADMSG) {
> + printk(KERN_ERR "onenand_read_oob_nolock: read failed = 0x%x\n", ret);
> + break;
> + }
What about -EUCLEAN?
Jörn
--
It is better to die of hunger having lived without grief and fear,
than to live with a troubled spirit amid abundance.
-- Epictetus
More information about the linux-mtd
mailing list