netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Rengarajan.S@microchip.com>
To: <andrew+netdev@lunn.ch>, <rmk+kernel@armlinux.org.uk>,
	<davem@davemloft.net>, <Thangaraj.S@microchip.com>,
	<Woojung.Huh@microchip.com>, <pabeni@redhat.com>,
	<o.rempel@pengutronix.de>, <edumazet@google.com>,
	<kuba@kernel.org>
Cc: <phil@raspberrypi.org>, <kernel@pengutronix.de>,
	<horms@kernel.org>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>,
	<maxime.chevallier@bootlin.com>
Subject: Re: [PATCH net-next v5 5/6] net: usb: lan78xx: Integrate EEE support with phylink LPI API
Date: Tue, 25 Mar 2025 17:51:05 +0000	[thread overview]
Message-ID: <7e362f545ac58f35a88f29a3ca36009f7c97090b.camel@microchip.com> (raw)
In-Reply-To: <20250319084952.419051-6-o.rempel@pengutronix.de>

Hi Oleksij,

On Wed, 2025-03-19 at 09:49 +0100, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Refactor Energy-Efficient Ethernet (EEE) support in the LAN78xx
> driver to
> fully integrate with the phylink Low Power Idle (LPI) API. This
> includes:
> 
> - Replacing direct calls to `phy_ethtool_get_eee` and
> `phy_ethtool_set_eee`
>   with `phylink_ethtool_get_eee` and `phylink_ethtool_set_eee`.
> - Implementing `.mac_enable_tx_lpi` and `.mac_disable_tx_lpi` to
> control
>   LPI transitions via phylink.
> - Configuring `lpi_timer_default` to align with recommended values
> from
>   LAN7800 documentation.
> - ensure EEE is disabled on controller reset
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> changes v5:
> - remove redundant error prints
> changes v2:
> - use latest PHYlink TX_LPI API
> ---
>  drivers/net/usb/lan78xx.c | 111 +++++++++++++++++++++++-------------
> --
>  1 file changed, 67 insertions(+), 44 deletions(-)
> 
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 9ff8e7850e1e..074ac4d1cbcb 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> 
> +static int lan78xx_mac_eee_enable(struct lan78xx_net *dev, bool
> enable)
> +{
> +       u32 mac_cr = 0;
> +
> +       if (enable)
> +               mac_cr |= MAC_CR_EEE_EN_;
> +
> +       /* make sure TXEN and RXEN are disabled before reconfiguring
> MAC */
> +       return lan78xx_update_reg(dev, MAC_CR, MAC_CR_EEE_EN_,
> mac_cr);

Is it possible to add a check to make sure TXEN and RXEN are disabled
before updating the MAC. Is it taken care by phylink itself?

> --
> 2.39.5
> 

  reply	other threads:[~2025-03-25 17:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  8:49 [PATCH net-next v5 0/6] Convert LAN78xx to PHYLINK Oleksij Rempel
2025-03-19  8:49 ` [PATCH net-next v5 1/6] net: usb: lan78xx: Improve error handling in PHY initialization Oleksij Rempel
2025-03-24 15:31   ` Russell King (Oracle)
2025-03-25 17:46   ` Rengarajan.S
2025-03-25 20:06     ` Andrew Lunn
2025-03-19  8:49 ` [PATCH net-next v5 2/6] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management Oleksij Rempel
2025-03-19 10:48   ` Maxime Chevallier
2025-03-19 15:14     ` Russell King (Oracle)
2025-03-24 16:18   ` Russell King (Oracle)
2025-03-25 17:37   ` Rengarajan.S
2025-03-25 18:26     ` Russell King (Oracle)
2025-03-19  8:49 ` [PATCH net-next v5 3/6] net: usb: lan78xx: Use ethtool_op_get_link to reflect current link status Oleksij Rempel
2025-03-19  8:49 ` [PATCH net-next v5 4/6] net: usb: lan78xx: port link settings to phylink API Oleksij Rempel
2025-03-19  8:49 ` [PATCH net-next v5 5/6] net: usb: lan78xx: Integrate EEE support with phylink LPI API Oleksij Rempel
2025-03-25 17:51   ` Rengarajan.S [this message]
2025-03-25 18:34     ` Russell King (Oracle)
2025-03-19  8:49 ` [PATCH net-next v5 6/6] net: usb: lan78xx: remove unused struct members Oleksij Rempel
2025-03-24 16:20   ` Russell King (Oracle)

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=7e362f545ac58f35a88f29a3ca36009f7c97090b.camel@microchip.com \
    --to=rengarajan.s@microchip.com \
    --cc=Thangaraj.S@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=phil@raspberrypi.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).