aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2012-03-22 16:00:51 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 20:03:03 -0400
commita2b3d284ed65b9ada18fd2ffb66daffe9c0ff168 (patch)
treedf91e0238a33aa97606a91c285d8f293206d06f2
parenta7baef1211b0ac218299965481e7cff9d68c1edd (diff)
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@free.fr> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/devices/docg3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 62e01113c317..be88eb6217cb 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)
1116 */ 1116 */
1117static int doc_write_erase_wait_status(struct docg3 *docg3) 1117static int doc_write_erase_wait_status(struct docg3 *docg3)
1118{ 1118{
1119 int status, ret = 0; 1119 int i, status, ret = 0;
1120 1120
1121 if (!doc_is_ready(docg3)) 1121 for (i = 0; !doc_is_ready(docg3) && i < 5; i++)
1122 usleep_range(3000, 3000); 1122 msleep(20);
1123 if (!doc_is_ready(docg3)) { 1123 if (!doc_is_ready(docg3)) {
1124 doc_dbg("Timeout reached and the chip is still not ready\n"); 1124 doc_dbg("Timeout reached and the chip is still not ready\n");
1125 ret = -EAGAIN; 1125 ret = -EAGAIN;