提交 9d032801 编写于 作者: A Adrian Hunter 提交者: Kyungmin Park

[MTD] OneNAND: Return an error if a read timeout occurs

If OneNAND is operating within specification, all operations should easily be
completed within the 20 millisecond timeout.
This patch faithlessly adds a check for the timeout and returns an error in
that case.
Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
上级 10b7a2bd
......@@ -333,6 +333,9 @@ static int onenand_wait(struct mtd_info *mtd, int state)
} else if (ecc & ONENAND_ECC_1BIT_ALL)
mtd->ecc_stats.corrected++;
}
} else if (state == FL_READING) {
printk(KERN_ERR "onenand_wait: read timeout! ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt);
return -EIO;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册