Repository navigation
watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling - #5838
Merged
Merged
Conversation
Users report about the unexpected behavior for setting timeouts above 15 sec on Raspberry Pi. According to watchdog-api.rst the ioctl WDIOC_SETTIMEOUT shouldn't fail because of hardware limitations. But looking at the code shows that max_timeout based on the register value PM_WDOG_TIME_SET, which is the maximum. Since 664a392 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") the watchdog core is able to handle this problem. This fix has been tested with watchdog-test from selftests. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217374 Fixes: 664a392 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Collaborator
Author
|
See: https://lore.kernel.org/linux-watchdog/979cc901-6583-4e7c-b181-1b506c29193c@broadcom.com/T/ Ping @lategoodbye This is a simpler alternative to #5664 In testing this works fine, with, say 120s timeout (longer than the single-shot 15s duration of watchdog hardware). |
Contributor
|
Not sure what's the intension of the ping, but my mainline patch has been applied for watchdog-next. So the patch will be in Linux 6.8 and then hopefully backported. Some subsystems need a lot of time. |
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Jan 10, 2024
kernel: ARM: dts: bcm2712-rpi-5-b: Add eth_ledx parameters See: raspberrypi/linux#5826 kernel: ARM: dts: bcm2712-rpi-5-b: Add fan speed dtparams See: raspberrypi/linux#5822 kernel: drm/vc4: don't check if plane->state->fb == state->fb See: raspberrypi/linux#5832 kernel: spi: bcm2835: Support spi0-0cs and SPI_NO_CS mode See: raspberrypi/linux#5837 kernel: Add link freq Control for IMX519 and Arducam64MP See: raspberrypi/linux#5841 kernel: watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling See: raspberrypi/linux#5838
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Jan 10, 2024
kernel: ARM: dts: bcm2712-rpi-5-b: Add eth_ledx parameters See: raspberrypi/linux#5826 kernel: ARM: dts: bcm2712-rpi-5-b: Add fan speed dtparams See: raspberrypi/linux#5822 kernel: drm/vc4: don't check if plane->state->fb == state->fb See: raspberrypi/linux#5832 kernel: spi: bcm2835: Support spi0-0cs and SPI_NO_CS mode See: raspberrypi/linux#5837 kernel: Add link freq Control for IMX519 and Arducam64MP See: raspberrypi/linux#5841 kernel: watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling See: raspberrypi/linux#5838
Contributor
|
FWIW the original patch is now in Mainline stable: 6.1.75 / 6.6.14 |
Collaborator
Author
|
Great - I'll drop cherry-picked commit on next update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users report about the unexpected behavior for setting timeouts above 15 sec on Raspberry Pi. According to watchdog-api.rst the ioctl WDIOC_SETTIMEOUT shouldn't fail because of hardware limitations. But looking at the code shows that max_timeout based on the register value PM_WDOG_TIME_SET, which is the maximum.
Since 664a392 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") the watchdog core is able to handle this problem.
This fix has been tested with watchdog-test from selftests.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217374
Fixes: 664a392 ("watchdog: Introduce hardware maximum heartbeat in watchdog core")