From: <Arun.Ramadoss@microchip.com>
To: <olteanv@gmail.com>, <UNGLinuxDriver@microchip.com>,
<vivien.didelot@gmail.com>, <andrew@lunn.ch>,
<f.fainelli@gmail.com>, <kuba@kernel.org>, <wei.fang@nxp.com>,
<edumazet@google.com>, <pabeni@redhat.com>,
<o.rempel@pengutronix.de>, <Woojung.Huh@microchip.com>,
<davem@davemloft.net>, <hkallweit1@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<kernel@pengutronix.de>
Subject: Re: [PATCH net-next v6 1/9] net: dsa: microchip: enable EEE support
Date: Thu, 9 Feb 2023 04:07:11 +0000 [thread overview]
Message-ID: <332df2fff4503fac256e0895e4565b68fd76dee4.camel@microchip.com> (raw)
In-Reply-To: <20230208103211.2521836-2-o.rempel@pengutronix.de>
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.
> 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.
> +
> + return 0;
> +}
> +
>
next prev parent reply other threads:[~2023-02-09 4:07 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 [this message]
2023-02-09 5:48 ` Oleksij Rempel
2023-02-09 8:06 ` Arun.Ramadoss
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=332df2fff4503fac256e0895e4565b68fd76dee4.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).