From: <Arun.Ramadoss@microchip.com>
To: <o.rempel@pengutronix.de>
Cc: <olteanv@gmail.com>, <UNGLinuxDriver@microchip.com>,
<linux-kernel@vger.kernel.org>, <vivien.didelot@gmail.com>,
<andrew@lunn.ch>, <f.fainelli@gmail.com>, <kuba@kernel.org>,
<wei.fang@nxp.com>, <edumazet@google.com>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <Woojung.Huh@microchip.com>,
<davem@davemloft.net>, <hkallweit1@gmail.com>,
<kernel@pengutronix.de>
Subject: Re: [PATCH net-next v6 1/9] net: dsa: microchip: enable EEE support
Date: Thu, 9 Feb 2023 08:06:13 +0000 [thread overview]
Message-ID: <bd6c90ff8c5bb176567cd07b761a51e691dfe0b4.camel@microchip.com> (raw)
In-Reply-To: <20230209054857.GB19895@pengutronix.de>
Hi Oleksij,
On Thu, 2023-02-09 at 06:48 +0100, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> Hi Arun,
>
> On Thu, Feb 09, 2023 at 04:07:11AM +0000, Arun.Ramadoss@microchip.com
> wrote:
> > Hi Oleksij,
> > On Wed, 2023-02-08 at 11:32 +0100, Oleksij Rempel wrote:
> > > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > > know the content is safe
> > >
> > > Some of KSZ9477 family switches provides EEE support.
> >
> > nit: If you can elaborate what are the chip supports will be good.
>
> Do you mean list of supported chips or link speeds with EEE support?
Yes, since you mentioned some of KSZ9477, I thought it will be better
to mention the supported chips in commit description.
>
> > > To enable it, we
> > > just need to register set_mac_eee/set_mac_eee handlers and
> > > validate
> > > supported chip version and port.
> > >
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> > > ---
> > > drivers/net/dsa/microchip/ksz_common.c | 65
> > > ++++++++++++++++++++++++++
> > > 1 file changed, 65 insertions(+)
> > >
> > > diff --git a/drivers/net/dsa/microchip/ksz_common.c
> > > b/drivers/net/dsa/microchip/ksz_common.c
> > > index 46becc0382d6..0a2d78253d17 100644
> > > --- a/drivers/net/dsa/microchip/ksz_common.c
> > > +++ b/drivers/net/dsa/microchip/ksz_common.c
> > > @@ -2673,6 +2673,69 @@ static int ksz_max_mtu(struct dsa_switch
> > > *ds,
> > > int port)
> > > return -EOPNOTSUPP;
> > > }
> > >
> > > +static int ksz_get_mac_eee(struct dsa_switch *ds, int port,
> > > + struct ethtool_eee *e)
> > > +{
> > > + int ret;
> > > +
> > > + ret = ksz_validate_eee(ds, port);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + /* There is no documented control of Tx LPI
> > > configuration. */
> > > + e->tx_lpi_enabled = true;
> >
> > Blank line before comment will increase readability.
> >
> > > + /* There is no documented control of Tx LPI timer.
> > > According
> > > to tests
> > > + * Tx LPI timer seems to be set by default to minimal
> > > value.
> > > + */
> > > + e->tx_lpi_timer = 0;
> >
> > for lpi_enabled, you have used true and for lpi_timer you have used
> > 0.
> > It can be consistent either true/false or 1/0.
>
> tx_lpi_enabled has only on/off states. This is why i use bool values.
>
> tx_lpi_timer is a range in microseconds to re-enter LPI mode.
Got it. I overlooked the variable data type.
>
> Beside, tx_lpi_timer can be used to optimize EEE for some
> applications.
> For example do not start Low Power Idle for some usecs so latency
> will
> be reduced. Are there some secret register to configure this value?
I am not aware of it.
>
> Regards,
> Oleksij
> --
> Pengutronix
> e.K. | |
> Steuerwalder Str. 21 |
> http://www.pengutronix.de/e/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-
> 0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-
> 5555 |
next prev parent reply other threads:[~2023-02-09 8:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 10:32 [PATCH net-next v6 0/9] net: add EEE support for KSZ9477 and AR8035 with i.MX6 Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 1/9] net: dsa: microchip: enable EEE support Oleksij Rempel
2023-02-09 4:07 ` Arun.Ramadoss
2023-02-09 5:48 ` Oleksij Rempel
2023-02-09 8:06 ` Arun.Ramadoss [this message]
2023-02-08 10:32 ` [PATCH net-next v6 2/9] net: phy: add genphy_c45_read_eee_abilities() function Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 3/9] net: phy: micrel: add ksz9477_get_features() Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 4/9] net: phy: export phy_check_valid() function Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 5/9] net: phy: add genphy_c45_ethtool_get/set_eee() support Oleksij Rempel
2023-02-08 13:08 ` Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 6/9] net: phy: c22: migrate to genphy_c45_write_eee_adv() Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 7/9] net: phy: c45: " Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 8/9] net: phy: migrate phy_init_eee() to genphy_c45_eee_is_active() Oleksij Rempel
2023-02-08 10:32 ` [PATCH net-next v6 9/9] net: phy: start using genphy_c45_ethtool_get/set_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=bd6c90ff8c5bb176567cd07b761a51e691dfe0b4.camel@microchip.com \
--to=arun.ramadoss@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.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=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
--cc=wei.fang@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;
as well as URLs for NNTP newsgroup(s).