Lines Matching refs:hw
46 static s32 e1000_init_phy_params_82543(struct e1000_hw *hw);
47 static s32 e1000_init_nvm_params_82543(struct e1000_hw *hw);
48 static s32 e1000_init_mac_params_82543(struct e1000_hw *hw);
49 static s32 e1000_read_phy_reg_82543(struct e1000_hw *hw, u32 offset,
51 static s32 e1000_write_phy_reg_82543(struct e1000_hw *hw, u32 offset,
53 static s32 e1000_phy_force_speed_duplex_82543(struct e1000_hw *hw);
54 static s32 e1000_phy_hw_reset_82543(struct e1000_hw *hw);
55 static s32 e1000_reset_hw_82543(struct e1000_hw *hw);
56 static s32 e1000_init_hw_82543(struct e1000_hw *hw);
57 static s32 e1000_setup_link_82543(struct e1000_hw *hw);
58 static s32 e1000_setup_copper_link_82543(struct e1000_hw *hw);
59 static s32 e1000_setup_fiber_link_82543(struct e1000_hw *hw);
60 static s32 e1000_check_for_copper_link_82543(struct e1000_hw *hw);
61 static s32 e1000_check_for_fiber_link_82543(struct e1000_hw *hw);
62 static s32 e1000_led_on_82543(struct e1000_hw *hw);
63 static s32 e1000_led_off_82543(struct e1000_hw *hw);
64 static void e1000_write_vfta_82543(struct e1000_hw *hw, u32 offset,
66 static void e1000_clear_hw_cntrs_82543(struct e1000_hw *hw);
67 static s32 e1000_config_mac_to_phy_82543(struct e1000_hw *hw);
68 static bool e1000_init_phy_disabled_82543(struct e1000_hw *hw);
69 static void e1000_lower_mdi_clk_82543(struct e1000_hw *hw, u32 *ctrl);
70 static s32 e1000_polarity_reversal_workaround_82543(struct e1000_hw *hw);
71 static void e1000_raise_mdi_clk_82543(struct e1000_hw *hw, u32 *ctrl);
72 static u16 e1000_shift_in_mdi_bits_82543(struct e1000_hw *hw);
73 static void e1000_shift_out_mdi_bits_82543(struct e1000_hw *hw, u32 data,
75 static bool e1000_tbi_compatibility_enabled_82543(struct e1000_hw *hw);
76 static void e1000_set_tbi_sbp_82543(struct e1000_hw *hw, bool state);
77 static s32 e1000_read_mac_addr_82543(struct e1000_hw *hw);
84 static s32 e1000_init_phy_params_82543(struct e1000_hw *hw) in e1000_init_phy_params_82543() argument
86 struct e1000_phy_info *phy = &hw->phy; in e1000_init_phy_params_82543()
91 if (hw->phy.media_type != e1000_media_type_copper) { in e1000_init_phy_params_82543()
110 phy->ops.read_reg = (hw->mac.type == e1000_82543) in e1000_init_phy_params_82543()
113 phy->ops.reset = (hw->mac.type == e1000_82543) in e1000_init_phy_params_82543()
116 phy->ops.write_reg = (hw->mac.type == e1000_82543) in e1000_init_phy_params_82543()
126 if (!e1000_init_phy_disabled_82543(hw)) { in e1000_init_phy_params_82543()
127 ret_val = phy->ops.reset(hw); in e1000_init_phy_params_82543()
135 ret_val = e1000_get_phy_id(hw); in e1000_init_phy_params_82543()
140 switch (hw->mac.type) { in e1000_init_phy_params_82543()
167 static s32 e1000_init_nvm_params_82543(struct e1000_hw *hw) in e1000_init_nvm_params_82543() argument
169 struct e1000_nvm_info *nvm = &hw->nvm; in e1000_init_nvm_params_82543()
193 static s32 e1000_init_mac_params_82543(struct e1000_hw *hw) in e1000_init_mac_params_82543() argument
195 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_params_82543()
200 switch (hw->device_id) { in e1000_init_mac_params_82543()
203 hw->phy.media_type = e1000_media_type_fiber; in e1000_init_mac_params_82543()
206 hw->phy.media_type = e1000_media_type_copper; in e1000_init_mac_params_82543()
229 (hw->phy.media_type == e1000_media_type_copper) in e1000_init_mac_params_82543()
233 (hw->phy.media_type == e1000_media_type_copper) in e1000_init_mac_params_82543()
238 (hw->phy.media_type == e1000_media_type_copper) in e1000_init_mac_params_82543()
256 if ((hw->mac.type != e1000_82543) || in e1000_init_mac_params_82543()
257 (hw->phy.media_type == e1000_media_type_fiber)) in e1000_init_mac_params_82543()
258 e1000_set_tbi_compatibility_82543(hw, false); in e1000_init_mac_params_82543()
269 void e1000_init_function_pointers_82543(struct e1000_hw *hw) in e1000_init_function_pointers_82543() argument
273 hw->mac.ops.init_params = e1000_init_mac_params_82543; in e1000_init_function_pointers_82543()
274 hw->nvm.ops.init_params = e1000_init_nvm_params_82543; in e1000_init_function_pointers_82543()
275 hw->phy.ops.init_params = e1000_init_phy_params_82543; in e1000_init_function_pointers_82543()
285 static bool e1000_tbi_compatibility_enabled_82543(struct e1000_hw *hw) in e1000_tbi_compatibility_enabled_82543() argument
287 struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543; in e1000_tbi_compatibility_enabled_82543()
292 if (hw->mac.type != e1000_82543) { in e1000_tbi_compatibility_enabled_82543()
310 void e1000_set_tbi_compatibility_82543(struct e1000_hw *hw, bool state) in e1000_set_tbi_compatibility_82543() argument
312 struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543; in e1000_set_tbi_compatibility_82543()
316 if (hw->mac.type != e1000_82543) { in e1000_set_tbi_compatibility_82543()
337 bool e1000_tbi_sbp_enabled_82543(struct e1000_hw *hw) in e1000_tbi_sbp_enabled_82543() argument
339 struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543; in e1000_tbi_sbp_enabled_82543()
344 if (hw->mac.type != e1000_82543) { in e1000_tbi_sbp_enabled_82543()
362 static void e1000_set_tbi_sbp_82543(struct e1000_hw *hw, bool state) in e1000_set_tbi_sbp_82543() argument
364 struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543; in e1000_set_tbi_sbp_82543()
368 if (state && e1000_tbi_compatibility_enabled_82543(hw)) in e1000_set_tbi_sbp_82543()
383 static bool e1000_init_phy_disabled_82543(struct e1000_hw *hw) in e1000_init_phy_disabled_82543() argument
385 struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543; in e1000_init_phy_disabled_82543()
390 if (hw->mac.type != e1000_82543) { in e1000_init_phy_disabled_82543()
411 void e1000_tbi_adjust_stats_82543(struct e1000_hw *hw, in e1000_tbi_adjust_stats_82543() argument
415 if (!(e1000_tbi_sbp_enabled_82543(hw))) in e1000_tbi_adjust_stats_82543()
487 static s32 e1000_read_phy_reg_82543(struct e1000_hw *hw, u32 offset, u16 *data) in e1000_read_phy_reg_82543() argument
505 e1000_shift_out_mdi_bits_82543(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); in e1000_read_phy_reg_82543()
519 mdic = (offset | (hw->phy.addr << 5) | in e1000_read_phy_reg_82543()
522 e1000_shift_out_mdi_bits_82543(hw, mdic, 14); in e1000_read_phy_reg_82543()
529 *data = e1000_shift_in_mdi_bits_82543(hw); in e1000_read_phy_reg_82543()
543 static s32 e1000_write_phy_reg_82543(struct e1000_hw *hw, u32 offset, u16 data) in e1000_write_phy_reg_82543() argument
562 e1000_shift_out_mdi_bits_82543(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); in e1000_write_phy_reg_82543()
571 mdic = ((PHY_TURNAROUND) | (offset << 2) | (hw->phy.addr << 7) | in e1000_write_phy_reg_82543()
576 e1000_shift_out_mdi_bits_82543(hw, mdic, 32); in e1000_write_phy_reg_82543()
590 static void e1000_raise_mdi_clk_82543(struct e1000_hw *hw, u32 *ctrl) in e1000_raise_mdi_clk_82543() argument
596 E1000_WRITE_REG(hw, E1000_CTRL, (*ctrl | E1000_CTRL_MDC)); in e1000_raise_mdi_clk_82543()
597 E1000_WRITE_FLUSH(hw); in e1000_raise_mdi_clk_82543()
609 static void e1000_lower_mdi_clk_82543(struct e1000_hw *hw, u32 *ctrl) in e1000_lower_mdi_clk_82543() argument
615 E1000_WRITE_REG(hw, E1000_CTRL, (*ctrl & ~E1000_CTRL_MDC)); in e1000_lower_mdi_clk_82543()
616 E1000_WRITE_FLUSH(hw); in e1000_lower_mdi_clk_82543()
630 static void e1000_shift_out_mdi_bits_82543(struct e1000_hw *hw, u32 data, in e1000_shift_out_mdi_bits_82543() argument
644 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_shift_out_mdi_bits_82543()
661 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_shift_out_mdi_bits_82543()
662 E1000_WRITE_FLUSH(hw); in e1000_shift_out_mdi_bits_82543()
666 e1000_raise_mdi_clk_82543(hw, &ctrl); in e1000_shift_out_mdi_bits_82543()
667 e1000_lower_mdi_clk_82543(hw, &ctrl); in e1000_shift_out_mdi_bits_82543()
682 static u16 e1000_shift_in_mdi_bits_82543(struct e1000_hw *hw) in e1000_shift_in_mdi_bits_82543() argument
697 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_shift_in_mdi_bits_82543()
706 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_shift_in_mdi_bits_82543()
707 E1000_WRITE_FLUSH(hw); in e1000_shift_in_mdi_bits_82543()
714 e1000_raise_mdi_clk_82543(hw, &ctrl); in e1000_shift_in_mdi_bits_82543()
715 e1000_lower_mdi_clk_82543(hw, &ctrl); in e1000_shift_in_mdi_bits_82543()
719 e1000_raise_mdi_clk_82543(hw, &ctrl); in e1000_shift_in_mdi_bits_82543()
720 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_shift_in_mdi_bits_82543()
724 e1000_lower_mdi_clk_82543(hw, &ctrl); in e1000_shift_in_mdi_bits_82543()
727 e1000_raise_mdi_clk_82543(hw, &ctrl); in e1000_shift_in_mdi_bits_82543()
728 e1000_lower_mdi_clk_82543(hw, &ctrl); in e1000_shift_in_mdi_bits_82543()
741 static s32 e1000_phy_force_speed_duplex_82543(struct e1000_hw *hw) in e1000_phy_force_speed_duplex_82543() argument
747 ret_val = e1000_phy_force_speed_duplex_m88(hw); in e1000_phy_force_speed_duplex_82543()
751 if (!hw->mac.autoneg && (hw->mac.forced_speed_duplex & in e1000_phy_force_speed_duplex_82543()
753 ret_val = e1000_polarity_reversal_workaround_82543(hw); in e1000_phy_force_speed_duplex_82543()
767 static s32 e1000_polarity_reversal_workaround_82543(struct e1000_hw *hw) in e1000_polarity_reversal_workaround_82543() argument
774 if (!(hw->phy.ops.write_reg)) in e1000_polarity_reversal_workaround_82543()
781 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); in e1000_polarity_reversal_workaround_82543()
784 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFFF); in e1000_polarity_reversal_workaround_82543()
788 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); in e1000_polarity_reversal_workaround_82543()
802 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &mii_status_reg); in e1000_polarity_reversal_workaround_82543()
806 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &mii_status_reg); in e1000_polarity_reversal_workaround_82543()
820 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); in e1000_polarity_reversal_workaround_82543()
824 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0); in e1000_polarity_reversal_workaround_82543()
828 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00); in e1000_polarity_reversal_workaround_82543()
832 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000); in e1000_polarity_reversal_workaround_82543()
836 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); in e1000_polarity_reversal_workaround_82543()
844 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_TIME, 100000, &link); in e1000_polarity_reversal_workaround_82543()
861 static s32 e1000_phy_hw_reset_82543(struct e1000_hw *hw) in e1000_phy_hw_reset_82543() argument
872 ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT); in e1000_phy_hw_reset_82543()
875 E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); in e1000_phy_hw_reset_82543()
876 E1000_WRITE_FLUSH(hw); in e1000_phy_hw_reset_82543()
882 E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); in e1000_phy_hw_reset_82543()
883 E1000_WRITE_FLUSH(hw); in e1000_phy_hw_reset_82543()
887 if (!(hw->phy.ops.get_cfg_done)) in e1000_phy_hw_reset_82543()
890 ret_val = hw->phy.ops.get_cfg_done(hw); in e1000_phy_hw_reset_82543()
901 static s32 e1000_reset_hw_82543(struct e1000_hw *hw) in e1000_reset_hw_82543() argument
909 E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); in e1000_reset_hw_82543()
911 E1000_WRITE_REG(hw, E1000_RCTL, 0); in e1000_reset_hw_82543()
912 E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP); in e1000_reset_hw_82543()
913 E1000_WRITE_FLUSH(hw); in e1000_reset_hw_82543()
915 e1000_set_tbi_sbp_82543(hw, false); in e1000_reset_hw_82543()
923 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_reset_hw_82543()
926 if (hw->mac.type == e1000_82543) { in e1000_reset_hw_82543()
927 E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST); in e1000_reset_hw_82543()
933 E1000_WRITE_REG_IO(hw, E1000_CTRL, ctrl | E1000_CTRL_RST); in e1000_reset_hw_82543()
940 hw->nvm.ops.reload(hw); in e1000_reset_hw_82543()
944 E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); in e1000_reset_hw_82543()
945 E1000_READ_REG(hw, E1000_ICR); in e1000_reset_hw_82543()
956 static s32 e1000_init_hw_82543(struct e1000_hw *hw) in e1000_init_hw_82543() argument
958 struct e1000_mac_info *mac = &hw->mac; in e1000_init_hw_82543()
959 struct e1000_dev_spec_82543 *dev_spec = &hw->dev_spec._82543; in e1000_init_hw_82543()
967 E1000_WRITE_REG(hw, E1000_VET, 0); in e1000_init_hw_82543()
968 mac->ops.clear_vfta(hw); in e1000_init_hw_82543()
971 e1000_init_rx_addrs_generic(hw, mac->rar_entry_count); in e1000_init_hw_82543()
976 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0); in e1000_init_hw_82543()
977 E1000_WRITE_FLUSH(hw); in e1000_init_hw_82543()
985 if (hw->mac.type == e1000_82543 && dev_spec->dma_fairness) { in e1000_init_hw_82543()
986 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_init_hw_82543()
987 E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_PRIOR); in e1000_init_hw_82543()
990 e1000_pcix_mmrbc_workaround_generic(hw); in e1000_init_hw_82543()
993 ret_val = mac->ops.setup_link(hw); in e1000_init_hw_82543()
1001 e1000_clear_hw_cntrs_82543(hw); in e1000_init_hw_82543()
1019 static s32 e1000_setup_link_82543(struct e1000_hw *hw) in e1000_setup_link_82543() argument
1034 if (hw->mac.type == e1000_82543) { in e1000_setup_link_82543()
1035 ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data); in e1000_setup_link_82543()
1043 E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); in e1000_setup_link_82543()
1046 ret_val = e1000_setup_link_generic(hw); in e1000_setup_link_82543()
1060 static s32 e1000_setup_copper_link_82543(struct e1000_hw *hw) in e1000_setup_copper_link_82543() argument
1068 ctrl = E1000_READ_REG(hw, E1000_CTRL) | E1000_CTRL_SLU; in e1000_setup_copper_link_82543()
1075 if (hw->mac.type == e1000_82543) { in e1000_setup_copper_link_82543()
1077 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_setup_copper_link_82543()
1078 ret_val = hw->phy.ops.reset(hw); in e1000_setup_copper_link_82543()
1083 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_setup_copper_link_82543()
1087 ret_val = e1000_copper_link_setup_m88(hw); in e1000_setup_copper_link_82543()
1091 if (hw->mac.autoneg) { in e1000_setup_copper_link_82543()
1096 ret_val = e1000_copper_link_autoneg(hw); in e1000_setup_copper_link_82543()
1105 ret_val = e1000_phy_force_speed_duplex_82543(hw); in e1000_setup_copper_link_82543()
1116 ret_val = e1000_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10, in e1000_setup_copper_link_82543()
1125 if (hw->mac.type == e1000_82544) { in e1000_setup_copper_link_82543()
1126 hw->mac.ops.config_collision_dist(hw); in e1000_setup_copper_link_82543()
1128 ret_val = e1000_config_mac_to_phy_82543(hw); in e1000_setup_copper_link_82543()
1132 ret_val = e1000_config_fc_after_link_up_generic(hw); in e1000_setup_copper_link_82543()
1148 static s32 e1000_setup_fiber_link_82543(struct e1000_hw *hw) in e1000_setup_fiber_link_82543() argument
1155 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_setup_fiber_link_82543()
1160 hw->mac.ops.config_collision_dist(hw); in e1000_setup_fiber_link_82543()
1162 ret_val = e1000_commit_fc_settings_generic(hw); in e1000_setup_fiber_link_82543()
1168 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_setup_fiber_link_82543()
1169 E1000_WRITE_FLUSH(hw); in e1000_setup_fiber_link_82543()
1177 if (!(E1000_READ_REG(hw, E1000_CTRL) & E1000_CTRL_SWDPIN1)) in e1000_setup_fiber_link_82543()
1178 ret_val = e1000_poll_fiber_serdes_link_generic(hw); in e1000_setup_fiber_link_82543()
1197 static s32 e1000_check_for_copper_link_82543(struct e1000_hw *hw) in e1000_check_for_copper_link_82543() argument
1199 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_copper_link_82543()
1212 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link); in e1000_check_for_copper_link_82543()
1221 e1000_check_downshift_generic(hw); in e1000_check_for_copper_link_82543()
1237 E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF); in e1000_check_for_copper_link_82543()
1238 ret_val = e1000_polarity_reversal_workaround_82543(hw); in e1000_check_for_copper_link_82543()
1239 icr = E1000_READ_REG(hw, E1000_ICR); in e1000_check_for_copper_link_82543()
1240 E1000_WRITE_REG(hw, E1000_ICS, (icr & ~E1000_ICS_LSC)); in e1000_check_for_copper_link_82543()
1241 E1000_WRITE_REG(hw, E1000_IMS, IMS_ENABLE_MASK); in e1000_check_for_copper_link_82543()
1258 hw->mac.ops.config_collision_dist(hw); in e1000_check_for_copper_link_82543()
1260 ret_val = e1000_config_mac_to_phy_82543(hw); in e1000_check_for_copper_link_82543()
1273 ret_val = e1000_config_fc_after_link_up_generic(hw); in e1000_check_for_copper_link_82543()
1285 if (e1000_tbi_compatibility_enabled_82543(hw)) { in e1000_check_for_copper_link_82543()
1286 ret_val = mac->ops.get_link_up_info(hw, &speed, &duplex); in e1000_check_for_copper_link_82543()
1296 if (e1000_tbi_sbp_enabled_82543(hw)) { in e1000_check_for_copper_link_82543()
1301 e1000_set_tbi_sbp_82543(hw, false); in e1000_check_for_copper_link_82543()
1302 rctl = E1000_READ_REG(hw, E1000_RCTL); in e1000_check_for_copper_link_82543()
1304 E1000_WRITE_REG(hw, E1000_RCTL, rctl); in e1000_check_for_copper_link_82543()
1314 if (!e1000_tbi_sbp_enabled_82543(hw)) { in e1000_check_for_copper_link_82543()
1315 e1000_set_tbi_sbp_82543(hw, true); in e1000_check_for_copper_link_82543()
1316 rctl = E1000_READ_REG(hw, E1000_RCTL); in e1000_check_for_copper_link_82543()
1318 E1000_WRITE_REG(hw, E1000_RCTL, rctl); in e1000_check_for_copper_link_82543()
1333 static s32 e1000_check_for_fiber_link_82543(struct e1000_hw *hw) in e1000_check_for_fiber_link_82543() argument
1335 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_fiber_link_82543()
1341 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_check_for_fiber_link_82543()
1342 status = E1000_READ_REG(hw, E1000_STATUS); in e1000_check_for_fiber_link_82543()
1343 rxcw = E1000_READ_REG(hw, E1000_RXCW); in e1000_check_for_fiber_link_82543()
1365 E1000_WRITE_REG(hw, E1000_TXCW, (mac->txcw & ~E1000_TXCW_ANE)); in e1000_check_for_fiber_link_82543()
1368 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_check_for_fiber_link_82543()
1370 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_check_for_fiber_link_82543()
1373 ret_val = e1000_config_fc_after_link_up_generic(hw); in e1000_check_for_fiber_link_82543()
1386 E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw); in e1000_check_for_fiber_link_82543()
1387 E1000_WRITE_REG(hw, E1000_CTRL, (ctrl & ~E1000_CTRL_SLU)); in e1000_check_for_fiber_link_82543()
1403 static s32 e1000_config_mac_to_phy_82543(struct e1000_hw *hw) in e1000_config_mac_to_phy_82543() argument
1411 if (!(hw->phy.ops.read_reg)) in e1000_config_mac_to_phy_82543()
1415 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_config_mac_to_phy_82543()
1423 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); in e1000_config_mac_to_phy_82543()
1431 hw->mac.ops.config_collision_dist(hw); in e1000_config_mac_to_phy_82543()
1442 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_config_mac_to_phy_82543()
1457 static void e1000_write_vfta_82543(struct e1000_hw *hw, u32 offset, u32 value) in e1000_write_vfta_82543() argument
1463 if ((hw->mac.type == e1000_82544) && (offset & 1)) { in e1000_write_vfta_82543()
1464 temp = E1000_READ_REG_ARRAY(hw, E1000_VFTA, offset - 1); in e1000_write_vfta_82543()
1465 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, value); in e1000_write_vfta_82543()
1466 E1000_WRITE_FLUSH(hw); in e1000_write_vfta_82543()
1467 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset - 1, temp); in e1000_write_vfta_82543()
1468 E1000_WRITE_FLUSH(hw); in e1000_write_vfta_82543()
1470 e1000_write_vfta_generic(hw, offset, value); in e1000_write_vfta_82543()
1480 static s32 e1000_led_on_82543(struct e1000_hw *hw) in e1000_led_on_82543() argument
1482 u32 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_led_on_82543()
1486 if (hw->mac.type == e1000_82544 && in e1000_led_on_82543()
1487 hw->phy.media_type == e1000_media_type_copper) { in e1000_led_on_82543()
1496 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_led_on_82543()
1507 static s32 e1000_led_off_82543(struct e1000_hw *hw) in e1000_led_off_82543() argument
1509 u32 ctrl = E1000_READ_REG(hw, E1000_CTRL); in e1000_led_off_82543()
1513 if (hw->mac.type == e1000_82544 && in e1000_led_off_82543()
1514 hw->phy.media_type == e1000_media_type_copper) { in e1000_led_off_82543()
1522 E1000_WRITE_REG(hw, E1000_CTRL, ctrl); in e1000_led_off_82543()
1533 static void e1000_clear_hw_cntrs_82543(struct e1000_hw *hw) in e1000_clear_hw_cntrs_82543() argument
1537 e1000_clear_hw_cntrs_base_generic(hw); in e1000_clear_hw_cntrs_82543()
1539 E1000_READ_REG(hw, E1000_PRC64); in e1000_clear_hw_cntrs_82543()
1540 E1000_READ_REG(hw, E1000_PRC127); in e1000_clear_hw_cntrs_82543()
1541 E1000_READ_REG(hw, E1000_PRC255); in e1000_clear_hw_cntrs_82543()
1542 E1000_READ_REG(hw, E1000_PRC511); in e1000_clear_hw_cntrs_82543()
1543 E1000_READ_REG(hw, E1000_PRC1023); in e1000_clear_hw_cntrs_82543()
1544 E1000_READ_REG(hw, E1000_PRC1522); in e1000_clear_hw_cntrs_82543()
1545 E1000_READ_REG(hw, E1000_PTC64); in e1000_clear_hw_cntrs_82543()
1546 E1000_READ_REG(hw, E1000_PTC127); in e1000_clear_hw_cntrs_82543()
1547 E1000_READ_REG(hw, E1000_PTC255); in e1000_clear_hw_cntrs_82543()
1548 E1000_READ_REG(hw, E1000_PTC511); in e1000_clear_hw_cntrs_82543()
1549 E1000_READ_REG(hw, E1000_PTC1023); in e1000_clear_hw_cntrs_82543()
1550 E1000_READ_REG(hw, E1000_PTC1522); in e1000_clear_hw_cntrs_82543()
1552 E1000_READ_REG(hw, E1000_ALGNERRC); in e1000_clear_hw_cntrs_82543()
1553 E1000_READ_REG(hw, E1000_RXERRC); in e1000_clear_hw_cntrs_82543()
1554 E1000_READ_REG(hw, E1000_TNCRS); in e1000_clear_hw_cntrs_82543()
1555 E1000_READ_REG(hw, E1000_CEXTERR); in e1000_clear_hw_cntrs_82543()
1556 E1000_READ_REG(hw, E1000_TSCTC); in e1000_clear_hw_cntrs_82543()
1557 E1000_READ_REG(hw, E1000_TSCTFC); in e1000_clear_hw_cntrs_82543()
1569 s32 e1000_read_mac_addr_82543(struct e1000_hw *hw) in e1000_read_mac_addr_82543() argument
1578 ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data); in e1000_read_mac_addr_82543()
1583 hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF); in e1000_read_mac_addr_82543()
1584 hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8); in e1000_read_mac_addr_82543()
1588 if (hw->bus.func == E1000_FUNC_1) in e1000_read_mac_addr_82543()
1589 hw->mac.perm_addr[5] ^= 1; in e1000_read_mac_addr_82543()
1592 hw->mac.addr[i] = hw->mac.perm_addr[i]; in e1000_read_mac_addr_82543()