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: <ZXGiysQvYXb9YJBT@shell.armlinux.org.uk>
Date: Thu, 7 Dec 2023 10:47:38 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: 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, linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH v3 02/13] net: phy: at803x: move disable WOL to
 specific at8031 probe

On Thu, Dec 07, 2023 at 12:57:17AM +0100, Christian Marangi wrote:
> Move the WOL disable call to specific at8031 probe to make at803x_probe
> more generic and drop extra check for PHY ID.
> 
> Keep the same previous behaviour by first calling at803x_probe and then
> disabling WOL.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
> ---
>  drivers/net/phy/at803x.c | 29 +++++++++++++++++++----------
>  1 file changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index ef203b0807e5..85302d96d133 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -886,15 +886,6 @@ static int at803x_probe(struct phy_device *phydev)
>  			priv->is_fiber = true;
>  			break;
>  		}
> -
> -		/* Disable WoL in 1588 register which is enabled
> -		 * by default
> -		 */
> -		ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
> -				     AT803X_PHY_MMD3_WOL_CTRL,
> -				     AT803X_WOL_EN, 0);
> -		if (ret)
> -			return ret;
>  	}
>  
>  	return 0;
> @@ -1591,6 +1582,24 @@ static int at803x_cable_test_start(struct phy_device *phydev)
>  	return 0;
>  }
>  
> +static int at8031_probe(struct phy_device *phydev)
> +{
> +	int ret;
> +
> +	ret = at803x_probe(phydev);
> +	if (ret)
> +		return ret;
> +
> +	/* Disable WoL in 1588 register which is enabled
> +	 * by default
> +	 */
> +	ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
> +			     AT803X_PHY_MMD3_WOL_CTRL,
> +			     AT803X_WOL_EN, 0);
> +
> +	return ret;

	return phy_modify_mmd(...) ?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ