From: Guenter Roeck <linux@roeck-us.net>
To: Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 3/3] watchdog: xilinx: Add WDIOC_SETTIMEOUT ioctl function
Date: Thu, 30 May 2013 07:07:54 -0700 [thread overview]
Message-ID: <20130530140754.GB28232@roeck-us.net> (raw)
In-Reply-To: <595eb49b34909318959fe6825c209a7d635ed849.1369916757.git.michal.simek@xilinx.com>
On Thu, May 30, 2013 at 02:26:04PM +0200, Michal Simek wrote:
> Standard watchdog programs try to setup timeout
> via ioctl and this functionality should be implemented.
> Timeout value is hardcoded in the hardware but
> based on Documentation/watchdog/watchdog-api.txt
> can return the real timeout used in the same variable.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> drivers/watchdog/of_xilinx_wdt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
> index 79f358c..a3bbe72 100644
> --- a/drivers/watchdog/of_xilinx_wdt.c
> +++ b/drivers/watchdog/of_xilinx_wdt.c
> @@ -253,6 +253,7 @@ static long xwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> xwdt_keepalive();
> return 0;
>
> + case WDIOC_SETTIMEOUT:
> case WDIOC_GETTIMEOUT:
> if (no_timeout)
> return -ENOTTY;
Watchdog programs should check ident.options before trying to set the timeout.
If they don't, there is an application bug. I don't think it is a good idea
to start hacking the kernel to work around application bugs.
Guenter
next prev parent reply other threads:[~2013-05-30 14:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 12:26 [PATCH 1/3] watchdog: xilinx: Fix driver header Michal Simek
2013-05-30 12:26 ` [PATCH 2/3] watchdog: xilinx: Setup the origin compatible string Michal Simek
2013-05-30 14:00 ` Guenter Roeck
2013-05-30 14:04 ` Michal Simek
2013-05-30 12:26 ` [PATCH 3/3] watchdog: xilinx: Add WDIOC_SETTIMEOUT ioctl function Michal Simek
2013-05-30 14:07 ` Guenter Roeck [this message]
2013-05-30 14:15 ` Michal Simek
2013-05-30 14:21 ` Guenter Roeck
2013-05-30 14:34 ` Michal Simek
2013-05-30 15:03 ` Guenter Roeck
2013-05-30 15:12 ` Michal Simek
2013-05-30 15:25 ` Guenter Roeck
[not found] ` <CAHTX3dJ9fDJ6ggMGcF5v1vdcruMqnV4fv_6eP3U3DgOUfm8r+w@mail.gmail.com>
2013-05-30 22:08 ` Wim Van Sebroeck
2013-05-31 5:48 ` Michal Simek
2013-05-30 12:30 ` [PATCH 1/3] watchdog: xilinx: Fix driver header Venu Byravarasu
2013-05-30 12:32 ` Michal Simek
2013-05-30 14:26 ` Alejandro Cabrera
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=20130530140754.GB28232@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®