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] [day] [month] [year] [list]
Message-ID: <Z9lILQ80-gFuYFGV@shell.armlinux.org.uk>
Date: Tue, 18 Mar 2025 10:17:17 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Woojung Huh <woojung.huh@...rochip.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	Thangaraj Samynathan <Thangaraj.S@...rochip.com>,
	Rengarajan Sundararajan <Rengarajan.S@...rochip.com>,
	kernel@...gutronix.de, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, UNGLinuxDriver@...rochip.com,
	Phil Elwell <phil@...pberrypi.org>,
	Maxime Chevallier <maxime.chevallier@...tlin.com>,
	Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net-next v4 09/10] net: usb: lan78xx: Integrate EEE
 support with phylink LPI API

On Tue, Mar 18, 2025 at 10:34:09AM +0100, Oleksij Rempel wrote:
> +static int lan78xx_mac_enable_tx_lpi(struct phylink_config *config, u32 timer,
> +				     bool tx_clk_stop)
> +{
> +	struct net_device *net = to_net_dev(config->dev);
> +	struct lan78xx_net *dev = netdev_priv(net);
> +	int ret;
> +
> +	/* Software should only change this field when Energy Efficient
> +	 * Ethernet Enable (EEEEN) is cleared. We ensure that by clearing
> +	 * EEEEN during probe, and phylink itself guarantees that
> +	 * mac_disable_tx_lpi() will have been previously called.
> +	 */
> +	ret = lan78xx_write_reg(dev, EEE_TX_LPI_REQ_DLY, timer);
> +	if (ret < 0)
> +		goto tx_lpi_fail;
> +
> +	ret = lan78xx_mac_eee_enable(dev, true);
> +	if (ret < 0)
> +		goto tx_lpi_fail;
> +
> +	return 0;
> +
> +tx_lpi_fail:
> +	netdev_err(dev->net, "Failed to enable TX LPI with error %pe\n",
> +		   ERR_PTR(ret));

This function is called thusly:

        err = pl->mac_ops->mac_enable_tx_lpi(pl->config, pl->mac_tx_lpi_timer,
                                             pl->mac_tx_clk_stop);
        if (err) {
                phylink_pcs_disable_eee(pl->pcs);
                phylink_err(pl, "%ps() failed: %pe\n",
                            pl->mac_ops->mac_enable_tx_lpi, ERR_PTR(err));

Is it necessary to report the error twice?

-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ