]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: eswin: fix HSP CSR init ordering after clock enable
authorZhi Li <lizhi2@eswincomputing.com>
Mon, 18 May 2026 02:20:55 +0000 (10:20 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 21 May 2026 09:58:16 +0000 (11:58 +0200)
commit23386defe949c0db4f746bed7098fc5e06746083
treea6909d9ff8697aa32cd3285658bad59e009956ef
parentc36069c6f46c52458bb86fa8eb4803f1e0b70fb0
net: stmmac: eswin: fix HSP CSR init ordering after clock enable

Fix the initialization ordering of the HSP CSR configuration in the
EIC7700 DWMAC glue driver.

The HSP CSR registers control MAC-side RGMII delay behavior and must
only be accessed after the corresponding clocks are enabled. The
previous implementation could trigger register access before clock
enablement, leading to undefined behavior depending on boot state.

Move the HSP CSR configuration into the post-clock-enable initialization
path to ensure all register accesses occur under valid clock domains.

This change ensures deterministic initialization and prevents
clock-dependent register access failures during probe or resume.

Fixes: ea77dbbdbc4e ("net: stmmac: add Eswin EIC7700 glue driver")
Signed-off-by: Zhi Li <lizhi2@eswincomputing.com>
Link: https://patch.msgid.link/20260518022055.444-1-lizhi2@eswincomputing.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c