linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Russell King" <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Herve Codina" <herve.codina@bootlin.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Vladimir Oltean" <vladimir.oltean@nxp.com>,
	"Marek Behún" <kabel@kernel.org>,
	"Köry Maincent" <kory.maincent@bootlin.com>,
	"Oleksij Rempel" <o.rempel@pengutronix.de>
Subject: Re: [PATCH net-next 1/7] net: phy: allow isolating PHY devices
Date: Fri, 13 Sep 2024 09:43:13 +0200	[thread overview]
Message-ID: <20240913094313.6539264a@fedora.home> (raw)
In-Reply-To: <7736f0f2-8a99-4329-b290-089454d56e36@gmail.com>

Hello Florian,

On Thu, 12 Sep 2024 11:30:26 -0700
Florian Fainelli <f.fainelli@gmail.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@bootlin.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


  reply	other threads:[~2024-09-13  7:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 21:27 [PATCH net-next 0/7] Allow controlling PHY loopback and isolate modes Maxime Chevallier
2024-09-11 21:27 ` [PATCH net-next 1/7] net: phy: allow isolating PHY devices Maxime Chevallier
2024-09-12 18:30   ` Florian Fainelli
2024-09-13  7:43     ` Maxime Chevallier [this message]
2024-09-11 21:27 ` [PATCH net-next 2/7] net: phy: Allow flagging PHY devices that can't isolate their MII Maxime Chevallier
2024-09-11 21:27 ` [PATCH net-next 3/7] net: phy: lxt: Mark LXT973 PHYs as having a broken isolate mode Maxime Chevallier
2024-09-12 12:24   ` Simon Horman
2024-09-12 12:56     ` Maxime Chevallier
2024-09-13  5:29   ` kernel test robot
2024-09-11 21:27 ` [PATCH net-next 4/7] net: phy: marvell10g: 88x3310 and 88x3340 don't support " Maxime Chevallier
2024-09-11 21:27 ` [PATCH net-next 5/7] net: phy: introduce ethtool_phy_ops to get and set phy configuration Maxime Chevallier
2024-09-12  4:46   ` Oleksij Rempel
2024-09-12  8:17     ` Maxime Chevallier
2024-09-11 21:27 ` [PATCH net-next 6/7] net: ethtool: phy: allow reporting and setting the phy isolate status Maxime Chevallier
2024-09-11 21:27 ` [PATCH net-next 7/7] netlink: specs: introduce phy-set command along with configurable attributes Maxime Chevallier
2024-09-12  8:15 ` [PATCH net-next 0/7] Allow controlling PHY loopback and isolate modes Maxime Chevallier
2024-09-12 18:21 ` Andrew Lunn
2024-09-12 18:26   ` Florian Fainelli
2024-09-13  7:34     ` Maxime Chevallier
2024-09-13 13:40       ` Andrew Lunn

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=20240913094313.6539264a@fedora.home \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=christophe.leroy@csgroup.eu \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=herve.codina@bootlin.com \
    --cc=hkallweit1@gmail.com \
    --cc=kabel@kernel.org \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vladimir.oltean@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).