[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240913094313.6539264a@fedora.home>
Date: Fri, 13 Sep 2024 09:43:13 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com, Andrew Lunn
<andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Russell King
<linux@...linux.org.uk>, linux-arm-kernel@...ts.infradead.org, Christophe
Leroy <christophe.leroy@...roup.eu>, Herve Codina
<herve.codina@...tlin.com>, Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>, Marek Behún
<kabel@...nel.org>, Köry Maincent
<kory.maincent@...tlin.com>, Oleksij Rempel <o.rempel@...gutronix.de>
Subject: Re: [PATCH net-next 1/7] net: phy: allow isolating PHY devices
Hello Florian,
On Thu, 12 Sep 2024 11:30:26 -0700
Florian Fainelli <f.fainelli@...il.com> wrote:
> On 9/11/24 14:27, Maxime Chevallier wrote:
> > The 802.3 specifications describes the isolation mode as setting the
> > PHY's MII interface in high-impedance mode, thus isolating the PHY from
> > that bus. This effectively breaks the link between the MAC and the PHY,
> > but without necessarily disrupting the link between the PHY and the LP.
> >
> > This mode can be useful for testing purposes, but also when there are
> > multiple PHYs on the same MII bus (a case that the 802.3 specification
> > refers to).
> >
> > In Isolation mode, the PHY will still continue to respond to MDIO
> > commands.
> >
> > Introduce a helper to set the phy in an isolated mode.
> >
> > Signed-off-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
>
> Not sure where that comment belongs so I will put it here, one thing
> that concerns me is if you have hardware that is not strapped to be
> isolated by default, and the PHY retains the state configured by Linux,
> such that the PHY is in isolation mode. A boot loader that is not
> properly taking the PHY out of isolation mode would be unavailable to
> use it and that would be a bug that Linux would likely be on the hook to
> fix.
>
> Would recommend adding a phy_shutdown() method which is called upon
> reboot/kexec and which, based upon a quirk/flag can ensure that the
> isolation bit is cleared.
Very good point. I can see the same problem occuring with loopback then
(if we use the 802.3 C22 PHY loopback bit).
I have such a patch ready actually, for the 2-PHYs-on-the-same-MAC
scenario, I will include it in the next iteration.
Thanks for your feedback,
Maxime
Powered by blists - more mailing lists