[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZhLc6W2TS9_vWOeq@pengutronix.de>
Date: Sun, 7 Apr 2024 19:50:33 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: Woojung Huh <woojung.huh@...rochip.com>, UNGLinuxDriver@...rochip.com,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Bryan Whitehead <bryan.whitehead@...rochip.com>,
Heiner Kallweit <hkallweit1@...il.com>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: usb: lan78xx: Fixup EEE
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@...gutronix.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 |
Powered by blists - more mailing lists