<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/watchdog, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-08-21T11:07:39Z</updated>
<entry>
<title>watchdog: rti-wdt: balance pm runtime enable calls</title>
<updated>2020-08-21T11:07:39Z</updated>
<author>
<name>Tero Kristo</name>
</author>
<published>2020-07-17T13:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1e0ac52fd4fdc8b16928a564cc8a73be85b5adc'/>
<id>urn:sha1:b1e0ac52fd4fdc8b16928a564cc8a73be85b5adc</id>
<content type='text'>
[ Upstream commit d5b29c2c5ba2bd5bbdb5b744659984185d17d079 ]

PM runtime should be disabled in the fail path of probe and when
the driver is removed.

Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200717132958.14304-5-t-kristo@ti.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>watchdog: initialize device before misc_register</title>
<updated>2020-08-21T11:07:39Z</updated>
<author>
<name>Krzysztof Sobota</name>
</author>
<published>2020-07-17T10:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbc3b48eccd643d1a104fa00d4afad4c80400cdc'/>
<id>urn:sha1:cbc3b48eccd643d1a104fa00d4afad4c80400cdc</id>
<content type='text'>
[ Upstream commit cb36e29bb0e4b0c33c3d5866a0a4aebace4c99b7 ]

When watchdog device is being registered, it calls misc_register that
makes watchdog available for systemd to open. This is a data race
scenario, because when device is open it may still have device struct
not initialized - this in turn causes a crash. This patch moves
device initialization before misc_register call and it solves the
problem printed below.

------------[ cut here ]------------
WARNING: CPU: 3 PID: 1 at lib/kobject.c:612 kobject_get+0x50/0x54
kobject: '(null)' ((ptrval)): is not initialized, yet kobject_get() is being called.
Modules linked in: k2_reset_status(O) davinci_wdt(+) sfn_platform_hwbcn(O) fsmddg_sfn(O) clk_misc_mmap(O) clk_sw_bcn(O) fsp_reset(O) cma_mod(O) slave_sup_notif(O) fpga_master(O) latency(O+) evnotify(O) enable_arm_pmu(O) xge(O) rio_mport_cdev br_netfilter bridge stp llc nvrd_checksum(O) ipv6
CPU: 3 PID: 1 Comm: systemd Tainted: G           O      4.19.113-g2579778-fsm4_k2 #1
Hardware name: Keystone
[&lt;c02126c4&gt;] (unwind_backtrace) from [&lt;c020da94&gt;] (show_stack+0x18/0x1c)
[&lt;c020da94&gt;] (show_stack) from [&lt;c07f87d8&gt;] (dump_stack+0xb4/0xe8)
[&lt;c07f87d8&gt;] (dump_stack) from [&lt;c0221f70&gt;] (__warn+0xfc/0x114)
[&lt;c0221f70&gt;] (__warn) from [&lt;c0221fd8&gt;] (warn_slowpath_fmt+0x50/0x74)
[&lt;c0221fd8&gt;] (warn_slowpath_fmt) from [&lt;c07fd394&gt;] (kobject_get+0x50/0x54)
[&lt;c07fd394&gt;] (kobject_get) from [&lt;c0602ce8&gt;] (get_device+0x1c/0x24)
[&lt;c0602ce8&gt;] (get_device) from [&lt;c06961e0&gt;] (watchdog_open+0x90/0xf0)
[&lt;c06961e0&gt;] (watchdog_open) from [&lt;c06001dc&gt;] (misc_open+0x130/0x17c)
[&lt;c06001dc&gt;] (misc_open) from [&lt;c0388228&gt;] (chrdev_open+0xec/0x1a8)
[&lt;c0388228&gt;] (chrdev_open) from [&lt;c037fa98&gt;] (do_dentry_open+0x204/0x3cc)
[&lt;c037fa98&gt;] (do_dentry_open) from [&lt;c0391e2c&gt;] (path_openat+0x330/0x1148)
[&lt;c0391e2c&gt;] (path_openat) from [&lt;c0394518&gt;] (do_filp_open+0x78/0xec)
[&lt;c0394518&gt;] (do_filp_open) from [&lt;c0381100&gt;] (do_sys_open+0x130/0x1f4)
[&lt;c0381100&gt;] (do_sys_open) from [&lt;c0201000&gt;] (ret_fast_syscall+0x0/0x28)
Exception stack(0xd2ceffa8 to 0xd2cefff0)
ffa0:                   b6f69968 00000000 ffffff9c b6ebd210 000a0001 00000000
ffc0: b6f69968 00000000 00000000 00000142 fffffffd ffffffff 00b65530 bed7bb78
ffe0: 00000142 bed7ba70 b6cc2503 b6cc41d6
---[ end trace 7b16eb105513974f ]---

------------[ cut here ]------------
WARNING: CPU: 3 PID: 1 at lib/refcount.c:153 kobject_get+0x24/0x54
refcount_t: increment on 0; use-after-free.
Modules linked in: k2_reset_status(O) davinci_wdt(+) sfn_platform_hwbcn(O) fsmddg_sfn(O) clk_misc_mmap(O) clk_sw_bcn(O) fsp_reset(O) cma_mod(O) slave_sup_notif(O) fpga_master(O) latency(O+) evnotify(O) enable_arm_pmu(O) xge(O) rio_mport_cdev br_netfilter bridge stp llc nvrd_checksum(O) ipv6
CPU: 3 PID: 1 Comm: systemd Tainted: G        W  O      4.19.113-g2579778-fsm4_k2 #1
Hardware name: Keystone
[&lt;c02126c4&gt;] (unwind_backtrace) from [&lt;c020da94&gt;] (show_stack+0x18/0x1c)
[&lt;c020da94&gt;] (show_stack) from [&lt;c07f87d8&gt;] (dump_stack+0xb4/0xe8)
[&lt;c07f87d8&gt;] (dump_stack) from [&lt;c0221f70&gt;] (__warn+0xfc/0x114)
[&lt;c0221f70&gt;] (__warn) from [&lt;c0221fd8&gt;] (warn_slowpath_fmt+0x50/0x74)
[&lt;c0221fd8&gt;] (warn_slowpath_fmt) from [&lt;c07fd368&gt;] (kobject_get+0x24/0x54)
[&lt;c07fd368&gt;] (kobject_get) from [&lt;c0602ce8&gt;] (get_device+0x1c/0x24)
[&lt;c0602ce8&gt;] (get_device) from [&lt;c06961e0&gt;] (watchdog_open+0x90/0xf0)
[&lt;c06961e0&gt;] (watchdog_open) from [&lt;c06001dc&gt;] (misc_open+0x130/0x17c)
[&lt;c06001dc&gt;] (misc_open) from [&lt;c0388228&gt;] (chrdev_open+0xec/0x1a8)
[&lt;c0388228&gt;] (chrdev_open) from [&lt;c037fa98&gt;] (do_dentry_open+0x204/0x3cc)
[&lt;c037fa98&gt;] (do_dentry_open) from [&lt;c0391e2c&gt;] (path_openat+0x330/0x1148)
[&lt;c0391e2c&gt;] (path_openat) from [&lt;c0394518&gt;] (do_filp_open+0x78/0xec)
[&lt;c0394518&gt;] (do_filp_open) from [&lt;c0381100&gt;] (do_sys_open+0x130/0x1f4)
[&lt;c0381100&gt;] (do_sys_open) from [&lt;c0201000&gt;] (ret_fast_syscall+0x0/0x28)
Exception stack(0xd2ceffa8 to 0xd2cefff0)
ffa0:                   b6f69968 00000000 ffffff9c b6ebd210 000a0001 00000000
ffc0: b6f69968 00000000 00000000 00000142 fffffffd ffffffff 00b65530 bed7bb78
ffe0: 00000142 bed7ba70 b6cc2503 b6cc41d6
---[ end trace 7b16eb1055139750 ]---

Fixes: 72139dfa2464 ("watchdog: Fix the race between the release of watchdog_core_data and cdev")
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@nokia.com&gt;
Signed-off-by: Krzysztof Sobota &lt;krzysztof.sobota@nokia.com&gt;
Link: https://lore.kernel.org/r/20200717103109.14660-1-krzysztof.sobota@nokia.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>watchdog: f71808e_wdt: clear watchdog timeout occurred flag</title>
<updated>2020-08-21T11:07:29Z</updated>
<author>
<name>Ahmad Fatoum</name>
</author>
<published>2020-06-11T19:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edd26e0d21b71f50090040aab3c72c5c1b8ac24e'/>
<id>urn:sha1:edd26e0d21b71f50090040aab3c72c5c1b8ac24e</id>
<content type='text'>
commit 4f39d575844148fbf3081571a1f3b4ae04150958 upstream.

The flag indicating a watchdog timeout having occurred normally persists
till Power-On Reset of the Fintek Super I/O chip. The user can clear it
by writing a `1' to the bit.

The driver doesn't offer a restart method, so regular system reboot
might not reset the Super I/O and if the watchdog isn't enabled, we
won't touch the register containing the bit on the next boot.
In this case all subsequent regular reboots will be wrongly flagged
by the driver as being caused by the watchdog.

Fix this by having the flag cleared after read. This is also done by
other drivers like those for the i6300esb and mpc8xxx_wdt.

Fixes: b97cb21a4634 ("watchdog: f71808e_wdt: Fix WDTMOUT_STS register read")
Cc: stable@vger.kernel.org
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200611191750.28096-5-a.fatoum@pengutronix.de
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>watchdog: f71808e_wdt: remove use of wrong watchdog_info option</title>
<updated>2020-08-21T11:07:28Z</updated>
<author>
<name>Ahmad Fatoum</name>
</author>
<published>2020-06-11T19:17:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=02a943c1b83030836e8e474217cdf7ac103b1c9f'/>
<id>urn:sha1:02a943c1b83030836e8e474217cdf7ac103b1c9f</id>
<content type='text'>
commit 802141462d844f2e6a4d63a12260d79b7afc4c34 upstream.

The flags that should be or-ed into the watchdog_info.options by drivers
all start with WDIOF_, e.g. WDIOF_SETTIMEOUT, which indicates that the
driver's watchdog_ops has a usable set_timeout.

WDIOC_SETTIMEOUT was used instead, which expands to 0xc0045706, which
equals:

   WDIOF_FANFAULT | WDIOF_EXTERN1 | WDIOF_PRETIMEOUT | WDIOF_ALARMONLY |
   WDIOF_MAGICCLOSE | 0xc0045000

These were so far indicated to userspace on WDIOC_GETSUPPORT.
As the driver has not yet been migrated to the new watchdog kernel API,
the constant can just be dropped without substitute.

Fixes: 96cb4eb019ce ("watchdog: f71808e_wdt: new watchdog driver for Fintek F71808E and F71882FG")
Cc: stable@vger.kernel.org
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200611191750.28096-4-a.fatoum@pengutronix.de
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options</title>
<updated>2020-08-21T11:07:28Z</updated>
<author>
<name>Ahmad Fatoum</name>
</author>
<published>2020-06-11T19:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc3012a915e8797864960fa312601e711332d031'/>
<id>urn:sha1:cc3012a915e8797864960fa312601e711332d031</id>
<content type='text'>
commit e871e93fb08a619dfc015974a05768ed6880fd82 upstream.

The driver supports populating bootstatus with WDIOF_CARDRESET, but so
far userspace couldn't portably determine whether absence of this flag
meant no watchdog reset or no driver support. Or-in the bit to fix this.

Fixes: b97cb21a4634 ("watchdog: f71808e_wdt: Fix WDTMOUT_STS register read")
Cc: stable@vger.kernel.org
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200611191750.28096-3-a.fatoum@pengutronix.de
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>watchdog: da9062: No need to ping manually before setting timeout</title>
<updated>2020-06-24T15:48:54Z</updated>
<author>
<name>Stefan Riedmueller</name>
</author>
<published>2020-04-03T13:07:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05c3b2314a7141898b95b11ba8dc40038090f381'/>
<id>urn:sha1:05c3b2314a7141898b95b11ba8dc40038090f381</id>
<content type='text'>
[ Upstream commit a0948ddba65f4f6d3cfb5e2b84685485d0452966 ]

There is actually no need to ping the watchdog before disabling it
during timeout change. Disabling the watchdog already takes care of
resetting the counter.

This fixes an issue during boot when the userspace watchdog handler takes
over and the watchdog is already running. Opening the watchdog in this case
leads to the first ping and directly after that without the required
heartbeat delay a second ping issued by the set_timeout call. Due to the
missing delay this resulted in a reset.

Signed-off-by: Stefan Riedmueller &lt;s.riedmueller@phytec.de&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Link: https://lore.kernel.org/r/20200403130728.39260-3-s.riedmueller@phytec.de
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>watchdog: imx_sc_wdt: Fix reboot on crash</title>
<updated>2020-06-17T14:42:51Z</updated>
<author>
<name>Fabio Estevam</name>
</author>
<published>2020-04-12T23:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb8ab2343740a70d2982929e9367b6dfe411ac0c'/>
<id>urn:sha1:bb8ab2343740a70d2982929e9367b6dfe411ac0c</id>
<content type='text'>
commit e56d48e92b1017b6a8dbe64923a889283733fd96 upstream.

Currently when running the samples/watchdog/watchdog-simple.c
application and forcing a kernel crash by doing:

# ./watchdog-simple &amp;
# echo c &gt; /proc/sysrq-trigger

The system does not reboot as expected.

Fix it by calling imx_sc_wdt_set_timeout() to configure the i.MX8QXP
watchdog with a proper timeout.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 986857acbc9a ("watchdog: imx_sc: Add i.MX system controller watchdog support")
Reported-by: Breno Lima &lt;breno.lima@nxp.com&gt;
Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Breno Lima &lt;breno.lima@nxp.com&gt;
Link: https://lore.kernel.org/r/20200412230122.5601-1-festevam@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>watchdog: sp805: fix restart handler</title>
<updated>2020-04-08T09:18:38Z</updated>
<author>
<name>Michael Walle</name>
</author>
<published>2020-03-27T16:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea104a9e4d3e9ebc26fb78dac35585b142ee288b'/>
<id>urn:sha1:ea104a9e4d3e9ebc26fb78dac35585b142ee288b</id>
<content type='text'>
The restart handler is missing two things, first, the registers
has to be unlocked and second there is no synchronization for the
write_relaxed() calls.

This was tested on a custom board with the NXP LS1028A SoC.

Fixes: 6c5c0d48b686c ("watchdog: sp805: add restart handler")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200327162450.28506-1-michael@walle.cc
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: Add K3 RTI watchdog support</title>
<updated>2020-04-01T09:35:23Z</updated>
<author>
<name>Tero Kristo</name>
</author>
<published>2020-03-12T09:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d63908bdbfbce0d98195b22236ad5105dc6eba2'/>
<id>urn:sha1:2d63908bdbfbce0d98195b22236ad5105dc6eba2</id>
<content type='text'>
Texas Instruments K3 SoCs contain an RTI (Real Time Interrupt) module
which can be used as a watchdog. This IP provides a support for
windowed watchdog mode, in which the watchdog must be petted within
a certain time window. If it is petted either too soon, or too late,
a watchdog error will be triggered.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200312095808.19907-4-t-kristo@ti.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
<entry>
<title>watchdog: ziirave_wdt: change name to be more specific</title>
<updated>2020-04-01T09:35:22Z</updated>
<author>
<name>Lucas Stach</name>
</author>
<published>2020-03-13T10:11:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2ad9bca45496681b0e954845da49e6e1a731b79'/>
<id>urn:sha1:e2ad9bca45496681b0e954845da49e6e1a731b79</id>
<content type='text'>
The RAVE watchdog is not a full system watchdog, but is used to reset
ethernet switch when required. Change the name to better reflect this
usage.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20200313101138.25915-1-l.stach@pengutronix.de
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@linux-watchdog.org&gt;
</content>
</entry>
</feed>
