From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Wei Fang <wei.fang@nxp.com>
Cc: Marek Vasut <marex@denx.de>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
kernel@pengutronix.de, linux-clk@vger.kernel.org,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>
Subject: Re: [PATCH] net: phy: at803x: Improve hibernation support on start up
Date: Wed, 9 Aug 2023 08:08:36 +0200 [thread overview]
Message-ID: <20230809060836.GA13300@pengutronix.de> (raw)
In-Reply-To: <AM5PR04MB3139D8C0EBC9D2DFB0C778348812A@AM5PR04MB3139.eurprd04.prod.outlook.com>
CCing clk folks in the loop.
On Wed, Aug 09, 2023 at 05:37:45AM +0000, Wei Fang wrote:
...
> > Hm.. how about officially defining this PHY as the clock provider and disable
> > PHY automatic hibernation as long as clock is acquired?
> >
> Sorry, I don't know much about the clock provider/consumer, but I think there
> will be more changes if we use clock provider/consume mechanism.
Yes, more changes will be needed.
> Furthermore,
> we would expect the hibernation mode is enabled when the ethernet interface
> is brought up but the cable is not plugged, that is to say, we only need the PHY to
> provide the clock for a while to make the MAC reset successfully.
Means, if external clock is not provided, MAC is not fully functional.
Correct?
What kind of MAC operation will fail in this case?
For example, if stmmac_open() fails without external clock, will
stmmac_release() work properly? Will we be able to do any configuration
on an interface which is opened, but without active link and hibernated
clock? How about self tests?
> Therefore, I think
> the current approach is more simple and effective, and it takes full advantage of the
> characteristics of the hardware (The PHY will continue to provide the clock about
> 10 seconds after hibernation mode is enabled when the cable is not plugged and
> automatically disable the clock after 10 seconds, so the 10 seconds is enough for
> the MAC to reset successfully).
If multiple independent operations are synchronized based on the
assumption that 10 seconds should be enough, bad thing happens.
If fully functional external clock provider is need to initialize the
MAC, just disabling this clock on already initialized HW without doing
proper re-initialization sequence is usually bad idea. HW may get some
glitch which will make troubleshooting a pain.
Regards,
Oleksij
--
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 |
next prev parent reply other threads:[~2023-08-09 6:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 17:58 [PATCH] net: phy: at803x: Improve hibernation support on start up Marek Vasut
2023-08-08 8:44 ` Wei Fang
2023-08-08 18:37 ` Marek Vasut
2023-08-09 2:27 ` Wei Fang
2023-08-09 4:36 ` Oleksij Rempel
2023-08-09 5:37 ` Wei Fang
2023-08-09 6:08 ` Oleksij Rempel [this message]
2023-08-09 8:43 ` Russell King (Oracle)
2023-08-10 10:30 ` Russell King (Oracle)
2023-12-14 8:13 ` Romain Gantois
2023-12-14 10:46 ` Marek Vasut
2023-12-14 16:49 ` Russell King (Oracle)
2023-12-15 8:22 ` Romain Gantois
2023-08-10 3:28 ` Wei Fang
2023-08-10 9:08 ` Russell King (Oracle)
2023-08-09 13:40 ` Andrew Lunn
2023-08-09 21:34 ` Marek Vasut
2023-08-09 22:06 ` Andrew Lunn
2023-08-10 0:49 ` Marek Vasut
2023-08-10 4:32 ` Oleksij Rempel
2023-08-10 10:10 ` Russell King (Oracle)
2023-08-10 10:01 ` Russell King (Oracle)
2023-08-10 10:34 ` Russell King (Oracle)
2023-08-10 12:51 ` Oleksij Rempel
2023-08-10 13:16 ` Russell King (Oracle)
2023-08-10 13:49 ` Andrew Lunn
2023-08-10 13:54 ` Russell King (Oracle)
2023-08-10 14:23 ` Andrew Lunn
2023-08-10 14:36 ` Russell King (Oracle)
2023-08-09 23:15 ` Russell King (Oracle)
2023-08-10 10:34 ` Russell King (Oracle)
2023-08-10 3:38 ` Wei Fang
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=20230809060836.GA13300@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marex@denx.de \
--cc=mturquette@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sboyd@kernel.org \
--cc=wei.fang@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).