All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: <linux-mtd@lists.infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>,
	Toan Pham <tpham3783@gmail.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH] mtd: omap2: fix IOERR
Date: Fri, 15 Mar 2013 10:44:59 -0700	[thread overview]
Message-ID: <1363369499-29459-1-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <CAGNmLEPEkre4SwbVgBYhDPhqC+tkn-aLp9-bTjh8dv90Yo6_tw@mail.gmail.com>

From: Toan Pham <tpham3783@gmail.com>

Fix mtd-utils from returning -EIO.
Formatting jffs2 filesystem was impossible when CONFIG_HZ was set to a low
value.

Signed-off-by: Toan Pham <tpham3783@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
Toan: it looks like your mailer uses MIME/HTML formatting, whereas the mailing
list expects plain text. It also seems your tabs were replaced with spaces. I
am resubmitting your patch for you, as it is simple and is not worth a lot more
email struggles. Thanks for the fix!

 drivers/mtd/nand/omap2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index b97ef3b..81b80af 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1023,9 +1023,9 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)
 	int status, state = this->state;
 
 	if (state == FL_ERASING)
-		timeo += (HZ * 400) / 1000;
+		timeo += msecs_to_jiffies(400);
 	else
-		timeo += (HZ * 20) / 1000;
+		timeo += msecs_to_jiffies(20);
 
 	writeb(NAND_CMD_STATUS & 0xFF, info->reg.gpmc_nand_command);
 	while (time_before(jiffies, timeo)) {
-- 
1.7.9.5

       reply	other threads:[~2013-03-15 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGNmLEPEkre4SwbVgBYhDPhqC+tkn-aLp9-bTjh8dv90Yo6_tw@mail.gmail.com>
2013-03-15 17:44 ` Brian Norris [this message]
2013-04-04 15:17   ` [PATCH] mtd: omap2: fix IOERR Artem Bityutskiy
2013-04-04 15:35   ` Artem Bityutskiy

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=1363369499-29459-1-git-send-email-computersforpeace@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tpham3783@gmail.com \
    /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.