i40e/i40evf: Remove unused variable an_enable and function update_link_info
authorCatherine Sullivan <catherine.sullivan@intel.com>
Sat, 24 Jan 2015 09:58:41 +0000 (09:58 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 24 Feb 2015 01:13:18 +0000 (17:13 -0800)
An_enable was never used only set so lets remove it. The function
update_link_info only did two things, call get_link_info and set
an_enabled. Therefore we should also remove update_link_info and
change all references to it to get_link_info.

Change-ID: Ie3022680fa7a94bfd495a4f5fc76a73701d85569
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_prototype.h
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index 11a9ffebf8d88acdfd5b738baab62bd2b34aa30a..8dbf7dd984ca795d1362c1f599f8860678f45942 100644 (file)
@@ -1297,14 +1297,14 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
                        *aq_failures |= I40E_SET_FC_AQ_FAIL_SET;
        }
        /* Update the link info */
-       status = i40e_update_link_info(hw, true);
+       status = i40e_aq_get_link_info(hw, true, NULL, NULL);
        if (status) {
                /* Wait a little bit (on 40G cards it sometimes takes a really
                 * long time for link to come back from the atomic reset)
                 * and try once more
                 */
                msleep(1000);
-               status = i40e_update_link_info(hw, true);
+               status = i40e_aq_get_link_info(hw, true, NULL, NULL);
        }
        if (status)
                *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE;
@@ -1451,35 +1451,6 @@ aq_get_link_info_exit:
        return status;
 }
 
-/**
- * i40e_update_link_info
- * @hw: pointer to the hw struct
- * @enable_lse: enable/disable LinkStatusEvent reporting
- *
- * Returns the link status of the adapter
- **/
-i40e_status i40e_update_link_info(struct i40e_hw *hw, bool enable_lse)
-{
-       struct i40e_aq_get_phy_abilities_resp abilities;
-       i40e_status status;
-
-       status = i40e_aq_get_link_info(hw, enable_lse, NULL, NULL);
-       if (status)
-               return status;
-
-       status = i40e_aq_get_phy_capabilities(hw, false, false,
-                                             &abilities, NULL);
-       if (status)
-               return status;
-
-       if (abilities.abilities & I40E_AQ_PHY_AN_ENABLED)
-               hw->phy.link_info.an_enabled = true;
-       else
-               hw->phy.link_info.an_enabled = false;
-
-       return status;
-}
-
 /**
  * i40e_aq_set_phy_int_mask
  * @hw: pointer to the hw struct
index cd5083e91566c7b4bd8b29a2662b682a831e90d6..8e69caf01efe01bf2da1d9642c6aa503d1889724 100644 (file)
@@ -620,7 +620,7 @@ static int i40e_set_settings(struct net_device *netdev,
                        return -EAGAIN;
                }
 
-               status = i40e_update_link_info(hw, true);
+               status = i40e_aq_get_link_info(hw, true, NULL, NULL);
                if (status)
                        netdev_info(netdev, "Updating link info failed with error %d\n",
                                    status);
@@ -766,7 +766,7 @@ static int i40e_set_pauseparam(struct net_device *netdev,
                err = -EAGAIN;
        }
        if (aq_failures & I40E_SET_FC_AQ_FAIL_UPDATE) {
-               netdev_info(netdev, "Set fc failed on the update_link_info call with error %d and status %d\n",
+               netdev_info(netdev, "Set fc failed on the get_link_info call with error %d and status %d\n",
                            status, hw->aq.asq_last_status);
                err = -EAGAIN;
        }
index 652cb4eef371ffd90095bc4d22b0a1ff65b51fb3..163cf2e14318d87034c42456661f4fc7b53af647 100644 (file)
@@ -8885,7 +8885,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
                i40e_config_rss(pf);
 
        /* fill in link information and enable LSE reporting */
-       i40e_update_link_info(&pf->hw, true);
+       i40e_aq_get_link_info(&pf->hw, true, NULL, NULL);
        i40e_link_event(pf);
 
        /* Initialize user-specific link properties */
@@ -8893,7 +8893,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
                                  I40E_AQ_AN_COMPLETED) ? true : false);
 
        /* fill in link information and enable LSE reporting */
-       i40e_update_link_info(&pf->hw, true);
+       i40e_aq_get_link_info(&pf->hw, true, NULL, NULL);
        i40e_link_event(pf);
 
        /* Initialize user-specific link properties */
index de80cb2785a5b732dba7dde787fb9812e7a8dee8..1247a45603a8866e92fda7b1f6bc549153642ffd 100644 (file)
@@ -97,7 +97,6 @@ i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
 i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
                                bool enable_lse, struct i40e_link_status *link,
                                struct i40e_asq_cmd_details *cmd_details);
-i40e_status i40e_update_link_info(struct i40e_hw *hw, bool enable_lse);
 i40e_status i40e_aq_set_local_advt_reg(struct i40e_hw *hw,
                                u64 advt_reg,
                                struct i40e_asq_cmd_details *cmd_details);
index e9901ef06a6361f9e2a1f56004764eb51ed60513..86a927b88ef4b1a8252602e527f7bafffeb73296 100644 (file)
@@ -175,7 +175,6 @@ struct i40e_link_status {
        u8 an_info;
        u8 ext_info;
        u8 loopback;
-       bool an_enabled;
        /* is Link Status Event notification to SW enabled */
        bool lse_enable;
        u16 max_frame_size;
index 3d0fdaab5cc8404e242b8ecfb0e12e12198f41cc..c8cd8afdbf8f6f7ccd6876f784f35c80ff4a80a8 100644 (file)
@@ -175,7 +175,6 @@ struct i40e_link_status {
        u8 an_info;
        u8 ext_info;
        u8 loopback;
-       bool an_enabled;
        /* is Link Status Event notification to SW enabled */
        bool lse_enable;
        u16 max_frame_size;