From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Woojung Huh <woojung.huh@microchip.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Thangaraj Samynathan <Thangaraj.S@microchip.com>,
Rengarajan Sundararajan <Rengarajan.S@microchip.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com,
Phil Elwell <phil@raspberrypi.org>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net-next v4 09/10] net: usb: lan78xx: Integrate EEE support with phylink LPI API
Date: Tue, 18 Mar 2025 10:17:17 +0000 [thread overview]
Message-ID: <Z9lILQ80-gFuYFGV@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250318093410.3047828-10-o.rempel@pengutronix.de>
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!
next prev parent reply other threads:[~2025-03-18 10:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 9:34 [PATCH net-next v4 00/10] Convert LAN78xx to PHYLINK Oleksij Rempel
2025-03-18 9:34 ` [PATCH net-next v4 01/10] net: usb: lan78xx: handle errors in lan7801 PHY initialization Oleksij Rempel
2025-03-18 9:39 ` Marc Kleine-Budde
2025-03-18 9:34 ` [PATCH net-next v4 02/10] net: usb: lan78xx: handle errors in LED configuration during PHY init Oleksij Rempel
2025-03-18 9:34 ` [PATCH net-next v4 03/10] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management Oleksij Rempel
2025-03-18 9:34 ` [PATCH net-next v4 04/10] net: usb: lan78xx: improve error reporting on PHY attach failure Oleksij Rempel
2025-03-18 9:42 ` Marc Kleine-Budde
2025-03-18 9:34 ` [PATCH net-next v4 05/10] net: usb: lan78xx: Improve error handling in PHY initialization Oleksij Rempel
2025-03-18 9:34 ` [PATCH net-next v4 06/10] net: usb: lan78xx: Use ethtool_op_get_link to reflect current link status Oleksij Rempel
2025-03-18 9:34 ` [PATCH net-next v4 07/10] net: usb: lan78xx: port link settings to phylink API Oleksij Rempel
2025-03-18 9:34 ` [PATCH net-next v4 08/10] net: usb: lan78xx: Transition get/set_pause to phylink Oleksij Rempel
2025-03-18 10:14 ` Russell King (Oracle)
2025-03-18 9:34 ` [PATCH net-next v4 09/10] net: usb: lan78xx: Integrate EEE support with phylink LPI API Oleksij Rempel
2025-03-18 10:17 ` Russell King (Oracle) [this message]
2025-03-18 9:34 ` [PATCH net-next v4 10/10] net: usb: lan78xx: remove unused struct members 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=Z9lILQ80-gFuYFGV@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Rengarajan.S@microchip.com \
--cc=Thangaraj.S@microchip.com \
--cc=UNGLinuxDriver@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=woojung.huh@microchip.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).