diff options
author | Dave Ertman <david.m.ertman@intel.com> | 2018-01-22 12:00:37 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-02-13 11:40:10 -0800 |
commit | 7b63435a5035621baa4de8d15ca1b4440c3b4d12 (patch) | |
tree | 0236a7c5ccce7bb780b59ba04adc0d211f38c0b5 /drivers/net/ethernet/intel/i40e/i40e_ethtool.c | |
parent | 7363115efb0452d2ec5b69ae18378a173ac2cf7f (diff) | |
download | lwn-7b63435a5035621baa4de8d15ca1b4440c3b4d12.tar.gz lwn-7b63435a5035621baa4de8d15ca1b4440c3b4d12.zip |
i40e: i40e: Change ethtool check from MAC to HW flag
The MAC, FW Version and NPAR check used to determine
if shutting off the FW LLDP engine is supported is not
using the usual feature check mechanism.
This patch fixes the problem by moving the feature check
to i40e_sw_init in order to set a flag in pf->hw_features
that ethtool will use for priv_flags disable operation.
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index 29a7412b2fa6..0dcbbda164c4 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -4426,17 +4426,9 @@ flags_complete: * unsupported FW versions. */ if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) { - if (pf->hw.func_caps.npar_enable) { + if (!(pf->hw_features & I40E_HW_STOPPABLE_FW_LLDP)) { dev_warn(&pf->pdev->dev, - "Unable to change FW LLDP if NPAR active\n"); - return -EOPNOTSUPP; - } - - if (pf->hw.aq.api_maj_ver < 1 || - (pf->hw.aq.api_maj_ver == 1 && - pf->hw.aq.api_min_ver < 7)) { - dev_warn(&pf->pdev->dev, - "FW ver does not support changing FW LLDP\n"); + "Device does not support changing FW LLDP\n"); return -EOPNOTSUPP; } } |