From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Alexander Duyck <alexander.duyck@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net] net: phylink: mac_link_(up|down)() clarifications
Date: Thu, 17 Apr 2025 09:07:02 +0200 [thread overview]
Message-ID: <20250417090702.16d78e0f@fedora.home> (raw)
In-Reply-To: <E1u5Ah5-001GO1-7E@rmk-PC.armlinux.org.uk>
Hello Russell,
On Wed, 16 Apr 2025 22:53:19 +0100
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:
> As a result of an email from the fbnic author, I reviewed the phylink
> documentation, and I have decided to clarify the wording in the
> mac_link_(up|down)() kernel documentation as this was written from the
> point of view of mvneta/mvpp2 and is misleading.
>
> The documentation talks about forcing the link - indeed, this is what
> is done in the mvneta and mvpp2 drivers but not at the physical layer
> but the MACs idea, which has the effect of only allowing or stopping
> packet flow at the MAC. This "link" needs to be controlled when using
> a PHY or fixed link to start or stop packet flow at the MAC. However,
> as the MAC and PCS are tightly integrated, if the MACs idea of the
> link is forced down, it has the side effect that there is no way to
> determine that the media link has come up - in this mode, the MAC must
> be allowed to follow its built-in PCS so we can read the link state.
>
> Frame the documentation in more generic terms, to avoid the thought
> that the physical media link to the partner needs in some way to be
> forced up or down with these calls; it does not. If that were to be
> done, it would be a self-fulfilling prophecy - e.g. if the media link
> goes down, then mac_link_down() will be called, and if the media link
> is then placed into a forced down state, there is no possibility
> that the media link will ever come up again - clearly this is a wrong
> interpretation.
>
> These methods are notifications to the MAC about what has happened to
> the media link state - either from the PHY, or a PCS, or whatever
> mechanism fixed-link is using. Thus, reword them to get away from
> talking about changing link state to avoid confusion with media link
> state.
>
> This is not a change of any requirements of these methods.
>
> Also, remove the obsolete references to EEE for these methods, we now
> have the LPI functions for configuring the EEE parameters which
> renders this redundant, and also makes the passing of "phy" to the
> mac_link_up() function obsolete.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks for that,
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
next prev parent reply other threads:[~2025-04-17 7:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 21:53 [PATCH net] net: phylink: mac_link_(up|down)() clarifications Russell King (Oracle)
2025-04-17 7:07 ` Maxime Chevallier [this message]
2025-04-23 1:30 ` patchwork-bot+netdevbpf
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=20250417090702.16d78e0f@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=alexander.duyck@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
/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