]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i40e: Allow user to change link settings if link is down
authorCatherine Sullivan <catherine.sullivan@intel.com>
Sat, 12 Jul 2014 07:28:13 +0000 (07:28 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 4 Sep 2014 08:38:28 +0000 (01:38 -0700)
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>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index e701f42d1529f497d05578969deed2d429eeabd0..de4ce0e022a4c602b3f39d5c290484e9cbe42bf9 100644 (file)
@@ -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 */