[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIM3wP3TjvigZP6r@shell.armlinux.org.uk>
Date: Fri, 9 Jun 2023 15:31:28 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Simon Horman <simon.horman@...igine.com>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Marcin Wojtas <mw@...ihalf.com>,
netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH RFC net-next 3/4] net: mvneta: convert to phylink EEE
implementation
On Fri, Jun 09, 2023 at 04:02:09PM +0200, Simon Horman wrote:
> 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@...linux.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)
Why "unsigned long" when the variable we use it with is u32, which is
defined as "unsigned int" ?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists