i40e: Warn when setting link-down-on-close while in MFP
authorPaweł Jabłoński <pawel.jablonski@intel.com>
Fri, 29 Dec 2017 13:50:20 +0000 (08:50 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 12 Feb 2018 18:43:02 +0000 (10:43 -0800)
This patch adds a warning message when the link-down-on-close flag is
setting on. The warning is printed only on MFP devices

Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index 0fb60336e64b21e7bdd0984d657df9d05b53b7b9..5ca63c5d36b4d2c53b4f50eaee13b7916ca182c3 100644 (file)
@@ -4479,6 +4479,12 @@ flags_complete:
                }
        }
 
+       if ((changed_flags & pf->flags &
+            I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED) &&
+           (pf->flags & I40E_FLAG_MFP_ENABLED))
+               dev_warn(&pf->pdev->dev,
+                        "Turning on link-down-on-close flag may affect other partitions\n");
+
        if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {
                if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) {
                        struct i40e_dcbx_config *dcbcfg;