linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org
Subject: Re: [PATCH] watchdog: tegra: Stop watchdog first if restarting
Date: Fri, 13 Nov 2015 11:52:30 -0800	[thread overview]
Message-ID: <56463F7E.8040008@roeck-us.net> (raw)
In-Reply-To: <1447114298-5516-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 11/09/2015 04:11 PM, Andrew Chew wrote:
> If we need to restart the watchdog due to someone changing the timeout
> interval, stop the watchdog before restarting it.  Otherwise, the new
> timeout doesn't seem to take.
>
> Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

Some feedback from the maintainers would be helpful, though,
especially if there is some other means to change the timeout
without stopping the watchdog.

Guenter

> ---
>   drivers/watchdog/tegra_wdt.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/tegra_wdt.c b/drivers/watchdog/tegra_wdt.c
> index 7f97cdd..9ec5760 100644
> --- a/drivers/watchdog/tegra_wdt.c
> +++ b/drivers/watchdog/tegra_wdt.c
> @@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
>   {
>   	wdd->timeout = timeout;
>
> -	if (watchdog_active(wdd))
> +	if (watchdog_active(wdd)) {
> +		tegra_wdt_stop(wdd);
>   		return tegra_wdt_start(wdd);
> +	}
>
>   	return 0;
>   }
>

  parent reply	other threads:[~2015-11-13 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  0:11 [PATCH] watchdog: tegra: Stop watchdog first if restarting Andrew Chew
     [not found] ` <1447114298-5516-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-13 19:52   ` Guenter Roeck [this message]
     [not found]     ` <56463F7E.8040008-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-11-16 10:48       ` Thierry Reding

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=56463F7E.8040008@roeck-us.net \
    --to=linux-0h96xk9xttrk1umjsbkqmq@public.gmane.org \
    --cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).