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: <20230217060347.GB1974@pengutronix.de>
Date:   Fri, 17 Feb 2023 07:03:47 +0100
From:   Oleksij Rempel <o.rempel@...gutronix.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev <netdev@...r.kernel.org>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Oleksij Rempel <linux@...pel-privat.de>
Subject: Re: [PATCH net-next] net: phy: Read EEE abilities when using
 .features

On Fri, Feb 17, 2023 at 04:15:20AM +0100, Andrew Lunn wrote:
> A PHY driver can use a static integer value to indicate what link mode
> features it supports, i.e, its abilities.. This is the old way, but
> useful when dynamically determining the devices features does not
> work, e.g. support of fibre.
> 
> EEE support has been moved into phydev->supported_eee. This needs to
> be set otherwise the code assumes EEE is not supported. It is normally
> set as part of reading the devices abilities. However if a static
> integer value was used, the dynamic reading of the abilities is not
> performed. Add a call to genphy_c45_read_eee_abilities() to read the
> EEE abilities.
> 
> Fixes: 8b68710a3121 ("net: phy: start using genphy_c45_ethtool_get/set_eee()")
> Signed-off-by: Andrew Lunn <andrew@...n.ch>

Reviewed-by: Oleksij Rempel <o.rempel@...gutronix.de>

> ---
>  drivers/net/phy/phy_device.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index 8d927c5e3bf8..71becceb8764 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -3113,8 +3113,10 @@ static int phy_probe(struct device *dev)
>  	 * a controller will attach, and may modify one
>  	 * or both of these values
>  	 */
> -	if (phydrv->features)
> +	if (phydrv->features) {
>  		linkmode_copy(phydev->supported, phydrv->features);
> +		genphy_c45_read_eee_abilities(phydev);
> +	}
>  	else if (phydrv->get_features)
>  		err = phydrv->get_features(phydev);
>  	else if (phydev->is_c45)
> -- 
> 2.39.1
> 
> 

-- 
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