From: David Engraf <david.engraf@sysgo.com>
To: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sh@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: [PATCH] shwdt: fix usage of mod_timer
Date: Wed, 20 Jul 2011 13:03:39 +0000 [thread overview]
Message-ID: <4E26D22B.1040702@sysgo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
This patch fixes the usage of mod_timer and makes the driver usable.
mod_timer must be called with an absolute timeout in jiffies, the old
implementation used a relative timeout thus the hardware watchdog was
never triggered.
Signed-off-by: David Engraf <david.engraf@sysgo.com>
[-- Attachment #2: shwdt.patch --]
[-- Type: text/x-diff, Size: 525 bytes --]
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index db84f23..a267dc0 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -64,7 +64,7 @@
* misses its deadline, the kernel timer will allow the WDT to overflow.
*/
static int clock_division_ratio = WTCSR_CKS_4096;
-#define next_ping_period(cks) msecs_to_jiffies(cks - 4)
+#define next_ping_period(cks) (jiffies + msecs_to_jiffies(cks - 4))
static const struct watchdog_info sh_wdt_info;
static struct platform_device *sh_wdt_dev;
WARNING: multiple messages have this Message-ID (diff)
From: David Engraf <david.engraf@sysgo.com>
To: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sh@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: [PATCH] shwdt: fix usage of mod_timer
Date: Wed, 20 Jul 2011 15:03:39 +0200 [thread overview]
Message-ID: <4E26D22B.1040702@sysgo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
This patch fixes the usage of mod_timer and makes the driver usable.
mod_timer must be called with an absolute timeout in jiffies, the old
implementation used a relative timeout thus the hardware watchdog was
never triggered.
Signed-off-by: David Engraf <david.engraf@sysgo.com>
[-- Attachment #2: shwdt.patch --]
[-- Type: text/x-diff, Size: 525 bytes --]
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index db84f23..a267dc0 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -64,7 +64,7 @@
* misses its deadline, the kernel timer will allow the WDT to overflow.
*/
static int clock_division_ratio = WTCSR_CKS_4096;
-#define next_ping_period(cks) msecs_to_jiffies(cks - 4)
+#define next_ping_period(cks) (jiffies + msecs_to_jiffies(cks - 4))
static const struct watchdog_info sh_wdt_info;
static struct platform_device *sh_wdt_dev;
next reply other threads:[~2011-07-20 13:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 13:03 David Engraf [this message]
2011-07-20 13:03 ` [PATCH] shwdt: fix usage of mod_timer David Engraf
2011-07-21 7:53 ` Paul Mundt
2011-07-21 7:53 ` Paul Mundt
2011-07-22 18:32 ` Wim Van Sebroeck
2011-07-22 18:32 ` Wim Van Sebroeck
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=4E26D22B.1040702@sysgo.com \
--to=david.engraf@sysgo.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/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.