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]
Date: Mon, 5 Jun 2023 08:27:07 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Detlev Casanova <detlev.casanova@...labora.com>,
 linux-kernel@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
 Russell King <linux@...linux.org.uk>, "David S . Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>, netdev@...r.kernel.org,
 devicetree@...r.kernel.org, Florian Fainelli <florian.fainelli@...adcom.com>
Subject: Re: [PATCH v3 3/3] net: phy: realtek: Disable clock on suspend

On 6/5/23 08:19, Detlev Casanova wrote:
> For PHYs that call rtl821x_probe() where an external clock can be
> configured, make sure that the clock is disabled
> when ->suspend() is called and enabled on resume.
> 
> The PHY_ALWAYS_CALL_SUSPEND is added to ensure that the suspend function
> is actually always called.
> 
> Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
> Signed-off-by: Detlev Casanova <detlev.casanova@...labora.com>
> ---
>   drivers/net/phy/realtek.c | 24 ++++++++++++++++++++++--
>   1 file changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
> index b13dd0b3c99e..62eac4835def 100644
> --- a/drivers/net/phy/realtek.c
> +++ b/drivers/net/phy/realtek.c
> @@ -426,10 +426,28 @@ static int rtl8211f_config_init(struct phy_device *phydev)
>   	return genphy_soft_reset(phydev);
>   }
>   
> +static int rtl821x_suspend(struct phy_device *phydev)
> +{
> +	struct rtl821x_priv *priv = phydev->priv;
> +	int ret = genphy_suspend(phydev);

Sorry I missed that part, if Wake-on-LAN is enabled you cannot suspend 
the PHY as this will typically prevent it from passing received frames 
up the MAC where Wake-on-LAN can be done. You need to move 
genphy_suspend() into the !phydev->wol_enabled clause.
-- 
Florian


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ