net: stmmac: print stmmac_init_dma_engine() errors using netdev_err()
Subsystems (4)
PATCH 1/1 net: stmmac: print stmmac_init_dma_engine() errors using netdev_err()
stmmac_init_dma_engine() uses dev_err() which leads to errors being reported as e.g:
dwc-eth-dwmac 2490000.ethernet: Failed to reset the dma
dwc-eth-dwmac 2490000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
stmmac_init_dma_engine() is only called from stmmac_hw_setup() which itself uses netdev_err(), and we will have a net_device setup. So, change the dev_err() to netdev_err() to give consistent error messages.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -2
@@ -3034,7 +3034,7 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)int ret =0 ;if (!priv->plat->dma_cfg || !priv->plat->dma_cfg->pbl) { -dev_err (priv->device,"Invalid DMA configuration\n" ); +netdev_err (priv->dev,"Invalid DMA configuration\n" );return -EINVAL ; }
@@ -3043,7 +3043,7 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) ret =stmmac_reset (priv, priv->ioaddr);if (ret) { -dev_err (priv->device,"Failed to reset the dma\n" ); +netdev_err (priv->dev,"Failed to reset the dma\n" );return ret; }
Signature · 1 line
2.30.2
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Thu, 20 Feb 2025 12:47:49 +0000 you wrote:
stmmac_init_dma_engine()usesdev_err()which leads to errors being reported as e.g:dwc-eth-dwmac 2490000.ethernet: Failed to reset the dma
dwc-eth-dwmac 2490000.ethernet eth0:stmmac_hw_setup: DMA engine initialization failed
Quoted 6 lines
stmmac_init_dma_engine()is only called fromstmmac_hw_setup()which itself usesnetdev_err(), and we will have anet_devicesetup. So, change thedev_err()tonetdev_err()to give consistent error messages.[...]
Here is the summary with links:
- [net-next] net: stmmac: print stmmac_init_dma_engine() errors using netdev_err()
https://git.kernel.org/netdev/net-next/c/3e401818c81b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html