hisilicon-opensdk: bump to b922e19, so the watchdog can reset the board - #2400
Merged
Merged
Conversation
OpenIPC/openhisilicon#223. The watchdog driver did not honour the Linux watchdog API in six ways, and the one that matters most here is #1803: release() handed the device back to the driver's own kernel feeder, so the moment majestic died and the kernel closed its descriptor, the driver went on feeding the dog for the rest of the board's life. Nothing ever reset. The only workaround was nodeamon=1, which removes the feeder altogether and with it the cover between module load and the first open. Also: the margin meant twice what was asked for; a ping was ignored for half of every cycle; open() did not start the timer, so the device went inert after any deliberate stop while still looking healthy; a reopen ran at the counter maximum rather than the margin the caller had set; and an rmmod racing an open could wedge the board in D state past a clean reboot. hi3516cv300 gains a watchdog it never had. Its driver had no module entry point at all, so hi3516cv300_wdt.ko loaded, did nothing, and the board came up with no /dev/watchdog -- majestic logged "Watchdog device (/dev/watchdog) not found" and every cv300 ran unguarded. Measured on four lab cameras, both binding styles: a process that dies without writing "V" now resets the board one margin later and it comes back; GETTIMELEFT reads 299 of 300; the magic close works; a clean majestic stop still resets nothing; and majestic feeding at its own cadence soaks past the margin without a reboot. Worth knowing before this ships: a cv300 whose majestic wedges will now reboot where it previously sat there unguarded. That is the fix, but it is a behaviour change in the field.
widgetii
requested review from
cronyx,
flyrouter and
viktorxda
as code owners
September 12, 2026 04:18
PR Summary by QodoBump hisilicon-opensdk to restore watchdog resets
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt |
7 tasks
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.
Bumps
hisilicon-opensdkfrom916e767tob922e19, picking up OpenIPC/openhisilicon#223.Fixes #1803. Touches #127 — see the end.
What it fixes
The watchdog driver did not honour the Linux watchdog API in six ways. The one
that matters most here is #1803:
release()set the driver's state back toSELFCLR, which handed the device to the driver's own kernel feeder thread. Sothe moment majestic died and the kernel closed its descriptor for it, the driver
went on feeding the dog for the rest of the board's life, and nothing ever reset.
The only workaround available was
nodeamon=1— which removes the feederaltogether, and with it the cover between module load and the first open.
Measured on the lab boards before the change:
The rest, briefly:
resetting, so a whole margin in the counter made every timeout double. 30 s
reset the board at 58.
feed()returned withouttouching anything unless an interrupt was already pending, so the honest
cadence of one ping per half-margin was worth one accepted ping per cycle —
miss it and a process that had been feeding all along got reset under it.
open()did not start the timer. After any deliberate stop the device wasinert while looking entirely healthy: open succeeded, the margin was accepted
and read back, pings were accepted, and nothing would ever reset.
GETTIMEOUTsaid 30 while the hardware ran at 1431 s.rmmodracing anopen()could wedge the board in D state holdingmodule_mutex, past a clean reboot. It cost one lab board a power cycle.hi3516cv300 gains a watchdog it never had
Its driver contained no module entry point and its build linked no init object,
so
hi3516cv300_wdt.koloaded, did nothing, and the board came up with no/dev/watchdog. majestic loggedWatchdog device (/dev/watchdog) not foundand every cv300 has been running unguarded. Confirmed on a lab cv300 before the
change; after it majestic logs
Detected Watchdog/Watchdog timeout set to 300 secondsfor the first time.Verified
Four lab cameras, both binding styles. Crash path is open,
SETTIMEOUT(30), diewithout
"V"; the board must reset one margin later and come back.GETTIMELEFTAll 35 checks green on the upstream PR, including the SDK builds and QEMU boots
for every affected chip.
Worth a release note
A cv300 whose majestic wedges will now reboot where it previously sat there
unguarded. That is the fix working, but it is a behaviour change in the field
and the first thing anyone will notice.
On #127
That issue asks for the watchdog module on hi3516cv200/hi3518ev200. It is
already
insmoded there — the#nodeamon=1beside it inload_hisiliconis acomment, not a parameter — but the
.kois a prebuilt vendor blob shipped ingeneral/package/hisilicon-osdrv-hi3516cv200/files/kmod/wdt.ko, dated 2022. Sonone of the above reaches those boards. The V2 generation also has no OSAL at
all, which is why upstream left its copy of the driver alone. Both are separate
pieces of work; noting it here so the issue is not closed on the strength of
this bump.