i40e: Warn when setting link-down-on-close while in MFP

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>
This commit is contained in:
Paweł Jabłoński 2017-12-29 08:50:20 -05:00 committed by Jeff Kirsher
parent 1fa51a650e
commit 17b4d25c12
1 changed files with 6 additions and 0 deletions

View File

@ -4479,6 +4479,12 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
}
}
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;