lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e362f545ac58f35a88f29a3ca36009f7c97090b.camel@microchip.com>
Date: Tue, 25 Mar 2025 17:51:05 +0000
From: <Rengarajan.S@...rochip.com>
To: <andrew+netdev@...n.ch>, <rmk+kernel@...linux.org.uk>,
	<davem@...emloft.net>, <Thangaraj.S@...rochip.com>,
	<Woojung.Huh@...rochip.com>, <pabeni@...hat.com>, <o.rempel@...gutronix.de>,
	<edumazet@...gle.com>, <kuba@...nel.org>
CC: <phil@...pberrypi.org>, <kernel@...gutronix.de>, <horms@...nel.org>,
	<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
	<UNGLinuxDriver@...rochip.com>, <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next v5 5/6] net: usb: lan78xx: Integrate EEE support
 with phylink LPI API

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@...gutronix.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ