diff mbox

watchdog: wdat_wdt: Ping the watchdog on resume

Message ID 20161020150336.97791-1-mika.westerberg@linux.intel.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Mika Westerberg Oct. 20, 2016, 3:03 p.m. UTC
It turns out we need to ping the watchdog hardware on resume when we
re-program it. Otherwise this results inadvertent reset to trigger right
after the resume is completed.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/watchdog/wdat_wdt.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rafael J. Wysocki Oct. 20, 2016, 3:05 p.m. UTC | #1
On Thu, Oct 20, 2016 at 5:03 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> It turns out we need to ping the watchdog hardware on resume when we
> re-program it. Otherwise this results inadvertent reset to trigger right
> after the resume is completed.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Is there a Fixes: tag missing here?

> ---
>  drivers/watchdog/wdat_wdt.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
> index e473e3b23720..6d1fbda0f461 100644
> --- a/drivers/watchdog/wdat_wdt.c
> +++ b/drivers/watchdog/wdat_wdt.c
> @@ -499,6 +499,10 @@ static int wdat_wdt_resume_noirq(struct device *dev)
>                 ret = wdat_wdt_enable_reboot(wdat);
>                 if (ret)
>                         return ret;
> +
> +               ret = wdat_wdt_ping(&wdat->wdd);
> +               if (ret)
> +                       return ret;
>         }
>
>         return wdat_wdt_start(&wdat->wdd);
> --

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mika Westerberg Oct. 20, 2016, 3:17 p.m. UTC | #2
On Thu, Oct 20, 2016 at 05:05:22PM +0200, Rafael J. Wysocki wrote:
> On Thu, Oct 20, 2016 at 5:03 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > It turns out we need to ping the watchdog hardware on resume when we
> > re-program it. Otherwise this results inadvertent reset to trigger right
> > after the resume is completed.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> 
> Is there a Fixes: tag missing here?

Oops, right. Sorry about that.

It should be:

Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")

(I can resend the patch as well, if needed with the Fixes tag).

> > ---
> >  drivers/watchdog/wdat_wdt.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
> > index e473e3b23720..6d1fbda0f461 100644
> > --- a/drivers/watchdog/wdat_wdt.c
> > +++ b/drivers/watchdog/wdat_wdt.c
> > @@ -499,6 +499,10 @@ static int wdat_wdt_resume_noirq(struct device *dev)
> >                 ret = wdat_wdt_enable_reboot(wdat);
> >                 if (ret)
> >                         return ret;
> > +
> > +               ret = wdat_wdt_ping(&wdat->wdd);
> > +               if (ret)
> > +                       return ret;
> >         }
> >
> >         return wdat_wdt_start(&wdat->wdd);
> > --
> 
> Thanks,
> Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Oct. 20, 2016, 3:48 p.m. UTC | #3
On Thu, Oct 20, 2016 at 5:17 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Thu, Oct 20, 2016 at 05:05:22PM +0200, Rafael J. Wysocki wrote:
>> On Thu, Oct 20, 2016 at 5:03 PM, Mika Westerberg
>> <mika.westerberg@linux.intel.com> wrote:
>> > It turns out we need to ping the watchdog hardware on resume when we
>> > re-program it. Otherwise this results inadvertent reset to trigger right
>> > after the resume is completed.
>> >
>> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>>
>> Is there a Fixes: tag missing here?
>
> Oops, right. Sorry about that.
>
> It should be:
>
> Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
>
> (I can resend the patch as well, if needed with the Fixes tag).

No worries, I can pick this up from here.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 20, 2016, 10:19 p.m. UTC | #4
On Thu, Oct 20, 2016 at 06:03:36PM +0300, Mika Westerberg wrote:
> It turns out we need to ping the watchdog hardware on resume when we
> re-program it. Otherwise this results inadvertent reset to trigger right
> after the resume is completed.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Acked-by: Guenter Roeck <linux@roeck-us.net>

[ assuming Rafael is going to pick it up ]

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Oct. 20, 2016, 10:47 p.m. UTC | #5
On Fri, Oct 21, 2016 at 12:19 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Thu, Oct 20, 2016 at 06:03:36PM +0300, Mika Westerberg wrote:
>> It turns out we need to ping the watchdog hardware on resume when we
>> re-program it. Otherwise this results inadvertent reset to trigger right
>> after the resume is completed.
>>
>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
>
> [ assuming Rafael is going to pick it up ]

I am, thanks!

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mika Westerberg Oct. 21, 2016, 12:52 p.m. UTC | #6
On Thu, Oct 20, 2016 at 05:48:32PM +0200, Rafael J. Wysocki wrote:
> On Thu, Oct 20, 2016 at 5:17 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > On Thu, Oct 20, 2016 at 05:05:22PM +0200, Rafael J. Wysocki wrote:
> >> On Thu, Oct 20, 2016 at 5:03 PM, Mika Westerberg
> >> <mika.westerberg@linux.intel.com> wrote:
> >> > It turns out we need to ping the watchdog hardware on resume when we
> >> > re-program it. Otherwise this results inadvertent reset to trigger right
> >> > after the resume is completed.
> >> >
> >> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >>
> >> Is there a Fixes: tag missing here?
> >
> > Oops, right. Sorry about that.
> >
> > It should be:
> >
> > Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
> >
> > (I can resend the patch as well, if needed with the Fixes tag).
> 
> No worries, I can pick this up from here.

Thanks :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index e473e3b23720..6d1fbda0f461 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -499,6 +499,10 @@  static int wdat_wdt_resume_noirq(struct device *dev)
 		ret = wdat_wdt_enable_reboot(wdat);
 		if (ret)
 			return ret;
+
+		ret = wdat_wdt_ping(&wdat->wdd);
+		if (ret)
+			return ret;
 	}
 
 	return wdat_wdt_start(&wdat->wdd);