diff options
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/mac.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/mac.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c index 17991e63083d..59ac9f6353de 100644 --- a/drivers/net/ethernet/intel/e1000e/mac.c +++ b/drivers/net/ethernet/intel/e1000e/mac.c | |||
@@ -263,8 +263,7 @@ void e1000e_rar_set(struct e1000_hw *hw, u8 *addr, u32 index) | |||
263 | * @mc_addr: pointer to a multicast address | 263 | * @mc_addr: pointer to a multicast address |
264 | * | 264 | * |
265 | * Generates a multicast address hash value which is used to determine | 265 | * Generates a multicast address hash value which is used to determine |
266 | * the multicast filter table array address and new table value. See | 266 | * the multicast filter table array address and new table value. |
267 | * e1000_mta_set_generic() | ||
268 | **/ | 267 | **/ |
269 | static u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr) | 268 | static u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr) |
270 | { | 269 | { |
@@ -465,7 +464,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw) | |||
465 | * of MAC speed/duplex configuration. So we only need to | 464 | * of MAC speed/duplex configuration. So we only need to |
466 | * configure Collision Distance in the MAC. | 465 | * configure Collision Distance in the MAC. |
467 | */ | 466 | */ |
468 | e1000e_config_collision_dist(hw); | 467 | mac->ops.config_collision_dist(hw); |
469 | 468 | ||
470 | /* | 469 | /* |
471 | * Configure Flow Control now that Auto-Neg has completed. | 470 | * Configure Flow Control now that Auto-Neg has completed. |
@@ -693,7 +692,7 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw) | |||
693 | } | 692 | } |
694 | 693 | ||
695 | /** | 694 | /** |
696 | * e1000e_setup_link - Setup flow control and link settings | 695 | * e1000e_setup_link_generic - Setup flow control and link settings |
697 | * @hw: pointer to the HW structure | 696 | * @hw: pointer to the HW structure |
698 | * | 697 | * |
699 | * Determines which flow control settings to use, then configures flow | 698 | * Determines which flow control settings to use, then configures flow |
@@ -702,16 +701,15 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw) | |||
702 | * should be established. Assumes the hardware has previously been reset | 701 | * should be established. Assumes the hardware has previously been reset |
703 | * and the transmitter and receiver are not enabled. | 702 | * and the transmitter and receiver are not enabled. |
704 | **/ | 703 | **/ |
705 | s32 e1000e_setup_link(struct e1000_hw *hw) | 704 | s32 e1000e_setup_link_generic(struct e1000_hw *hw) |
706 | { | 705 | { |
707 | struct e1000_mac_info *mac = &hw->mac; | ||
708 | s32 ret_val; | 706 | s32 ret_val; |
709 | 707 | ||
710 | /* | 708 | /* |
711 | * In the case of the phy reset being blocked, we already have a link. | 709 | * In the case of the phy reset being blocked, we already have a link. |
712 | * We do not need to set it up again. | 710 | * We do not need to set it up again. |
713 | */ | 711 | */ |
714 | if (e1000_check_reset_block(hw)) | 712 | if (hw->phy.ops.check_reset_block(hw)) |
715 | return 0; | 713 | return 0; |
716 | 714 | ||
717 | /* | 715 | /* |
@@ -733,7 +731,7 @@ s32 e1000e_setup_link(struct e1000_hw *hw) | |||
733 | e_dbg("After fix-ups FlowControl is now = %x\n", hw->fc.current_mode); | 731 | e_dbg("After fix-ups FlowControl is now = %x\n", hw->fc.current_mode); |
734 | 732 | ||
735 | /* Call the necessary media_type subroutine to configure the link. */ | 733 | /* Call the necessary media_type subroutine to configure the link. */ |
736 | ret_val = mac->ops.setup_physical_interface(hw); | 734 | ret_val = hw->mac.ops.setup_physical_interface(hw); |
737 | if (ret_val) | 735 | if (ret_val) |
738 | return ret_val; | 736 | return ret_val; |
739 | 737 | ||
@@ -890,7 +888,7 @@ s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw) | |||
890 | /* Take the link out of reset */ | 888 | /* Take the link out of reset */ |
891 | ctrl &= ~E1000_CTRL_LRST; | 889 | ctrl &= ~E1000_CTRL_LRST; |
892 | 890 | ||
893 | e1000e_config_collision_dist(hw); | 891 | hw->mac.ops.config_collision_dist(hw); |
894 | 892 | ||
895 | ret_val = e1000_commit_fc_settings_generic(hw); | 893 | ret_val = e1000_commit_fc_settings_generic(hw); |
896 | if (ret_val) | 894 | if (ret_val) |
@@ -925,14 +923,13 @@ s32 e1000e_setup_fiber_serdes_link(struct e1000_hw *hw) | |||
925 | } | 923 | } |
926 | 924 | ||
927 | /** | 925 | /** |
928 | * e1000e_config_collision_dist - Configure collision distance | 926 | * e1000e_config_collision_dist_generic - Configure collision distance |
929 | * @hw: pointer to the HW structure | 927 | * @hw: pointer to the HW structure |
930 | * | 928 | * |
931 | * Configures the collision distance to the default value and is used | 929 | * Configures the collision distance to the default value and is used |
932 | * during link setup. Currently no func pointer exists and all | 930 | * during link setup. |
933 | * implementations are handled in the generic version of this function. | ||
934 | **/ | 931 | **/ |
935 | void e1000e_config_collision_dist(struct e1000_hw *hw) | 932 | void e1000e_config_collision_dist_generic(struct e1000_hw *hw) |
936 | { | 933 | { |
937 | u32 tctl; | 934 | u32 tctl; |
938 | 935 | ||
@@ -971,7 +968,9 @@ s32 e1000e_set_fc_watermarks(struct e1000_hw *hw) | |||
971 | * XON frames. | 968 | * XON frames. |
972 | */ | 969 | */ |
973 | fcrtl = hw->fc.low_water; | 970 | fcrtl = hw->fc.low_water; |
974 | fcrtl |= E1000_FCRTL_XONE; | 971 | if (hw->fc.send_xon) |
972 | fcrtl |= E1000_FCRTL_XONE; | ||
973 | |||
975 | fcrth = hw->fc.high_water; | 974 | fcrth = hw->fc.high_water; |
976 | } | 975 | } |
977 | ew32(FCRTL, fcrtl); | 976 | ew32(FCRTL, fcrtl); |
@@ -1399,11 +1398,11 @@ s32 e1000e_valid_led_default(struct e1000_hw *hw, u16 *data) | |||
1399 | } | 1398 | } |
1400 | 1399 | ||
1401 | /** | 1400 | /** |
1402 | * e1000e_id_led_init - | 1401 | * e1000e_id_led_init_generic - |
1403 | * @hw: pointer to the HW structure | 1402 | * @hw: pointer to the HW structure |
1404 | * | 1403 | * |
1405 | **/ | 1404 | **/ |
1406 | s32 e1000e_id_led_init(struct e1000_hw *hw) | 1405 | s32 e1000e_id_led_init_generic(struct e1000_hw *hw) |
1407 | { | 1406 | { |
1408 | struct e1000_mac_info *mac = &hw->mac; | 1407 | struct e1000_mac_info *mac = &hw->mac; |
1409 | s32 ret_val; | 1408 | s32 ret_val; |