All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nand_wait_ready timeout fix
@ 2012-11-05 13:51 Matthieu CASTET
  2012-11-15 13:55 ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: Matthieu CASTET @ 2012-11-05 13:51 UTC (permalink / raw)
  To: linux-mtd; +Cc: Matthieu CASTET, dedekind1

nand_wait_ready timeout should not assume HZ=1000.
Make it independent of HZ value like it is done in nand_wait.

Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d5ece6e..ee49fe2 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -492,7 +492,7 @@ static void panic_nand_wait_ready(struct mtd_info *mtd, unsigned long timeo)
 void nand_wait_ready(struct mtd_info *mtd)
 {
 	struct nand_chip *chip = mtd->priv;
-	unsigned long timeo = jiffies + 2;
+	unsigned long timeo = jiffies + (2 * HZ) / 1000;
 
 	/* 400ms timeout */
 	if (in_interrupt() || oops_in_progress)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] nand_wait_ready timeout fix
@ 2012-11-22 17:31 Matthieu CASTET
  2012-11-23 12:45 ` Johan Gunnarsson
  2012-11-30 13:20 ` Artem Bityutskiy
  0 siblings, 2 replies; 7+ messages in thread
From: Matthieu CASTET @ 2012-11-22 17:31 UTC (permalink / raw)
  To: linux-mtd; +Cc: Matthieu CASTET, dedekind1

nand_wait_ready timeout should not assume HZ=100.
Make it independent of HZ value by using msecs_to_jiffies.

Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 1a03b7f..16e95e7 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -492,7 +492,7 @@ static void panic_nand_wait_ready(struct mtd_info *mtd, unsigned long timeo)
 void nand_wait_ready(struct mtd_info *mtd)
 {
 	struct nand_chip *chip = mtd->priv;
-	unsigned long timeo = jiffies + 2;
+	unsigned long timeo = jiffies + msecs_to_jiffies(20);
 
 	/* 400ms timeout */
 	if (in_interrupt() || oops_in_progress)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-30 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 13:51 [PATCH] nand_wait_ready timeout fix Matthieu CASTET
2012-11-15 13:55 ` Artem Bityutskiy
2012-11-22 17:06   ` Matthieu CASTET
2012-11-30 12:35     ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2012-11-22 17:31 Matthieu CASTET
2012-11-23 12:45 ` Johan Gunnarsson
2012-11-30 13:20 ` Artem Bityutskiy

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.