* [PATCH] net: mvpp2: Add EEE get/set to mvpp2 driver
@ 2024-01-18 1:57 Elliot Ayrey
2024-01-18 8:36 ` Russell King (Oracle)
0 siblings, 1 reply; 2+ messages in thread
From: Elliot Ayrey @ 2024-01-18 1:57 UTC (permalink / raw)
To: Marcin Wojtas, Russell King
Cc: netdev, linux-kernel, Elliot Ayrey, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Fill in the missing .get_eee and .set_eee functions for the mvpp2
driver.
Signed-off-by: Elliot Ayrey <elliot.ayrey@alliedtelesis.co.nz>
---
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 820b1fabe297..85dc06c85b31 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -5701,6 +5701,26 @@ static int mvpp2_ethtool_set_rxfh(struct net_device *dev,
return ret;
}
+static int mvpp2_get_eee(struct net_device *dev, struct ethtool_eee *edata)
+{
+ int ret = -EOPNOTSUPP;
+
+ if (dev->phydev)
+ ret = phy_ethtool_get_eee(dev->phydev, edata);
+
+ return ret;
+}
+
+static int mvpp2_set_eee(struct net_device *dev, struct ethtool_eee *edata)
+{
+ int ret = -EOPNOTSUPP;
+
+ if (dev->phydev)
+ ret = phy_ethtool_set_eee(dev->phydev, edata);
+
+ return ret;
+}
+
/* Device ops */
static const struct net_device_ops mvpp2_netdev_ops = {
@@ -5743,6 +5763,8 @@ static const struct ethtool_ops mvpp2_eth_tool_ops = {
.get_rxfh_indir_size = mvpp2_ethtool_get_rxfh_indir_size,
.get_rxfh = mvpp2_ethtool_get_rxfh,
.set_rxfh = mvpp2_ethtool_set_rxfh,
+ .get_eee = mvpp2_get_eee,
+ .set_eee = mvpp2_set_eee,
};
/* Used for PPv2.1, or PPv2.2 with the old Device Tree binding that
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: mvpp2: Add EEE get/set to mvpp2 driver
2024-01-18 1:57 [PATCH] net: mvpp2: Add EEE get/set to mvpp2 driver Elliot Ayrey
@ 2024-01-18 8:36 ` Russell King (Oracle)
0 siblings, 0 replies; 2+ messages in thread
From: Russell King (Oracle) @ 2024-01-18 8:36 UTC (permalink / raw)
To: Elliot Ayrey
Cc: Marcin Wojtas, netdev, linux-kernel, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
On Thu, Jan 18, 2024 at 02:57:48PM +1300, Elliot Ayrey wrote:
> Fill in the missing .get_eee and .set_eee functions for the mvpp2
> driver.
This has no benefit without also configuring LPI in the driver.
In any case, you should be calling the phylink functions not the
phylib functions.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-18 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 1:57 [PATCH] net: mvpp2: Add EEE get/set to mvpp2 driver Elliot Ayrey
2024-01-18 8:36 ` Russell King (Oracle)
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).