netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Byungho An <bh74.an@samsung.com>, Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 1/1] net: sxgbe: rework EEE handling to use PHY negotiation results
Date: Thu, 6 Feb 2025 10:24:28 +0000	[thread overview]
Message-ID: <Z6SN3GSwPsh6m8UI@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250206075856.3266068-1-o.rempel@pengutronix.de>

On Thu, Feb 06, 2025 at 08:58:56AM +0100, Oleksij Rempel wrote:
> From: Andrew Lunn <andrew@lunn.ch>
> 
> The enabling/disabling of EEE in the MAC should happen as a result of
> auto negotiation. So rework sxgbe_eee_adjust() to take the result of
> negotiation into account.

PLS, at least in stmmac terminology, is "phy link status" and there it
is used with a separate timer which prevents LPI mode being entered
near to the link coming up. Given that the method is called
priv->hw->mac->set_eee_pls, and what was being passed to it was the
link status, I think this is the same thing in this driver.

So, I think repurposing this bit to indicate whether EEE has been
negotiated is not correct.

> sxgbe_set_eee() now just stores LTI timer value. Everything else is
> passed to phylib, so it can correctly setup the PHY.

Not sure why you don't use phydev->eee_cfg.lpi_timer which will be
updated correctly - if phy_ethtool_set_eee() reutrns an error, then
priv->tx_lpi_timer will have been updated yet an error will be
returned to userspace. Sure, have priv->tx_lpi_timer, but update
this on link-up.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

      reply	other threads:[~2025-02-06 10:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06  7:58 [PATCH net-next v1 1/1] net: sxgbe: rework EEE handling to use PHY negotiation results Oleksij Rempel
2025-02-06 10:24 ` Russell King (Oracle) [this message]

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=Z6SN3GSwPsh6m8UI@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=bh74.an@samsung.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.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).