aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/82571.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/82571.c')
-rw-r--r--drivers/net/e1000e/82571.c68
1 files changed, 38 insertions, 30 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
index 02d67d047d9..3c95acb3a87 100644
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -267,8 +267,14 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
267 } 267 }
268 268
269 switch (hw->mac.type) { 269 switch (hw->mac.type) {
270 case e1000_82573:
271 func->set_lan_id = e1000_set_lan_id_single_port;
272 func->check_mng_mode = e1000e_check_mng_mode_generic;
273 func->led_on = e1000e_led_on_generic;
274 break;
270 case e1000_82574: 275 case e1000_82574:
271 case e1000_82583: 276 case e1000_82583:
277 func->set_lan_id = e1000_set_lan_id_single_port;
272 func->check_mng_mode = e1000_check_mng_mode_82574; 278 func->check_mng_mode = e1000_check_mng_mode_82574;
273 func->led_on = e1000_led_on_82574; 279 func->led_on = e1000_led_on_82574;
274 break; 280 break;
@@ -922,9 +928,12 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
922 ew32(IMC, 0xffffffff); 928 ew32(IMC, 0xffffffff);
923 icr = er32(ICR); 929 icr = er32(ICR);
924 930
925 if (hw->mac.type == e1000_82571 && 931 /* Install any alternate MAC address into RAR0 */
926 hw->dev_spec.e82571.alt_mac_addr_is_present) 932 ret_val = e1000_check_alt_mac_addr_generic(hw);
927 e1000e_set_laa_state_82571(hw, true); 933 if (ret_val)
934 return ret_val;
935
936 e1000e_set_laa_state_82571(hw, true);
928 937
929 /* Reinitialize the 82571 serdes link state machine */ 938 /* Reinitialize the 82571 serdes link state machine */
930 if (hw->phy.media_type == e1000_media_type_internal_serdes) 939 if (hw->phy.media_type == e1000_media_type_internal_serdes)
@@ -1225,32 +1234,6 @@ static s32 e1000_led_on_82574(struct e1000_hw *hw)
1225} 1234}
1226 1235
1227/** 1236/**
1228 * e1000_update_mc_addr_list_82571 - Update Multicast addresses
1229 * @hw: pointer to the HW structure
1230 * @mc_addr_list: array of multicast addresses to program
1231 * @mc_addr_count: number of multicast addresses to program
1232 * @rar_used_count: the first RAR register free to program
1233 * @rar_count: total number of supported Receive Address Registers
1234 *
1235 * Updates the Receive Address Registers and Multicast Table Array.
1236 * The caller must have a packed mc_addr_list of multicast addresses.
1237 * The parameter rar_count will usually be hw->mac.rar_entry_count
1238 * unless there are workarounds that change this.
1239 **/
1240static void e1000_update_mc_addr_list_82571(struct e1000_hw *hw,
1241 u8 *mc_addr_list,
1242 u32 mc_addr_count,
1243 u32 rar_used_count,
1244 u32 rar_count)
1245{
1246 if (e1000e_get_laa_state_82571(hw))
1247 rar_count--;
1248
1249 e1000e_update_mc_addr_list_generic(hw, mc_addr_list, mc_addr_count,
1250 rar_used_count, rar_count);
1251}
1252
1253/**
1254 * e1000_setup_link_82571 - Setup flow control and link settings 1237 * e1000_setup_link_82571 - Setup flow control and link settings
1255 * @hw: pointer to the HW structure 1238 * @hw: pointer to the HW structure
1256 * 1239 *
@@ -1621,6 +1604,29 @@ static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw)
1621} 1604}
1622 1605
1623/** 1606/**
1607 * e1000_read_mac_addr_82571 - Read device MAC address
1608 * @hw: pointer to the HW structure
1609 **/
1610static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw)
1611{
1612 s32 ret_val = 0;
1613
1614 /*
1615 * If there's an alternate MAC address place it in RAR0
1616 * so that it will override the Si installed default perm
1617 * address.
1618 */
1619 ret_val = e1000_check_alt_mac_addr_generic(hw);
1620 if (ret_val)
1621 goto out;
1622
1623 ret_val = e1000_read_mac_addr_generic(hw);
1624
1625out:
1626 return ret_val;
1627}
1628
1629/**
1624 * e1000_power_down_phy_copper_82571 - Remove link during PHY power down 1630 * e1000_power_down_phy_copper_82571 - Remove link during PHY power down
1625 * @hw: pointer to the HW structure 1631 * @hw: pointer to the HW structure
1626 * 1632 *
@@ -1695,10 +1701,11 @@ static struct e1000_mac_operations e82571_mac_ops = {
1695 .cleanup_led = e1000e_cleanup_led_generic, 1701 .cleanup_led = e1000e_cleanup_led_generic,
1696 .clear_hw_cntrs = e1000_clear_hw_cntrs_82571, 1702 .clear_hw_cntrs = e1000_clear_hw_cntrs_82571,
1697 .get_bus_info = e1000e_get_bus_info_pcie, 1703 .get_bus_info = e1000e_get_bus_info_pcie,
1704 .set_lan_id = e1000_set_lan_id_multi_port_pcie,
1698 /* .get_link_up_info: media type dependent */ 1705 /* .get_link_up_info: media type dependent */
1699 /* .led_on: mac type dependent */ 1706 /* .led_on: mac type dependent */
1700 .led_off = e1000e_led_off_generic, 1707 .led_off = e1000e_led_off_generic,
1701 .update_mc_addr_list = e1000_update_mc_addr_list_82571, 1708 .update_mc_addr_list = e1000e_update_mc_addr_list_generic,
1702 .write_vfta = e1000_write_vfta_generic, 1709 .write_vfta = e1000_write_vfta_generic,
1703 .clear_vfta = e1000_clear_vfta_82571, 1710 .clear_vfta = e1000_clear_vfta_82571,
1704 .reset_hw = e1000_reset_hw_82571, 1711 .reset_hw = e1000_reset_hw_82571,
@@ -1706,6 +1713,7 @@ static struct e1000_mac_operations e82571_mac_ops = {
1706 .setup_link = e1000_setup_link_82571, 1713 .setup_link = e1000_setup_link_82571,
1707 /* .setup_physical_interface: media type dependent */ 1714 /* .setup_physical_interface: media type dependent */
1708 .setup_led = e1000e_setup_led_generic, 1715 .setup_led = e1000e_setup_led_generic,
1716 .read_mac_addr = e1000_read_mac_addr_82571,
1709}; 1717};
1710 1718
1711static struct e1000_phy_operations e82_phy_ops_igp = { 1719static struct e1000_phy_operations e82_phy_ops_igp = {