lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z30-_sLmbTzW0Yg6@pengutronix.de>
Date: Tue, 7 Jan 2025 15:49:34 +0100
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Herve Codina <herve.codina@...tlin.com>
Cc: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
	Andrew Lunn <andrew@...n.ch>,
	Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, Luca Ceresoli <luca.ceresoli@...tlin.com>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH net] net: phy: fix phylib's dual eee_enabled

On Tue, Jan 07, 2025 at 03:23:45PM +0100, Herve Codina wrote:
> On Tue, 7 Jan 2025 15:13:52 +0100
> Oleksij Rempel <o.rempel@...gutronix.de> wrote:
> 
> > On Tue, Jan 07, 2025 at 02:40:48PM +0100, Herve Codina wrote:
> > > Hi,
> > > 
> > > On Thu, 14 Nov 2024 10:33:27 +0000
> > > "Russell King (Oracle)" <rmk+kernel@...linux.org.uk> wrote:
> > >   
> > > > phylib has two eee_enabled members. Some parts of the code are using
> > > > phydev->eee_enabled, other parts are using phydev->eee_cfg.eee_enabled.
> > > > This leads to incorrect behaviour as their state goes out of sync.
> > > > ethtool --show-eee shows incorrect information, and --set-eee sometimes
> > > > doesn't take effect.
> > > > 
> > > > Fix this by only having one eee_enabled member - that in eee_cfg.
> > > > 
> > > > Fixes: 49168d1980e2 ("net: phy: Add phy_support_eee() indicating MAC support EEE")
> > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > > > ---
> > > >  drivers/net/phy/phy-c45.c    | 4 +---
> > > >  drivers/net/phy/phy_device.c | 4 ++--
> > > >  include/linux/phy.h          | 2 --
> > > >  3 files changed, 3 insertions(+), 7 deletions(-)
> > > >   
> > > 
> > > I observed a regression with this patch applied.
> > > 
> > > My system is based on a i.MX8MP soc with a TI DP83867 ethernet PHY and was
> > > working with the kernel v6.12 release.  
> > 
> > Which ethernet interface is used on this system? FEC or stmmac?
> 
> It is the FEC (ethernet@...e0000).

FEC driver's EEE support is still broken, i assume it is configuring
wrong timer. But, I can't fix without access to HW with proper PHY.

> > 
> > Is it the correct PHY?
> > https://www.ti.com/product/de-de/DP83867E
> 
> Yes, it is this PHY.

EEE support is not listed in this documentation and there is no errata.
I assume, there is still a register claiming EEE support. Otherwise it
would not be activated.

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/658638/dp83867ir-eee-energy-efficient-ethernet
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/556456/dp83867-mdi-auto-negotiation-with-eee-energy-efficient-ethernet-router?DP83867-MDI-Auto-Negotiation-with-EEE-Energy-Efficient-Ethernet-router
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/716392/dp83867ir-eee-energy-efficient-ethernet-with-dp83867

Since chip vendor recommends to actively disable EEE support, something like
this will be needed.
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -947,6 +947,8 @@ static int dp83867_config_init(struct phy_device *phydev)
                               mask, val);
        }
 
+       phy_disable_eee(phydev);
+
        return 0;
 }

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ