sfc: support setting MTU even if not privileged to configure MAC fully

Unprivileged functions (such as VFs) may set their MTU by use of the
 'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu().
If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), and the
 NIC supports the above (SET_MAC_ENHANCED capability), use it rather
 than efx_mcdi_set_mac().

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Edward Cree
2020-07-02 17:27:35 +01:00
committed by David S. Miller
parent e44f65fd66
commit af3c38d3fb
7 changed files with 16 additions and 23 deletions

View File

@@ -241,7 +241,7 @@ int efx_ethtool_set_pauseparam(struct net_device *net_dev,
/* Reconfigure the MAC. The PHY *may* generate a link state change event
* if the user just changed the advertised capabilities, but there's no
* harm doing this twice */
efx_mac_reconfigure(efx);
efx_mac_reconfigure(efx, false);
out:
mutex_unlock(&efx->mac_lock);