Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: sparx5/lan969x: Add support for ethtool pause parameters

Implement get_pauseparam() and set_pauseparam() ethtool operations for
Sparx5 ports. This allows users to query and configure IEEE 802.3x
pause frame settings via:

ethtool -a ethX
ethtool -A ethX rx on|off tx on|off autoneg on|off

The driver delegates pause parameter handling to phylink through
phylink_ethtool_get_pauseparam() and phylink_ethtool_set_pauseparam().

The underlying configuration of pause frame generation and reception is
already implemented in the driver; this patch only wires it up to the
standard ethtool interface, making the feature accessible to userspace.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20250917-802-3x-pause-v1-1-3d1565a68a96@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Daniel Machon and committed by
Jakub Kicinski
315f423b 6287982a

+18
+18
drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
··· 1212 1212 return 0; 1213 1213 } 1214 1214 1215 + static void sparx5_get_pauseparam(struct net_device *dev, 1216 + struct ethtool_pauseparam *pause) 1217 + { 1218 + struct sparx5_port *port = netdev_priv(dev); 1219 + 1220 + phylink_ethtool_get_pauseparam(port->phylink, pause); 1221 + } 1222 + 1223 + static int sparx5_set_pauseparam(struct net_device *dev, 1224 + struct ethtool_pauseparam *pause) 1225 + { 1226 + struct sparx5_port *port = netdev_priv(dev); 1227 + 1228 + return phylink_ethtool_set_pauseparam(port->phylink, pause); 1229 + } 1230 + 1215 1231 const struct ethtool_ops sparx5_ethtool_ops = { 1216 1232 .get_sset_count = sparx5_get_sset_count, 1217 1233 .get_strings = sparx5_get_sset_strings, ··· 1240 1224 .get_eth_ctrl_stats = sparx5_get_eth_mac_ctrl_stats, 1241 1225 .get_rmon_stats = sparx5_get_eth_rmon_stats, 1242 1226 .get_ts_info = sparx5_get_ts_info, 1227 + .get_pauseparam = sparx5_get_pauseparam, 1228 + .set_pauseparam = sparx5_set_pauseparam, 1243 1229 }; 1244 1230 1245 1231 int sparx_stats_init(struct sparx5 *sparx5)