[PATCH net-next v4] net: stmmac: program the FSM timeout timer

Maxime Chevallier maxime.chevallier at bootlin.com
Tue Nov 24 08:13:49 PST 2026



On 11/20/26 22:17, netdev-bot+sashiko at kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 6 potential
> issue(s) to consider.
> 
> Critical: 0 · High: 1 · Medium: 2 · Low: 3
> 
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
> 
> - [High] On every in-tree XGMAC platform, the XGMAC half of the fix never
>   runs.
> - [Medium] csr_clk_mhz is only computed when priv->plat->stmmac_clk is
>   non-NULL.
> - [Medium] The patch turns on an FSM timeout check that resets the
>   interface, with a hardcoded NTMRMD = 0x6 (about 1 s) for every…
> - [Low] The commit is written as a bug fix: the protection is
>   'ineffective' and a stuck FSM 'was not reported through the safety…
> - [Low] The patch adds ten STMMAC_NTMRMD_* register-encoding macros (1US
>   .. 64SEC) to include/linux/stmmac.h, the platform-data header shared…
> - [Low] The same clock (stmmac_clk) is converted into a 'CSR clocks per
>   1us tic' register value in two places that use different conventions.
> 
> --
> 
> net: stmmac: program the FSM timeout timer
> 
> This patch programs MAC_FSM_ACT_Timer on dwmac5 and dwxgmac3 cores after
> TMOUTEN is enabled. TMR is set from the CSR clock rate in MHz, and NTMRMD
> is set to a fixed 1s timeout. A csr_clk_mhz argument is added to the
> safety_feat_config callback, and NTMRMD encoding macros are added to
> include/linux/stmmac.h.
> 
>> The issue was hit in testing on dwmac4 and dwxgmac, where a stuck FSM was
>> not reported through the safety interrupt despite TMOUTEN being set.
>>
>> Signed-off-by: Zxyan Zhu <zxyan0222 at gmail.com>

[...]

> [Severity: High]
> XGMAC_TMOUTEN is set just above without looking at safety_cfg, but the
> timer is only programmed when safety_cfg is non-NULL. Does any XGMAC
> platform set plat->safety_feat_cfg?

This looks valid, on what xgmac platform did you test that ?

Maxime



More information about the linux-arm-kernel mailing list