net: mana: Add get_link and get_link_ksettings in ethtool
PATCH v2 1/1 net: mana: Add get_link and get_link_ksettings in ethtool
Add support for the ethtool get_link and get_link_ksettings operations. Display standard port information using ethtool.
Before the change:
$ethtool enP30832s1
Quoted 1 line
No data available
After the change:
$ethtool enP30832s1
Quoted 1 line
Settings for enP30832s1:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Full
Auto-negotiation: off
Port: Other
PHYAD: 0
Transceiver: internal
Link detected: yes
---
Changes in v2:
* Remove support for displaying auto-negotiation details
* Change PORT_DA to PORT_OTHER
--- drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/net/ethernet/microsoft/mana/mana_ethtool.c +11 -0
@@ -443,6 +443,15 @@ static int mana_set_ringparam(struct net_device *ndev,return err; } +static int mana_get_link_ksettings (struct net_device *ndev, +struct ethtool_link_ksettings *cmd) +{ + cmd->base.duplex =DUPLEX_FULL ; + cmd->base.port =PORT_OTHER ; + +return 0 ; +} +const struct ethtool_ops mana_ethtool_ops = { .get_ethtool_stats = mana_get_ethtool_stats, .get_sset_count = mana_get_sset_count,
@@ -456,4 +465,6 @@ const struct ethtool_ops mana_ethtool_ops = { .set_channels = mana_set_channels, .get_ringparam = mana_get_ringparam, .set_ringparam = mana_set_ringparam, + .get_link_ksettings = mana_get_link_ksettings, + .get_link = ethtool_op_get_link, };
Signature · 1 line
2.34.1
Simon Horman
reviewerQuoted 27 lines · Erni Sri Satya Vennela
Add support for the ethtool
get_linkandget_link_ksettingsoperations. Display standard port information using ethtool.Before the change:
$ethtool enP30832s1Quoted 1 line
No data available
After the change:
$ethtool enP30832s1Quoted 1 line
Settings for enP30832s1:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Full
Auto-negotiation: off
Port: Other
PHYAD: 0
Transceiver: internal
Link detected: yes
Quoted 7 lines
Signed-off-by Erni Sri Satya Vennela <[email protected]>Reviewed-by Haiyang Zhang <[email protected]>Reviewed-by Shradha Gupta <[email protected]>---
Changes in v2:
* Remove support for displaying auto-negotiation details
* ChangePORT_DAtoPORT_OTHER
Hi Erni, Haiyang, all
Thanks for the update, it looks like it addresses the review of v1 by Jakub. However, I am assuming that as a non-bug-fix, this is targeted at net-next. And net-next is currently closed for the v6.12 merge window. Please consider reposting this patch once net-next reopens. That will occur after v6.12-rc1 has been released. Which I expect to be about a week from now.
Also, for networking patches please tag non-bug fixes for net-next (and bug fixes for net, being sure to include a Fixes tag).
Subject: [PATCH net-next] ...
Please see https://docs.kernel.org/process/maintainer-netdev.html
Signature · 1 line
pw-bot: defer