* [PATCH] [MTD] OneNAND: Return an error if a read timeout occurs
@ 2007-01-10 15:23 Adrian Hunter
0 siblings, 0 replies; only message in thread
From: Adrian Hunter @ 2007-01-10 15:23 UTC (permalink / raw)
To: ext Kyungmin Park; +Cc: linux-mtd@lists.infradead.org
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>
---
drivers/mtd/onenand/onenand_base.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 02ad959..ff85a4f 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
} 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;
--
1.4.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-10 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-10 15:23 [PATCH] [MTD] OneNAND: Return an error if a read timeout occurs Adrian Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox