Commit 041c6148 authored by Erik Ekman's avatar Erik Ekman Committed by David S. Miller

sfc: Fix reading non-legacy supported link modes

Everything except the first 32 bits was lost when the pause flags were
added. This makes the 50000baseCR2 mode flag (bit 34) not appear.

I have tested this with a 10G card (SFN5122F-R7) by modifying it to
return a non-legacy link mode (10000baseCR).
Signed-off-by: default avatarErik Ekman <erik@kryo.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06dd34a6
...@@ -563,20 +563,14 @@ int efx_ethtool_get_link_ksettings(struct net_device *net_dev, ...@@ -563,20 +563,14 @@ int efx_ethtool_get_link_ksettings(struct net_device *net_dev,
{ {
struct efx_nic *efx = netdev_priv(net_dev); struct efx_nic *efx = netdev_priv(net_dev);
struct efx_link_state *link_state = &efx->link_state; struct efx_link_state *link_state = &efx->link_state;
u32 supported;
mutex_lock(&efx->mac_lock); mutex_lock(&efx->mac_lock);
efx_mcdi_phy_get_link_ksettings(efx, cmd); efx_mcdi_phy_get_link_ksettings(efx, cmd);
mutex_unlock(&efx->mac_lock); mutex_unlock(&efx->mac_lock);
/* Both MACs support pause frames (bidirectional and respond-only) */ /* Both MACs support pause frames (bidirectional and respond-only) */
ethtool_convert_link_mode_to_legacy_u32(&supported, ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
cmd->link_modes.supported); ethtool_link_ksettings_add_link_mode(cmd, supported, Asym_Pause);
supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
supported);
if (LOOPBACK_INTERNAL(efx)) { if (LOOPBACK_INTERNAL(efx)) {
cmd->base.speed = link_state->speed; cmd->base.speed = link_state->speed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment