All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Tzung-Bi Shih <tzungbi@kernel.org>, Lukasz Majczak <lma@chromium.org>
Cc: Gwendal Grignou <gwendal@chromium.org>,
	Radoslaw Biernacki <biernacki@google.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Lee Jones <lee@kernel.org>, Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	chrome-platform@lists.linux.dev
Subject: Re: [PATCH v2 2/3] watchdog: Add ChromeOS EC-based watchdog driver
Date: Thu, 18 Jan 2024 19:55:39 -0800	[thread overview]
Message-ID: <17e323d8-f8d3-4e5a-91aa-0788b8026f21@roeck-us.net> (raw)
In-Reply-To: <Zanvi4ih0zhC4aG7@google.com>

On 1/18/24 19:42, Tzung-Bi Shih wrote:
> On Thu, Jan 18, 2024 at 07:53:23PM +0000, Lukasz Majczak wrote:
>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
>> index 7d22051b15a2..4700b218340f 100644
>> --- a/drivers/watchdog/Kconfig
>> +++ b/drivers/watchdog/Kconfig
>> @@ -181,6 +181,17 @@ config BD957XMUF_WATCHDOG
>>   	  watchdog. Alternatively say M to compile the driver as a module,
>>   	  which will be called bd9576_wdt.
>>   
>> +config CROS_EC_WATCHDOG
>> +	tristate "ChromeOS EC-based watchdog"
>> +	select WATCHDOG_CORE
>> +	depends on CROS_EC
>> +	help
>> +	  Watchdog driver for Chromebook devices equipped with embedded controller.
>> +	  Trigger event is recorded in EC and checked on the subsequent boot.
> 
> Perhaps unrelated to the patch, but I'm curious what the mechanism is.  Does
> it use any existing paths for checking the saved events in EC?  What it does
> if there is a saved WDT reset event?
> 

Reporting the reason of the previous reset/restart is part of the watchdog API.

>> diff --git a/drivers/watchdog/cros_ec_wdt.c b/drivers/watchdog/cros_ec_wdt.c
> [...]
>> +static int cros_ec_wdt_ping(struct watchdog_device *wdd)
>> +{
> [...]
>> +	arg.req.command = EC_HANG_DETECT_CMD_RELOAD;
>> +	ret = cros_ec_wdt_send_cmd(cros_ec, &arg);
>> +	if (ret < 0)
>> +		dev_dbg(wdd->parent, "Failed to ping watchdog (%d)", ret);
> 
> I think this would be worth dev_info() or dev_warn()?
> 
>> +static int cros_ec_wdt_start(struct watchdog_device *wdd)
>> +{
> [...]
>> +	/* Prepare watchdog on EC side */
>> +	arg.req.command = EC_HANG_DETECT_CMD_SET_TIMEOUT;
>> +	arg.req.reboot_timeout_sec = wdd->timeout;
>> +	ret = cros_ec_wdt_send_cmd(cros_ec, &arg);
>> +	if (ret < 0)
>> +		dev_dbg(wdd->parent, "Failed to start watchdog (%d)", ret);
> 
> Same here: dev_info() or dev_warn()?
> 

We had that before. It is just noise. If it fails, it will likely
fail continuously, causing log spam. We don't do that kind of
continuous error messages for other watchdog drivers and should not
start doing it here.

Thanks,
Guenter


  reply	other threads:[~2024-01-19  3:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 19:53 [PATCH v2 0/3] Introduce EC-based watchdog Lukasz Majczak
2024-01-18 19:53 ` [PATCH v2 1/3] platform/chrome: Update binary interface for " Lukasz Majczak
2024-01-18 23:42   ` Guenter Roeck
2024-01-19  3:41   ` Tzung-Bi Shih
2024-01-19  8:34     ` Łukasz Majczak
2024-01-18 19:53 ` [PATCH v2 2/3] watchdog: Add ChromeOS EC-based watchdog driver Lukasz Majczak
2024-01-18 23:44   ` Guenter Roeck
2024-01-19  3:42   ` Tzung-Bi Shih
2024-01-19  3:55     ` Guenter Roeck [this message]
2024-01-19  5:28       ` Tzung-Bi Shih
2024-01-18 19:53 ` [PATCH v2 3/3] mfd: cros_ec: Register EC-based watchdog subdevice Lukasz Majczak
2024-01-18 23:44   ` Guenter Roeck
2024-01-19  8:36     ` Łukasz Majczak

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=17e323d8-f8d3-4e5a-91aa-0788b8026f21@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=biernacki@google.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=lma@chromium.org \
    --cc=tzungbi@kernel.org \
    --cc=wim@linux-watchdog.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 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.