From: "Anders Grafström" <anders.grafstrom@netinsight.net>
To: David Woodhouse <dwmw2@infradead.org>,
Linux-MTD Mailing List <linux-mtd@lists.infradead.org>
Subject: [PATCH] mtd: cfi_cmdset_0001: Fix max timeout for locking operations
Date: Fri, 26 Feb 2010 21:54:19 +0100 [thread overview]
Message-ID: <4B8834FB.2070004@netinsight.net> (raw)
The max timeout is currently too short for some flash chips.
This patch increases it to 10 seconds. The typical timeout
remains unchanged (the tick period, 1000000/HZ).
Specification change #11 in '5 Volt Intel StrataFlash Memory Specification Update'
(297848-15) specifies an increase of Clear Block Lock-Bit Time Max to 7 sec.
This is contradicted by the table in Specification Change #8 which says .70 sec
but a 10 sec timeout doesn't hurt so play it safe.
Signed-off-by: Anders Grafström <anders.grafstrom@netinsight.net>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 9253043..83e4ae2 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -2077,7 +2077,7 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip
*/
udelay = (!extp || !(extp->FeatureSupport & (1 << 5))) ? 1000000/HZ : 0;
- ret = WAIT_TIMEOUT(map, chip, adr, udelay, udelay * 100);
+ ret = WAIT_TIMEOUT(map, chip, adr, udelay, udelay * HZ * 10);
if (ret) {
map_write(map, CMD(0x70), adr);
chip->state = FL_STATUS;
--
1.6.6.1
next reply other threads:[~2010-02-26 20:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 20:54 Anders Grafström [this message]
2010-04-01 12:14 ` [PATCH] mtd: cfi_cmdset_0001: Fix max timeout for locking operations Artem Bityutskiy
2010-05-13 23:06 ` David Woodhouse
2010-05-17 17:26 ` Anders Grafström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B8834FB.2070004@netinsight.net \
--to=anders.grafstrom@netinsight.net \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.