All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] watchdog: sama5d4: Fix setting timeout when watchdog is disabled
Date: Mon, 20 Feb 2017 00:52:13 +0100	[thread overview]
Message-ID: <20170219235213.qcxfne5yvs3uzwg3@piout.net> (raw)
In-Reply-To: <c9f336fd-8761-7999-4ac0-cf68eb6c8ba1@roeck-us.net>

On 19/02/2017 at 08:57:35 -0800, Guenter Roeck wrote:
> > > That means if the watchdog is running, the timeout would not be updated.
> > > It should be updated no matter if it is running or not.
> > > 
> > 
> > No, it is enabling the watchdog, then changing WDV and WDD and finally
> > disabling the watchdog if necessary. So, WDV and WDD are always changed.
> > 
> You are correct. Sorry for the noise.
> 
> Seems odd that the watchdog must be _running_ to change the timeout.
> Usually, if there is a restriction, it is the opposite. I hope this
> doesn't cause race conditions, where the watchdog fires immediately
> after being enabled due to a low timeout.
> 

While it is difficult to reproduce, I can confirm it races and sometimes
reset the SoC without any good reason. It doesn't matter whether it is
disabled or not

I've raised the issue at Atmel last Thursday so I don't have any answer
yet.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] watchdog: sama5d4: Fix setting timeout when watchdog is disabled
Date: Mon, 20 Feb 2017 00:52:13 +0100	[thread overview]
Message-ID: <20170219235213.qcxfne5yvs3uzwg3@piout.net> (raw)
In-Reply-To: <c9f336fd-8761-7999-4ac0-cf68eb6c8ba1@roeck-us.net>

On 19/02/2017 at 08:57:35 -0800, Guenter Roeck wrote:
> > > That means if the watchdog is running, the timeout would not be updated.
> > > It should be updated no matter if it is running or not.
> > > 
> > 
> > No, it is enabling the watchdog, then changing WDV and WDD and finally
> > disabling the watchdog if necessary. So, WDV and WDD are always changed.
> > 
> You are correct. Sorry for the noise.
> 
> Seems odd that the watchdog must be _running_ to change the timeout.
> Usually, if there is a restriction, it is the opposite. I hope this
> doesn't cause race conditions, where the watchdog fires immediately
> after being enabled due to a low timeout.
> 

While it is difficult to reproduce, I can confirm it races and sometimes
reset the SoC without any good reason. It doesn't matter whether it is
disabled or not

I've raised the issue at Atmel last Thursday so I don't have any answer
yet.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-02-19 23:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 19:30 [PATCH v2 1/3] watchdog: sama5d4: Cleanup init Alexandre Belloni
2017-02-16 19:30 ` Alexandre Belloni
2017-02-16 19:30 ` [PATCH v2 2/3] watchdog: sama5d4: Fix setting timeout when watchdog is disabled Alexandre Belloni
2017-02-16 19:30   ` Alexandre Belloni
2017-02-17 14:40   ` Guenter Roeck
2017-02-17 14:40     ` Guenter Roeck
2017-02-17 15:16     ` Alexandre Belloni
2017-02-17 15:16       ` Alexandre Belloni
2017-02-19 16:57       ` Guenter Roeck
2017-02-19 16:57         ` Guenter Roeck
2017-02-19 23:52         ` Alexandre Belloni [this message]
2017-02-19 23:52           ` Alexandre Belloni
2017-02-20  4:46           ` Guenter Roeck
2017-02-20  4:46             ` Guenter Roeck
2017-03-02 17:35             ` Alexandre Belloni
2017-03-02 17:35               ` Alexandre Belloni
2017-02-16 19:30 ` [PATCH v2 3/3] watchdog: sama5d4: Implement resume hook Alexandre Belloni
2017-02-16 19:30   ` Alexandre Belloni
2017-02-17 14:47   ` Guenter Roeck
2017-02-17 14:47     ` Guenter Roeck
2017-02-17 15:22     ` Alexandre Belloni
2017-02-17 15:22       ` Alexandre Belloni
2017-02-19 17:05       ` Guenter Roeck
2017-02-19 17:05         ` Guenter Roeck
2017-02-17 14:48 ` [PATCH v2 1/3] watchdog: sama5d4: Cleanup init Guenter Roeck
2017-02-17 14:48   ` Guenter Roeck
2017-02-17 15:35   ` Alexandre Belloni
2017-02-17 15:35     ` Alexandre Belloni
2017-02-19 16:53     ` Guenter Roeck
2017-02-19 16:53       ` Guenter Roeck

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=20170219235213.qcxfne5yvs3uzwg3@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nicolas.ferre@atmel.com \
    --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.