From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Wei Fang <wei.fang@nxp.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
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>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"linux-clk@vger.kernel.org" <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: Thu, 10 Aug 2023 10:08:33 +0100 [thread overview]
Message-ID: <ZNSpEbDVFe5MdyqD@shell.armlinux.org.uk> (raw)
In-Reply-To: <AM5PR04MB3139D7984B4DAADCB25597778813A@AM5PR04MB3139.eurprd04.prod.outlook.com>
On Thu, Aug 10, 2023 at 03:28:13AM +0000, Wei Fang wrote:
> > > 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?
> >
> The MAC will failed to do software reset if the PHY input clocks are not
> present.
Yes, that's well known to me - it's been brought up before with stmmac
and phylink. I said earlier in this thread about this.
> > For example, if stmmac_open() fails without external clock, will
> > stmmac_release() work properly?
> Actually, I don't know much about stmmac driver and the dwmac IP,
> Because I'm not responsible for this IP on NXP i.MX platform. But I
> have a look at the code of stmmac_release(), I think stmmac_release()
> will work properly, because it invokes phylink_stop() and phylink_disconnect_phy()
> first which will disable the clock from PHY.
When tearing down a network device, there should be no reason to call
phylink_stop() - unregistering the netdev will take the network device
down, and thus call the .ndo_stop method if the device was up. .ndo_stop
should already be calling phylink_stop().
I just don't get why driver authors don't check things like this...
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-08-10 9: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
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) [this message]
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=ZNSpEbDVFe5MdyqD@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--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=marex@denx.de \
--cc=mturquette@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--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).