]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: stmmac: report EEE error statistics if EEE is supported
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 8 Jan 2025 16:48:14 +0000 (16:48 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Jan 2025 01:51:01 +0000 (17:51 -0800)
Report the number of EEE error statistics in the xstats even when EEE
is not enabled in hardware, but is supported. The PHY maintains this
counter even when EEE is not enabled.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tVZE6-0002KY-Nx@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c

index 693f59c3c47af77234cdb6d3448b19d10e4f7198..918a32f8fda80254750888992857e3f2cab24436 100644 (file)
@@ -654,7 +654,7 @@ static void stmmac_get_ethtool_stats(struct net_device *dev,
                                             (*(u32 *)p);
                        }
                }
-               if (priv->eee_enabled) {
+               if (priv->dma_cap.eee) {
                        int val = phylink_get_eee_err(priv->phylink);
                        if (val)
                                priv->xstats.phy_eee_wakeup_error_n = val;