[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBOQecR6q5Xgr75F@shell.armlinux.org.uk>
Date: Thu, 16 Mar 2023 21:56:09 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Shenwei Wang <shenwei.wang@....com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, imx@...ts.linux.dev
Subject: Re: [PATCH 1/1] net: stmmac: start PHY early in __stmmac_open
On Thu, Mar 16, 2023 at 03:54:49PM -0500, Shenwei Wang wrote:
> By initializing the PHY and establishing the link before setting the
> MAC relating configurations, this change ensures that the PHY is
> operational before the MAC logic starts relying on it. This can
> prevent synchronization errors and improve system stability.
>
> This change especially applies to the RMII mode, where the PHY may drive
> the REF_CLK signal, which requires the PHY to be started and operational
> before the MAC logic initializes.
>
> This change should not impact other modes of operation.
NAK. A patch similar to this has already been sent.
The problem with just moving this is that phylink can call the
mac_link_up() method *before* phylink_start() has returned - and as
this driver has not completed the setup, it doesn't expect the link
to come up at that point.
There are several issues with this driver wanting the PHY clock early,
and there have been two people working on addressing this previously,
proposing two different changes to phylink.
I sent them away to talk to each other and come back with a unified
solution. Shock horror, they never came back.
Now we seem to be starting again from the beginning.
stmmac folk really need to get a handle on this so reviewers are not
having to NAK similar patches time and time again, resulting in the
problem not being solved.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists