diff options
author | Catherine Sullivan <catherine.sullivan@intel.com> | 2015-01-24 04:58:41 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-02-23 20:13:18 -0500 |
commit | 21af70fbfe4fe1cec48c63332a83e9ce018bc330 (patch) | |
tree | fbf4f181cac963305c1e991381d1309bbacd4ff2 /drivers/net/ethernet | |
parent | 9df42d1a8fd8ac137671e3e6c0c87ca2101d90e0 (diff) |
i40e/i40evf: Remove unused variable an_enable and function update_link_info
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 33 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_prototype.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_type.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 |
6 files changed, 6 insertions, 38 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 11a9ffebf8d8..8dbf7dd984ca 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c | |||
@@ -1297,14 +1297,14 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures, | |||
1297 | *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; | 1297 | *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; |
1298 | } | 1298 | } |
1299 | /* Update the link info */ | 1299 | /* Update the link info */ |
1300 | status = i40e_update_link_info(hw, true); | 1300 | status = i40e_aq_get_link_info(hw, true, NULL, NULL); |
1301 | if (status) { | 1301 | if (status) { |
1302 | /* Wait a little bit (on 40G cards it sometimes takes a really | 1302 | /* Wait a little bit (on 40G cards it sometimes takes a really |
1303 | * long time for link to come back from the atomic reset) | 1303 | * long time for link to come back from the atomic reset) |
1304 | * and try once more | 1304 | * and try once more |
1305 | */ | 1305 | */ |
1306 | msleep(1000); | 1306 | msleep(1000); |
1307 | status = i40e_update_link_info(hw, true); | 1307 | status = i40e_aq_get_link_info(hw, true, NULL, NULL); |
1308 | } | 1308 | } |
1309 | if (status) | 1309 | if (status) |
1310 | *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; | 1310 | *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; |
@@ -1452,35 +1452,6 @@ aq_get_link_info_exit: | |||
1452 | } | 1452 | } |
1453 | 1453 | ||
1454 | /** | 1454 | /** |
1455 | * i40e_update_link_info | ||
1456 | * @hw: pointer to the hw struct | ||
1457 | * @enable_lse: enable/disable LinkStatusEvent reporting | ||
1458 | * | ||
1459 | * Returns the link status of the adapter | ||
1460 | **/ | ||
1461 | i40e_status i40e_update_link_info(struct i40e_hw *hw, bool enable_lse) | ||
1462 | { | ||
1463 | struct i40e_aq_get_phy_abilities_resp abilities; | ||
1464 | i40e_status status; | ||
1465 | |||
1466 | status = i40e_aq_get_link_info(hw, enable_lse, NULL, NULL); | ||
1467 | if (status) | ||
1468 | return status; | ||
1469 | |||
1470 | status = i40e_aq_get_phy_capabilities(hw, false, false, | ||
1471 | &abilities, NULL); | ||
1472 | if (status) | ||
1473 | return status; | ||
1474 | |||
1475 | if (abilities.abilities & I40E_AQ_PHY_AN_ENABLED) | ||
1476 | hw->phy.link_info.an_enabled = true; | ||
1477 | else | ||
1478 | hw->phy.link_info.an_enabled = false; | ||
1479 | |||
1480 | return status; | ||
1481 | } | ||
1482 | |||
1483 | /** | ||
1484 | * i40e_aq_set_phy_int_mask | 1455 | * i40e_aq_set_phy_int_mask |
1485 | * @hw: pointer to the hw struct | 1456 | * @hw: pointer to the hw struct |
1486 | * @mask: interrupt mask to be set | 1457 | * @mask: interrupt mask to be set |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index cd5083e91566..8e69caf01efe 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c | |||
@@ -620,7 +620,7 @@ static int i40e_set_settings(struct net_device *netdev, | |||
620 | return -EAGAIN; | 620 | return -EAGAIN; |
621 | } | 621 | } |
622 | 622 | ||
623 | status = i40e_update_link_info(hw, true); | 623 | status = i40e_aq_get_link_info(hw, true, NULL, NULL); |
624 | if (status) | 624 | if (status) |
625 | netdev_info(netdev, "Updating link info failed with error %d\n", | 625 | netdev_info(netdev, "Updating link info failed with error %d\n", |
626 | status); | 626 | status); |
@@ -766,7 +766,7 @@ static int i40e_set_pauseparam(struct net_device *netdev, | |||
766 | err = -EAGAIN; | 766 | err = -EAGAIN; |
767 | } | 767 | } |
768 | if (aq_failures & I40E_SET_FC_AQ_FAIL_UPDATE) { | 768 | if (aq_failures & I40E_SET_FC_AQ_FAIL_UPDATE) { |
769 | netdev_info(netdev, "Set fc failed on the update_link_info call with error %d and status %d\n", | 769 | netdev_info(netdev, "Set fc failed on the get_link_info call with error %d and status %d\n", |
770 | status, hw->aq.asq_last_status); | 770 | status, hw->aq.asq_last_status); |
771 | err = -EAGAIN; | 771 | err = -EAGAIN; |
772 | } | 772 | } |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 652cb4eef371..163cf2e14318 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -8885,7 +8885,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit) | |||
8885 | i40e_config_rss(pf); | 8885 | i40e_config_rss(pf); |
8886 | 8886 | ||
8887 | /* fill in link information and enable LSE reporting */ | 8887 | /* fill in link information and enable LSE reporting */ |
8888 | i40e_update_link_info(&pf->hw, true); | 8888 | i40e_aq_get_link_info(&pf->hw, true, NULL, NULL); |
8889 | i40e_link_event(pf); | 8889 | i40e_link_event(pf); |
8890 | 8890 | ||
8891 | /* Initialize user-specific link properties */ | 8891 | /* Initialize user-specific link properties */ |
@@ -8893,7 +8893,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit) | |||
8893 | I40E_AQ_AN_COMPLETED) ? true : false); | 8893 | I40E_AQ_AN_COMPLETED) ? true : false); |
8894 | 8894 | ||
8895 | /* fill in link information and enable LSE reporting */ | 8895 | /* fill in link information and enable LSE reporting */ |
8896 | i40e_update_link_info(&pf->hw, true); | 8896 | i40e_aq_get_link_info(&pf->hw, true, NULL, NULL); |
8897 | i40e_link_event(pf); | 8897 | i40e_link_event(pf); |
8898 | 8898 | ||
8899 | /* Initialize user-specific link properties */ | 8899 | /* Initialize user-specific link properties */ |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h index de80cb2785a5..1247a45603a8 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h +++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h | |||
@@ -97,7 +97,6 @@ i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw, | |||
97 | i40e_status i40e_aq_get_link_info(struct i40e_hw *hw, | 97 | i40e_status i40e_aq_get_link_info(struct i40e_hw *hw, |
98 | bool enable_lse, struct i40e_link_status *link, | 98 | bool enable_lse, struct i40e_link_status *link, |
99 | struct i40e_asq_cmd_details *cmd_details); | 99 | struct i40e_asq_cmd_details *cmd_details); |
100 | i40e_status i40e_update_link_info(struct i40e_hw *hw, bool enable_lse); | ||
101 | i40e_status i40e_aq_set_local_advt_reg(struct i40e_hw *hw, | 100 | i40e_status i40e_aq_set_local_advt_reg(struct i40e_hw *hw, |
102 | u64 advt_reg, | 101 | u64 advt_reg, |
103 | struct i40e_asq_cmd_details *cmd_details); | 102 | struct i40e_asq_cmd_details *cmd_details); |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h index e9901ef06a63..86a927b88ef4 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_type.h +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h | |||
@@ -175,7 +175,6 @@ struct i40e_link_status { | |||
175 | u8 an_info; | 175 | u8 an_info; |
176 | u8 ext_info; | 176 | u8 ext_info; |
177 | u8 loopback; | 177 | u8 loopback; |
178 | bool an_enabled; | ||
179 | /* is Link Status Event notification to SW enabled */ | 178 | /* is Link Status Event notification to SW enabled */ |
180 | bool lse_enable; | 179 | bool lse_enable; |
181 | u16 max_frame_size; | 180 | u16 max_frame_size; |
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h index 3d0fdaab5cc8..c8cd8afdbf8f 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_type.h +++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h | |||
@@ -175,7 +175,6 @@ struct i40e_link_status { | |||
175 | u8 an_info; | 175 | u8 an_info; |
176 | u8 ext_info; | 176 | u8 ext_info; |
177 | u8 loopback; | 177 | u8 loopback; |
178 | bool an_enabled; | ||
179 | /* is Link Status Event notification to SW enabled */ | 178 | /* is Link Status Event notification to SW enabled */ |
180 | bool lse_enable; | 179 | bool lse_enable; |
181 | u16 max_frame_size; | 180 | u16 max_frame_size; |