From: John Ernberg <john.ernberg@actia.se>
To: Wei Fang <wei.fang@nxp.com>
Cc: Shenwei Wang <shenwei.wang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
dl-linux-imx <linux-imx@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net v2 2/2] net: fec: Suspend and resume the PHY
Date: Fri, 1 Mar 2024 08:10:34 +0000 [thread overview]
Message-ID: <8b667fc6-27e6-4c14-8e76-346371cf9eec@actia.se> (raw)
In-Reply-To: <DB6PR04MB314117D7D5473B31FCA47495885E2@DB6PR04MB3141.eurprd04.prod.outlook.com>
Hi Wei,
On 3/1/24 02:49, Wei Fang wrote:
>> -----Original Message-----
>> From: John Ernberg <john.ernberg@actia.se>
>> Sent: 2024年2月29日 18:53
>> To: Wei Fang <wei.fang@nxp.com>
>> Cc: Shenwei Wang <shenwei.wang@nxp.com>; Clark Wang
>> <xiaoning.wang@nxp.com>; dl-linux-imx <linux-imx@nxp.com>; David S.
>> Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>;
>> Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>;
>> Heiner Kallweit <hkallweit1@gmail.com>; netdev@vger.kernel.org;
>> linux-kernel@vger.kernel.org; John Ernberg <john.ernberg@actia.se>
>> Subject: [PATCH net v2 2/2] net: fec: Suspend and resume the PHY
>>
>> PHYs that are always-on will not enter their low power modes otherwise as
>> they have no regulator to be powered off with.
>>
>> Since the PHY is picked up via {of_,}phy_connect() and dropped with
>> phy_disconnect() when the link is brought up and down respectively the only
>> cases were pm is needed is when the netif is running or or when the link
> nit: where
>
>> has never been up.
>>
>> To deal with the latter case the PHY is suspended on discovery in probe,
>> since it won't be needed until link up.
>>
>> Fixes: 557d5dc83f68 ("net: fec: use mac-managed PHY PM")
> I'm not sure whether this commit should be blamed. After checking my local
> code (not the recent upstream code), fec_suspend() will make the PHY enter
> suspend mode when calling phy_stop(), the specific logic is fec_suspend() -->
> phy_stop() --> phy_state_machine() --> phy_suspend (). But the latest upstream
> code may have changed this logic. I'm sorry that I don't have time to sit down
> and look at the latest code.
I missed this flow, and also didn't see it take place when I look at the
MDIO traffic. But the code has been there since 2013.
I will check why that isn't happening.
Thanks! // John Ernberg
prev parent reply other threads:[~2024-03-01 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 10:53 [PATCH net v2 0/2] net: fec: Fixes to suspend / resume with mac_managed_pm John Ernberg
2024-02-29 10:53 ` [PATCH net v2 1/2] net: fec: Set mac_managed_pm during probe John Ernberg
2024-02-29 10:53 ` [PATCH net v2 2/2] net: fec: Suspend and resume the PHY John Ernberg
2024-03-01 1:49 ` Wei Fang
2024-03-01 8:10 ` John Ernberg [this message]
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=8b667fc6-27e6-4c14-8e76-346371cf9eec@actia.se \
--to=john.ernberg@actia.se \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/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).