From: Russell King (Oracle) Date: Wed, 12 Mar 2025 09:34:36 +0000 (+0000) Subject: net: stmmac: stm32: use PHY capability for TX clock stop X-Git-Tag: v6.15-rc1~160^2~83^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5bc19e2abeb570ff60f973dec84807ec8d3d695;p=thirdparty%2Fkernel%2Flinux.git net: stmmac: stm32: use PHY capability for TX clock stop Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Add the flag to allow the stmmac core to use the PHY capability. Cc: Christophe Roullier Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tsIU0-005vGL-17@rmk-PC.armlinux.org.uk Signed-off-by: Paolo Abeni --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c index 1fcb74e9e3ffa..c3d321192581f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c @@ -538,6 +538,7 @@ static int stm32_dwmac_probe(struct platform_device *pdev) return ret; } + plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP; plat_dat->bsp_priv = dwmac; ret = stm32_dwmac_init(plat_dat, false);