From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Woojung Huh <woojung.huh@microchip.com>,
UNGLinuxDriver@microchip.com,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Bryan Whitehead <bryan.whitehead@microchip.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net: usb: lan78xx: Fixup EEE
Date: Sun, 7 Apr 2024 19:50:33 +0200 [thread overview]
Message-ID: <ZhLc6W2TS9_vWOeq@pengutronix.de> (raw)
In-Reply-To: <20240406-lan78xx-eee-v1-1-2993b14b849c@lunn.ch>
Hi Andrew,
On Sat, Apr 06, 2024 at 03:15:59PM -0500, Andrew Lunn wrote:
.....
> ---
> - if (edata->eee_enabled) {
> - ret = lan78xx_read_reg(dev, MAC_CR, &buf);
> - buf |= MAC_CR_EEE_EN_;
> - ret = lan78xx_write_reg(dev, MAC_CR, buf);
> -
> - phy_ethtool_set_eee(net->phydev, edata);
> -
> - buf = (u32)edata->tx_lpi_timer;
> - ret = lan78xx_write_reg(dev, EEE_TX_LPI_REQ_DLY, buf);
> - } else {
> - ret = lan78xx_read_reg(dev, MAC_CR, &buf);
> - buf &= ~MAC_CR_EEE_EN_;
> - ret = lan78xx_write_reg(dev, MAC_CR, buf);
> - }
> + ret = phy_ethtool_set_eee(net->phydev, edata);
> + if (ret < 0)
> + goto out;
>
> + buf = (u32)edata->tx_lpi_timer;
> + ret = lan78xx_write_reg(dev, EEE_TX_LPI_REQ_DLY, buf);
According to the documentation:
"Host software should only change this field when Energy Efficient
Ethernet Enable (EEEEN) is cleared."
Even more: "A value of zero may adversely affect the ability of the TX
data path to support Gigabit operation. A reasonable value when the part
is operating at Gigabit speeds is 50 us."
Previous code seems to not care about it too. So, it would be not a
regression if something is broken.
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
I'll get some time to work on this driver in some months, in this case
I'll take a closer look on EEE too.
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-04-07 17:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 20:15 [PATCH net-next 0/2] net: Clean up some EEE code Andrew Lunn
2024-04-06 20:15 ` [PATCH net-next 1/2] net: usb: lan78xx: Fixup EEE Andrew Lunn
2024-04-07 17:50 ` Oleksij Rempel [this message]
2024-04-06 20:16 ` [PATCH net-next 2/2] net: lan743x: " Andrew Lunn
2024-04-07 17:53 ` Oleksij Rempel
2024-04-08 13:10 ` [PATCH net-next 0/2] net: Clean up some EEE code patchwork-bot+netdevbpf
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=ZhLc6W2TS9_vWOeq@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--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).