Skip to contentSkip to conversation

mtd: omap2: fix IOERR

PATCH Applied Brian Norris 2 participants 3 messages Mar 15, 2013 – Apr 4, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CAGNmLEPEkre4SwbVgBYhDPhqC+tkn-aLp9-bTjh8dv90Yo6_tw@mail.gmail.com

#1 lore raw

PATCH 1/1 mtd: omap2: fix IOERR

From: Toan Pham <[email protected]>

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

---
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(-)
drivers/mtd/nand/omap2.c +2 -2
index b97ef3b..81b80af 100644
@@ -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)) {
Signature · 1 line
1.7.9.5