From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev <netdev@vger.kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Oleksij Rempel <linux@rempel-privat.de>
Subject: Re: [RFC/RFTv3 09/24] net: stmmac: Simplify ethtool get eee
Date: Fri, 19 May 2023 09:11:51 +0200 [thread overview]
Message-ID: <20230519071151.GB8586@pengutronix.de> (raw)
In-Reply-To: <20230331005518.2134652-10-andrew@lunn.ch>
On Fri, Mar 31, 2023 at 02:55:03AM +0200, Andrew Lunn wrote:
> phylink_ethtool_get_eee() fills in eee_enabled, eee_active and
> tx_lpi_enabled. So there is no need for the MAC driver to do it as
> well.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Complete patch set is tested on stmmac interface of Polyhex Debix Model A
i.MX8MPlus board.
The only thing that's changed from before is that we're not advertising
EEE as a default anymore.
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 -
> drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 -------
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 --
> 3 files changed, 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> index 3d15e1e92e18..a0f6e58fc622 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> @@ -253,7 +253,6 @@ struct stmmac_priv {
> int eee_enabled;
> int eee_active;
> int tx_lpi_timer;
> - int tx_lpi_enabled;
> int eee_tw_timer;
> bool eee_sw_timer_en;
> unsigned int mode;
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> index 35c8dd92d369..fd97cdbb6797 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> @@ -782,10 +782,7 @@ static int stmmac_ethtool_op_get_eee(struct net_device *dev,
> if (!priv->dma_cap.eee)
> return -EOPNOTSUPP;
>
> - edata->eee_enabled = priv->eee_enabled;
> - edata->eee_active = priv->eee_active;
> edata->tx_lpi_timer = priv->tx_lpi_timer;
> - edata->tx_lpi_enabled = priv->tx_lpi_enabled;
>
> return phylink_ethtool_get_eee(priv->phylink, edata);
> }
> @@ -799,10 +796,6 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,
> if (!priv->dma_cap.eee)
> return -EOPNOTSUPP;
>
> - if (priv->tx_lpi_enabled != edata->tx_lpi_enabled)
> - netdev_warn(priv->dev,
> - "Setting EEE tx-lpi is not supported\n");
> -
> if (!edata->eee_enabled)
> stmmac_disable_eee_mode(priv);
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index dd2488998993..190b74d7f4e7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -971,7 +971,6 @@ static void stmmac_mac_link_down(struct phylink_config *config,
>
> stmmac_mac_set(priv, priv->ioaddr, false);
> priv->eee_active = false;
> - priv->tx_lpi_enabled = false;
> priv->eee_enabled = stmmac_eee_init(priv);
> stmmac_set_eee_pls(priv, priv->hw, false);
>
> @@ -1084,7 +1083,6 @@ static void stmmac_mac_link_up(struct phylink_config *config,
> if (!priv->plat->rx_clk_runs_in_lpi)
> phy_eee_clk_stop_enable(phy);
> priv->eee_enabled = stmmac_eee_init(priv);
> - priv->tx_lpi_enabled = priv->eee_enabled;
> stmmac_set_eee_pls(priv, priv->hw, true);
> }
>
> --
> 2.40.0
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-05-19 7:11 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 0:54 [RFC/RFTv3 00/24] net: ethernet: Rework EEE Andrew Lunn
2023-03-31 0:54 ` [RFC/RFTv3 01/24] net: phy: Add phydev->eee_active to simplify adjust link callbacks Andrew Lunn
2023-05-30 17:51 ` Florian Fainelli
2023-03-31 0:54 ` [RFC/RFTv3 02/24] net: phylink: Add mac_set_eee() callback Andrew Lunn
2023-03-31 0:54 ` [RFC/RFTv3 03/24] net: phy: Add helper to set EEE Clock stop enable bit Andrew Lunn
2023-03-31 0:54 ` [RFC/RFTv3 04/24] net: phy: Keep track of EEE tx_lpi_enabled Andrew Lunn
2023-05-30 18:11 ` Florian Fainelli
2023-05-30 18:14 ` Russell King (Oracle)
2023-03-31 0:54 ` [RFC/RFTv3 05/24] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 06/24] net: phylink: Handle change in EEE from phylib Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 07/24] net: marvell: mvneta: Simplify EEE configuration Andrew Lunn
2023-05-30 18:03 ` Florian Fainelli
2023-03-31 0:55 ` [RFC/RFTv3 08/24] net: stmmac: Drop usage of phy_init_eee() Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 09/24] net: stmmac: Simplify ethtool get eee Andrew Lunn
2023-05-19 7:11 ` Oleksij Rempel [this message]
2023-03-31 0:55 ` [RFC/RFTv3 10/24] net: lan743x: Fixup EEE Andrew Lunn
2023-05-30 18:03 ` Florian Fainelli
2023-03-31 0:55 ` [RFC/RFTv3 11/24] net: fec: Move fec_enet_eee_mode_set() and helper earlier Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 12/24] net: FEC: Fixup EEE Andrew Lunn
2023-05-19 10:27 ` Oleksij Rempel
2023-03-31 0:55 ` [RFC/RFTv3 13/24] net: genet: " Andrew Lunn
2023-05-30 18:01 ` Florian Fainelli
2023-03-31 0:55 ` [RFC/RFTv3 14/24] net: sxgdb: " Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 15/24] net: dsa: mt7530: Swap to using phydev->eee_active Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 16/24] net: dsa: b53: " Andrew Lunn
2023-05-30 18:05 ` Florian Fainelli
2023-03-31 0:55 ` [RFC/RFTv3 17/24] net: phylink: Remove unused phylink_init_eee() Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 18/24] net: phy: remove unused phy_init_eee() Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 19/24] net: usb: lan78xx: Fixup EEE Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 20/24] net: phy: Add phy_support_eee() indicating MAC support EEE Andrew Lunn
2023-05-30 18:16 ` Florian Fainelli
2023-03-31 0:55 ` [RFC/RFTv3 21/24] net: phylink: Add MAC_EEE to mac_capabilites Andrew Lunn
2023-05-30 18:18 ` Florian Fainelli
2023-03-31 0:55 ` [RFC/RFTv3 22/24] net: phylink: Extend mac_capabilities in MAC drivers which support EEE Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 23/24] net: phylib: call phy_support_eee() " Andrew Lunn
2023-03-31 0:55 ` [RFC/RFTv3 24/24] net: phy: Disable EEE advertisement by default Andrew Lunn
2023-05-26 8:56 ` [RFC/RFTv3 00/24] net: ethernet: Rework EEE Oleksij Rempel
2023-05-26 12:08 ` Andrew Lunn
2023-05-26 16:13 ` Florian Fainelli
2023-05-30 18:31 ` Florian Fainelli
2023-05-30 19:35 ` Russell King (Oracle)
2023-05-30 19:49 ` Russell King (Oracle)
2023-05-31 7:14 ` Oleksij Rempel
2023-05-31 14:41 ` Russell King (Oracle)
2023-05-30 19:48 ` Andrew Lunn
2023-05-30 20:03 ` Florian Fainelli
2023-05-30 20:36 ` Russell King (Oracle)
2023-05-30 20:28 ` Russell King (Oracle)
2023-05-30 23:03 ` Florian Fainelli
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=20230519071151.GB8586@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux@rempel-privat.de \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).