devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Detlev Casanova <detlev.casanova@collabora.com>,
	linux-kernel@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	Florian Fainelli <florian.fainelli@broadcom.com>
Subject: Re: [PATCH v3 3/3] net: phy: realtek: Disable clock on suspend
Date: Mon, 5 Jun 2023 08:27:07 -0700	[thread overview]
Message-ID: <086b52d5-4159-ffaf-8bcd-30ac24c25017@gmail.com> (raw)
In-Reply-To: <20230605151953.48539-4-detlev.casanova@collabora.com>

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@broadcom.com>
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.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


  reply	other threads:[~2023-06-05 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 15:19 net: phy: realtek: Support external PHY clock Detlev Casanova
2023-06-05 15:19 ` [PATCH v3 1/3] net: phy: realtek: Add optional " Detlev Casanova
2023-06-05 15:19 ` [PATCH v3 2/3] dt-bindings: net: phy: Document support for external PHY clk Detlev Casanova
2023-06-05 15:19 ` [PATCH v3 3/3] net: phy: realtek: Disable clock on suspend Detlev Casanova
2023-06-05 15:27   ` Florian Fainelli [this message]
2023-06-05 21:45 ` net: phy: realtek: Support external PHY clock Jakub Kicinski
2023-06-05 21:46   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=086b52d5-4159-ffaf-8bcd-30ac24c25017@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=detlev.casanova@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).