summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatherine Sullivan <catherine.sullivan@intel.com>2014-07-12 07:28:13 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-09-04 01:38:28 -0700
commitc57e9f179b5cd2f4fbdfc973e9174094b06ca43b (patch)
tree0871df025c89e7b1a23a163cbd2967d86013048a
parent124ed15bf126b5bf437c8eee2873ecbeef464146 (diff)
downloadlinux-c57e9f179b5cd2f4fbdfc973e9174094b06ca43b.tar.bz2
i40e: Allow user to change link settings if link is down
Allow the user to change auto-negotiation and speed settings if link is down. Change-ID: I372967c627682b5e1835f623a7cbf41b21b51043 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index e701f42d1529..de4ce0e022a4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -466,7 +466,8 @@ static int i40e_set_settings(struct net_device *netdev,
if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET &&
hw->phy.media_type != I40E_MEDIA_TYPE_FIBER &&
- hw->phy.media_type != I40E_MEDIA_TYPE_BACKPLANE)
+ hw->phy.media_type != I40E_MEDIA_TYPE_BACKPLANE &&
+ hw->phy.link_info.link_info & I40E_AQ_LINK_UP)
return -EOPNOTSUPP;
/* get our own copy of the bits to check against */