From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
Florian Fainelli <florian.fainelli@broadcom.com>,
netdev@vger.kernel.org, Clark Wang <xiaoning.wang@nxp.com>,
linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Shenwei Wang <shenwei.wang@nxp.com>, Wei Fang <wei.fang@nxp.com>,
NXP Linux Team <linux-imx@nxp.com>,
kernel@pengutronix.de, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net-next v6 5/8] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes
Date: Tue, 27 Feb 2024 17:12:22 +0100 [thread overview]
Message-ID: <8d48af5b-e92b-431c-9bc0-ce6ef0e0ab2e@lunn.ch> (raw)
In-Reply-To: <Zd10qUJzq-2nG7b7@pengutronix.de>
On Tue, Feb 27, 2024 at 06:35:38AM +0100, Oleksij Rempel wrote:
> On Mon, Feb 26, 2024 at 07:59:28PM +0100, Andrew Lunn wrote:
> > On Mon, Feb 26, 2024 at 05:53:31PM +0000, Russell King (Oracle) wrote:
> > > On Mon, Feb 26, 2024 at 09:50:02AM -0800, Florian Fainelli wrote:
> > > > This is the source of the concern, we don't know which MAC drivers we might
> > > > end-up breaking by calling adjust_link(link == 1) twice in a row, hopefully
> > > > none, because they should be well written to only update the parameters that
> > > > need updating, but who knows?
> > >
> > > Just quickly... There are some (I went through a bunch.) They don't
> > > support EEE. I haven't been through all though, so there could be
> > > some which support EEE and where adjust_link() with phydev->link=true
> > > twice in a row could result in badness.
> >
> > So i think we all agree the MAC needs to see a down/up, even if the
> > link itself never went down. Anything else is too risky and will
> > probably break something somewhere.
>
> Means, this patch should be dropped.
No.
This patch handles the case that EEE is changed, but does not require
an auto-neg cycle. If you drop this patch, that use case breaks.
You need to extend this patch to signal to the MAC a down followed by
an up. It is a fake down, the media side never goes down, but the MAC
needs to think it has in order to keep with the usual convention that
we never call adjust_link() twice with phydev->link not changing.
Andrew
next prev parent reply other threads:[~2024-02-27 16:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 9:44 [PATCH net-next v6 0/8] net: ethernet: Rework EEE Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 1/8] net: add helpers for EEE configuration Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 2/8] net: phy: Add phydev->enable_tx_lpi to simplify adjust link callbacks Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 3/8] net: phy: Add helper to set EEE Clock stop enable bit Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 4/8] net: phy: Keep track of EEE configuration Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 5/8] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Oleksij Rempel
2024-02-23 10:38 ` Russell King (Oracle)
2024-02-23 12:49 ` Oleksij Rempel
2024-02-23 13:17 ` Andrew Lunn
2024-02-23 13:26 ` Russell King (Oracle)
2024-02-23 17:53 ` Florian Fainelli
2024-02-24 17:57 ` Oleksij Rempel
2024-02-26 16:44 ` Andrew Lunn
2024-02-26 17:50 ` Florian Fainelli
2024-02-26 17:53 ` Russell King (Oracle)
2024-02-26 18:59 ` Andrew Lunn
2024-02-27 5:35 ` Oleksij Rempel
2024-02-27 16:12 ` Andrew Lunn [this message]
2024-02-23 9:44 ` [PATCH net-next v6 6/8] net: phy: Add phy_support_eee() indicating MAC support EEE Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 7/8] net: fec: Move fec_enet_eee_mode_set() and helper earlier Oleksij Rempel
2024-02-23 9:44 ` [PATCH net-next v6 8/8] net: fec: Fixup EEE Oleksij Rempel
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=8d48af5b-e92b-431c-9bc0-ce6ef0e0ab2e@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-imx@nxp.com \
--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=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@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
all inboxes | Powered by JetHome®