i40e/base: remove useless wrapper for link info
authorHelin Zhang <helin.zhang@intel.com>
Thu, 30 Apr 2015 15:03:26 +0000 (23:03 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 17 May 2015 21:17:26 +0000 (23:17 +0200)
As i40e_update_link_info() is just a simple wrapper of AQ command
interface of i40e_aq_get_link_info(), the AQ command interface
should be used directly.

Test report: http://www.dpdk.org/ml/archives/dev/2015-May/017384.html

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
lib/librte_pmd_i40e/i40e/i40e_common.c
lib/librte_pmd_i40e/i40e/i40e_prototype.h

index 7e5ec0c..7eb4fb4 100644 (file)
@@ -1238,14 +1238,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
                 */
                i40e_msec_delay(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;
@@ -1430,36 +1430,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
- **/
-enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw,
-                                            bool enable_lse)
-{
-       struct i40e_aq_get_phy_abilities_resp abilities;
-       enum i40e_status_code 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 9cf17ac..7bb02fc 100644 (file)
@@ -128,8 +128,6 @@ enum i40e_status_code i40e_aq_set_link_restart_an(struct i40e_hw *hw,
 enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
                                bool enable_lse, struct i40e_link_status *link,
                                struct i40e_asq_cmd_details *cmd_details);
-enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw,
-                                           bool enable_lse);
 enum i40e_status_code i40e_aq_set_local_advt_reg(struct i40e_hw *hw,
                                u64 advt_reg,
                                struct i40e_asq_cmd_details *cmd_details);