mtd: docg3 increase write/erase timeout
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Mar 26 20:59:20 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=a2b3d284ed65b9ada18fd2ffb66daffe9c0ff168
Commit: a2b3d284ed65b9ada18fd2ffb66daffe9c0ff168
Parent: a7baef1211b0ac218299965481e7cff9d68c1edd
Author: Robert Jarzmik <robert.jarzmik at free.fr>
AuthorDate: Thu Mar 22 21:00:51 2012 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Mar 27 01:03:03 2012 +0100
mtd: docg3 increase write/erase timeout
After several tries with ubifs, it appears empirically that constructor
provided figures for erase/write timeouts are underestimated. A timeout
of 100ms seems to work with a 5 years worn chip, and no timeouts occur
anymore.
Signed-off-by: Robert Jarzmik <robert.jarzmik at free.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/docg3.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 62e0111..be88eb6 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -1116,10 +1116,10 @@ static int doc_get_op_status(struct docg3 *docg3)
*/
static int doc_write_erase_wait_status(struct docg3 *docg3)
{
- int status, ret = 0;
+ int i, status, ret = 0;
- if (!doc_is_ready(docg3))
- usleep_range(3000, 3000);
+ for (i = 0; !doc_is_ready(docg3) && i < 5; i++)
+ msleep(20);
if (!doc_is_ready(docg3)) {
doc_dbg("Timeout reached and the chip is still not ready\n");
ret = -EAGAIN;
More information about the linux-mtd-cvs
mailing list