Re: [net-next,PATCH] net: stmmac: stm32: Do not suspend downed interface

From: Andrew Lunn

Date: Wed Jan 14 2026 - 10:50:03 EST


On Wed, Jan 14, 2026 at 09:17:54AM +0100, Marek Vasut wrote:
> If an interface is down, the ETHnSTP clock are not running. Suspending
> such an interface will attempt to stop already stopped ETHnSTP clock,
> and produce a warning in the kernel log about this.

> static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
> {
> + struct net_device *ndev = dev_get_drvdata(dwmac->dev);
> +
> + if (!ndev || !netif_running(ndev))
> + return 0;
> +
> return clk_prepare_enable(dwmac->clk_ethstp);

The commit message might be missing some explanation. The
suspend method enables the clock, not disables it.

Andrew