From: Simon Horman <simon.horman@corigine.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Marcin Wojtas <mw@semihalf.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH RFC net-next 3/4] net: mvneta: convert to phylink EEE implementation
Date: Fri, 9 Jun 2023 16:02:09 +0200 [thread overview]
Message-ID: <ZIMw4XoCg/4biVN9@corigine.com> (raw)
In-Reply-To: <E1q7Y9W-00DI8m-Jo@rmk-PC.armlinux.org.uk>
On Fri, Jun 09, 2023 at 10:11:26AM +0100, Russell King (Oracle) wrote:
> Convert mvneta to use phylink's EEE implementation, which means we just
> need to implement the two methods for LPI control, and adding the
> initial configuration.
>
> Disabling LPI requires clearing a single bit. Enabling LPI needs a full
> configuration of several values, as the timer values are dependent on
> the MAC operating speed.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 95 +++++++++++++++++----------
> 1 file changed, 61 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index e2abc00d0472..c634ec5d3f9a 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -284,8 +284,10 @@
> MVNETA_TXQ_BUCKET_REFILL_PERIOD))
>
> #define MVNETA_LPI_CTRL_0 0x2cc0
> +#define MVNETA_LPI_CTRL_0_TS 0xff << 8
Hi Russell,
maybe GENMASK would be useful here. If not, perhaps (0xffUL << 8)
> #define MVNETA_LPI_CTRL_1 0x2cc4
> #define MVNETA_LPI_REQUEST_ENABLE BIT(0)
> +#define MVNETA_LPI_CTRL_1_TW 0xfff << 4
Likewise here.
> #define MVNETA_LPI_CTRL_2 0x2cc8
> #define MVNETA_LPI_STATUS 0x2ccc
>
> @@ -541,10 +543,6 @@ struct mvneta_port {
> struct mvneta_bm_pool *pool_short;
> int bm_win_id;
>
> - bool eee_enabled;
> - bool eee_active;
> - bool tx_lpi_enabled;
> -
> u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
>
> u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
> @@ -4232,9 +4230,6 @@ static void mvneta_mac_link_down(struct phylink_config *config,
> val |= MVNETA_GMAC_FORCE_LINK_DOWN;
> mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
> }
> -
> - pp->eee_active = false;
> - mvneta_set_eee(pp, false);
> }
mvneta_set_eee() seems unused after this patch.
Perhaps it can be removed?
...
next prev parent reply other threads:[~2023-06-09 14:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 9:11 [PATCH RFC net-next 0/4] phylink EEE support Russell King (Oracle)
2023-06-09 9:11 ` [PATCH RFC net-next 1/4] net: add helpers for EEE configuration Russell King (Oracle)
2023-06-09 13:52 ` Simon Horman
2023-06-09 9:11 ` [PATCH RFC net-next 2/4] net: phylink: add EEE management Russell King (Oracle)
2023-06-11 21:28 ` Andrew Lunn
2023-06-11 21:37 ` Russell King (Oracle)
2023-06-11 22:25 ` Andrew Lunn
2023-06-13 9:13 ` Russell King (Oracle)
2023-06-13 12:26 ` Andrew Lunn
2023-06-13 14:10 ` Russell King (Oracle)
2023-06-09 9:11 ` [PATCH RFC net-next 3/4] net: mvneta: convert to phylink EEE implementation Russell King (Oracle)
2023-06-09 14:02 ` Simon Horman [this message]
2023-06-09 14:31 ` Russell King (Oracle)
2023-06-09 18:25 ` Simon Horman
2023-06-09 9:11 ` [PATCH RFC net-next 4/4] net: mvpp2: add " Russell King (Oracle)
2023-06-09 14:03 ` Simon Horman
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=ZIMw4XoCg/4biVN9@corigine.com \
--to=simon.horman@corigine.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=thomas.petazzoni@bootlin.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).