提交 7adf9053 编写于 作者: E Erik Ekman 提交者: Jakub Kicinski

net: bna: Update supported link modes

The BR-series installation guide from https://driverdownloads.qlogic.com/
mentions the cards support 10Gbase-SR/LR as well as direct attach cables.

The cards only have SFP+ ports, so 10000baseT is not the right mode.
Switch to using more specific link modes added in commit 5711a982
("net: ethtool: add support for 1000BaseX and missing 10G link modes").

Only compile tested.
Signed-off-by: NErik Ekman <erik@kryo.se>
Link: https://lore.kernel.org/r/20211208230022.153496-1-erik@kryo.seSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 33d60fbd
...@@ -235,13 +235,18 @@ static int ...@@ -235,13 +235,18 @@ static int
bnad_get_link_ksettings(struct net_device *netdev, bnad_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd) struct ethtool_link_ksettings *cmd)
{ {
u32 supported, advertising; ethtool_link_ksettings_zero_link_mode(cmd, supported);
ethtool_link_ksettings_zero_link_mode(cmd, advertising);
supported = SUPPORTED_10000baseT_Full;
advertising = ADVERTISED_10000baseT_Full; ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseCR_Full);
ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseSR_Full);
ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseLR_Full);
ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseCR_Full);
ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseSR_Full);
ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseLR_Full);
cmd->base.autoneg = AUTONEG_DISABLE; cmd->base.autoneg = AUTONEG_DISABLE;
supported |= SUPPORTED_FIBRE; ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
advertising |= ADVERTISED_FIBRE; ethtool_link_ksettings_add_link_mode(cmd, advertising, FIBRE);
cmd->base.port = PORT_FIBRE; cmd->base.port = PORT_FIBRE;
cmd->base.phy_address = 0; cmd->base.phy_address = 0;
...@@ -253,11 +258,6 @@ bnad_get_link_ksettings(struct net_device *netdev, ...@@ -253,11 +258,6 @@ bnad_get_link_ksettings(struct net_device *netdev,
cmd->base.duplex = DUPLEX_UNKNOWN; cmd->base.duplex = DUPLEX_UNKNOWN;
} }
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
supported);
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
advertising);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册