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] [thread-next>] [day] [month] [year] [list]
Message-ID: <fd994907-0d37-41a6-87fe-1064543bf9fc@gmail.com>
Date: Tue, 26 Nov 2024 21:19:39 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
 Andrew Lunn <andrew@...n.ch>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Andrew Lunn <andrew+netdev@...n.ch>,
 Bryan Whitehead <bryan.whitehead@...rochip.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Florian Fainelli <florian.fainelli@...adcom.com>,
 Jakub Kicinski <kuba@...nel.org>, Jose Abreu <joabreu@...opsys.com>,
 linux-arm-kernel@...ts.infradead.org,
 linux-stm32@...md-mailman.stormreply.com,
 Marcin Wojtas <marcin.s.wojtas@...il.com>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
 Oleksij Rempel <o.rempel@...gutronix.de>, Paolo Abeni <pabeni@...hat.com>,
 UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH RFC net-next 03/23] net: phy: marvell: use
 phydev->eee_cfg.eee_enabled

On 26.11.2024 13:52, Russell King (Oracle) wrote:
> Rather than calling genphy_c45_ethtool_get_eee() to retrieve whether
> EEE is enabled, use the value stored in the phy_device eee_cfg
> structure.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> ---
>  drivers/net/phy/marvell.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index cd50cd6a7f75..1d117fa8c564 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -1508,7 +1508,6 @@ static int m88e1540_get_fld(struct phy_device *phydev, u8 *msecs)
>  
>  static int m88e1540_set_fld(struct phy_device *phydev, const u8 *msecs)
>  {
> -	struct ethtool_keee eee;
>  	int val, ret;
>  
>  	if (*msecs == ETHTOOL_PHY_FAST_LINK_DOWN_OFF)
> @@ -1518,8 +1517,7 @@ static int m88e1540_set_fld(struct phy_device *phydev, const u8 *msecs)
>  	/* According to the Marvell data sheet EEE must be disabled for
>  	 * Fast Link Down detection to work properly
>  	 */
> -	ret = genphy_c45_ethtool_get_eee(phydev, &eee);
> -	if (!ret && eee.eee_enabled) {
> +	if (phydev->eee_cfg.eee_enabled) {
>  		phydev_warn(phydev, "Fast Link Down detection requires EEE to be disabled!\n");
>  		return -EBUSY;
>  	}

This one I had on my list too. Old and new check aren't waterproof as the user can still
enable EEE later, silently disabling FLD. But the check is better than nothing.

Reviewed-by: Heiner Kallweit <hkallweit1@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ