aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand/onenand_base.c
diff options
context:
space:
mode:
authorAdrian Hunter <hunter.programmer@gmail.com>2007-01-10 00:51:26 -0500
committerKyungmin Park <kyungmin.park@samsung.com>2007-01-17 20:59:44 -0500
commit9d03280129e84f8cdfd83f84803a4548e3bf697d (patch)
tree2cce5d630864168ffd2427062094479d3bcf3ec5 /drivers/mtd/onenand/onenand_base.c
parent10b7a2bd6bf3510cbb5977a44d8822f085738729 (diff)
[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: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/mtd/onenand/onenand_base.c')
-rw-r--r--drivers/mtd/onenand/onenand_base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index d0f31183d58f..ce1cbdcd355a 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -333,6 +333,9 @@ static int onenand_wait(struct mtd_info *mtd, int state)
333 } else if (ecc & ONENAND_ECC_1BIT_ALL) 333 } else if (ecc & ONENAND_ECC_1BIT_ALL)
334 mtd->ecc_stats.corrected++; 334 mtd->ecc_stats.corrected++;
335 } 335 }
336 } else if (state == FL_READING) {
337 printk(KERN_ERR "onenand_wait: read timeout! ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt);
338 return -EIO;
336 } 339 }
337 340
338 return 0; 341 return 0;