Lines Matching refs:hw
30 static s32 igb_phy_setup_autoneg(struct e1000_hw *hw);
31 static void igb_phy_force_speed_duplex_setup(struct e1000_hw *hw,
33 static s32 igb_wait_autoneg(struct e1000_hw *hw);
34 static s32 igb_set_master_slave_mode(struct e1000_hw *hw);
58 s32 igb_check_reset_block(struct e1000_hw *hw) in igb_check_reset_block() argument
74 s32 igb_get_phy_id(struct e1000_hw *hw) in igb_get_phy_id() argument
76 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_id()
80 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igb_get_phy_id()
86 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igb_get_phy_id()
103 static s32 igb_phy_reset_dsp(struct e1000_hw *hw) in igb_phy_reset_dsp() argument
107 if (!(hw->phy.ops.write_reg)) in igb_phy_reset_dsp()
110 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xC1); in igb_phy_reset_dsp()
114 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0); in igb_phy_reset_dsp()
129 s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_mdic() argument
131 struct e1000_phy_info *phy = &hw->phy; in igb_read_phy_reg_mdic()
185 s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_mdic() argument
187 struct e1000_phy_info *phy = &hw->phy; in igb_write_phy_reg_mdic()
242 s32 igb_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_i2c() argument
244 struct e1000_phy_info *phy = &hw->phy; in igb_read_phy_reg_i2c()
287 s32 igb_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_i2c() argument
289 struct e1000_phy_info *phy = &hw->phy; in igb_write_phy_reg_i2c()
294 if ((hw->phy.addr == 0) || (hw->phy.addr > 7)) { in igb_write_phy_reg_i2c()
296 hw->phy.addr); in igb_write_phy_reg_i2c()
346 s32 igb_read_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 *data) in igb_read_sfp_data_byte() argument
396 s32 igb_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_igp() argument
400 if (!(hw->phy.ops.acquire)) in igb_read_phy_reg_igp()
403 ret_val = hw->phy.ops.acquire(hw); in igb_read_phy_reg_igp()
408 ret_val = igb_write_phy_reg_mdic(hw, in igb_read_phy_reg_igp()
412 hw->phy.ops.release(hw); in igb_read_phy_reg_igp()
417 ret_val = igb_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, in igb_read_phy_reg_igp()
420 hw->phy.ops.release(hw); in igb_read_phy_reg_igp()
435 s32 igb_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_igp() argument
439 if (!(hw->phy.ops.acquire)) in igb_write_phy_reg_igp()
442 ret_val = hw->phy.ops.acquire(hw); in igb_write_phy_reg_igp()
447 ret_val = igb_write_phy_reg_mdic(hw, in igb_write_phy_reg_igp()
451 hw->phy.ops.release(hw); in igb_write_phy_reg_igp()
456 ret_val = igb_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, in igb_write_phy_reg_igp()
459 hw->phy.ops.release(hw); in igb_write_phy_reg_igp()
471 s32 igb_copper_link_setup_82580(struct e1000_hw *hw) in igb_copper_link_setup_82580() argument
473 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_82580()
483 ret_val = hw->phy.ops.reset(hw); in igb_copper_link_setup_82580()
491 ret_val = phy->ops.read_reg(hw, I82580_CFG_REG, &phy_data); in igb_copper_link_setup_82580()
500 ret_val = phy->ops.write_reg(hw, I82580_CFG_REG, phy_data); in igb_copper_link_setup_82580()
505 ret_val = phy->ops.read_reg(hw, I82580_PHY_CTRL_2, &phy_data); in igb_copper_link_setup_82580()
514 switch (hw->phy.mdix) { in igb_copper_link_setup_82580()
525 ret_val = hw->phy.ops.write_reg(hw, I82580_PHY_CTRL_2, phy_data); in igb_copper_link_setup_82580()
538 s32 igb_copper_link_setup_m88(struct e1000_hw *hw) in igb_copper_link_setup_m88() argument
540 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_m88()
550 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_copper_link_setup_m88()
591 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_copper_link_setup_m88()
599 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, in igb_copper_link_setup_m88()
618 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, in igb_copper_link_setup_m88()
625 ret_val = igb_phy_sw_reset(hw); in igb_copper_link_setup_m88()
642 s32 igb_copper_link_setup_m88_gen2(struct e1000_hw *hw) in igb_copper_link_setup_m88_gen2() argument
644 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_m88_gen2()
652 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_copper_link_setup_m88_gen2()
698 phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_copper_link_setup_m88_gen2()
702 ret_val = igb_phy_sw_reset(hw); in igb_copper_link_setup_m88_gen2()
713 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_copper_link_setup_m88_gen2()
718 ret_val = igb_phy_sw_reset(hw); in igb_copper_link_setup_m88_gen2()
723 ret_val = igb_set_master_slave_mode(hw); in igb_copper_link_setup_m88_gen2()
737 s32 igb_copper_link_setup_igp(struct e1000_hw *hw) in igb_copper_link_setup_igp() argument
739 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_igp()
748 ret_val = phy->ops.reset(hw); in igb_copper_link_setup_igp()
765 ret_val = phy->ops.set_d3_lplu_state(hw, false); in igb_copper_link_setup_igp()
773 ret_val = phy->ops.set_d0_lplu_state(hw, false); in igb_copper_link_setup_igp()
779 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &data); in igb_copper_link_setup_igp()
797 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, data); in igb_copper_link_setup_igp()
802 if (hw->mac.autoneg) { in igb_copper_link_setup_igp()
809 ret_val = phy->ops.read_reg(hw, in igb_copper_link_setup_igp()
816 ret_val = phy->ops.write_reg(hw, in igb_copper_link_setup_igp()
823 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data); in igb_copper_link_setup_igp()
828 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data); in igb_copper_link_setup_igp()
833 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data); in igb_copper_link_setup_igp()
857 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data); in igb_copper_link_setup_igp()
875 static s32 igb_copper_link_autoneg(struct e1000_hw *hw) in igb_copper_link_autoneg() argument
877 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_autoneg()
893 ret_val = igb_phy_setup_autoneg(hw); in igb_copper_link_autoneg()
903 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igb_copper_link_autoneg()
908 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igb_copper_link_autoneg()
916 ret_val = igb_wait_autoneg(hw); in igb_copper_link_autoneg()
923 hw->mac.get_link_status = true; in igb_copper_link_autoneg()
938 static s32 igb_phy_setup_autoneg(struct e1000_hw *hw) in igb_phy_setup_autoneg() argument
940 struct e1000_phy_info *phy = &hw->phy; in igb_phy_setup_autoneg()
948 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); in igb_phy_setup_autoneg()
954 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, in igb_phy_setup_autoneg()
1030 switch (hw->fc.current_mode) { in igb_phy_setup_autoneg()
1068 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); in igb_phy_setup_autoneg()
1075 ret_val = phy->ops.write_reg(hw, in igb_phy_setup_autoneg()
1095 s32 igb_setup_copper_link(struct e1000_hw *hw) in igb_setup_copper_link() argument
1100 if (hw->mac.autoneg) { in igb_setup_copper_link()
1104 ret_val = igb_copper_link_autoneg(hw); in igb_setup_copper_link()
1112 ret_val = hw->phy.ops.force_speed_duplex(hw); in igb_setup_copper_link()
1122 ret_val = igb_phy_has_link(hw, COPPER_LINK_UP_LIMIT, 10, &link); in igb_setup_copper_link()
1128 igb_config_collision_dist(hw); in igb_setup_copper_link()
1129 ret_val = igb_config_fc_after_link_up(hw); in igb_setup_copper_link()
1146 s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw) in igb_phy_force_speed_duplex_igp() argument
1148 struct e1000_phy_info *phy = &hw->phy; in igb_phy_force_speed_duplex_igp()
1153 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); in igb_phy_force_speed_duplex_igp()
1157 igb_phy_force_speed_duplex_setup(hw, &phy_data); in igb_phy_force_speed_duplex_igp()
1159 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); in igb_phy_force_speed_duplex_igp()
1166 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data); in igb_phy_force_speed_duplex_igp()
1173 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data); in igb_phy_force_speed_duplex_igp()
1184 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 10000, &link); in igb_phy_force_speed_duplex_igp()
1192 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 10000, &link); in igb_phy_force_speed_duplex_igp()
1211 s32 igb_phy_force_speed_duplex_m88(struct e1000_hw *hw) in igb_phy_force_speed_duplex_m88() argument
1213 struct e1000_phy_info *phy = &hw->phy; in igb_phy_force_speed_duplex_m88()
1223 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, in igb_phy_force_speed_duplex_m88()
1229 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, in igb_phy_force_speed_duplex_m88()
1237 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); in igb_phy_force_speed_duplex_m88()
1241 igb_phy_force_speed_duplex_setup(hw, &phy_data); in igb_phy_force_speed_duplex_m88()
1243 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); in igb_phy_force_speed_duplex_m88()
1248 ret_val = igb_phy_sw_reset(hw); in igb_phy_force_speed_duplex_m88()
1255 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link); in igb_phy_force_speed_duplex_m88()
1262 switch (hw->phy.id) { in igb_phy_force_speed_duplex_m88()
1271 if (hw->phy.type != e1000_phy_m88) in igb_phy_force_speed_duplex_m88()
1281 ret_val = phy->ops.write_reg(hw, in igb_phy_force_speed_duplex_m88()
1286 ret_val = igb_phy_reset_dsp(hw); in igb_phy_force_speed_duplex_m88()
1293 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, in igb_phy_force_speed_duplex_m88()
1299 if (hw->phy.type != e1000_phy_m88 || in igb_phy_force_speed_duplex_m88()
1300 hw->phy.id == I347AT4_E_PHY_ID || in igb_phy_force_speed_duplex_m88()
1301 hw->phy.id == M88E1112_E_PHY_ID || in igb_phy_force_speed_duplex_m88()
1302 hw->phy.id == M88E1543_E_PHY_ID || in igb_phy_force_speed_duplex_m88()
1303 hw->phy.id == M88E1512_E_PHY_ID || in igb_phy_force_speed_duplex_m88()
1304 hw->phy.id == I210_I_PHY_ID) in igb_phy_force_speed_duplex_m88()
1307 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data); in igb_phy_force_speed_duplex_m88()
1316 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data); in igb_phy_force_speed_duplex_m88()
1323 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_phy_force_speed_duplex_m88()
1328 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_phy_force_speed_duplex_m88()
1346 static void igb_phy_force_speed_duplex_setup(struct e1000_hw *hw, in igb_phy_force_speed_duplex_setup() argument
1349 struct e1000_mac_info *mac = &hw->mac; in igb_phy_force_speed_duplex_setup()
1353 hw->fc.current_mode = e1000_fc_none; in igb_phy_force_speed_duplex_setup()
1390 igb_config_collision_dist(hw); in igb_phy_force_speed_duplex_setup()
1409 s32 igb_set_d3_lplu_state(struct e1000_hw *hw, bool active) in igb_set_d3_lplu_state() argument
1411 struct e1000_phy_info *phy = &hw->phy; in igb_set_d3_lplu_state()
1415 if (!(hw->phy.ops.read_reg)) in igb_set_d3_lplu_state()
1418 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data); in igb_set_d3_lplu_state()
1424 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, in igb_set_d3_lplu_state()
1434 ret_val = phy->ops.read_reg(hw, in igb_set_d3_lplu_state()
1441 ret_val = phy->ops.write_reg(hw, in igb_set_d3_lplu_state()
1447 ret_val = phy->ops.read_reg(hw, in igb_set_d3_lplu_state()
1454 ret_val = phy->ops.write_reg(hw, in igb_set_d3_lplu_state()
1464 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, in igb_set_d3_lplu_state()
1470 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG, in igb_set_d3_lplu_state()
1476 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG, in igb_set_d3_lplu_state()
1492 s32 igb_check_downshift(struct e1000_hw *hw) in igb_check_downshift() argument
1494 struct e1000_phy_info *phy = &hw->phy; in igb_check_downshift()
1518 ret_val = phy->ops.read_reg(hw, offset, &phy_data); in igb_check_downshift()
1535 s32 igb_check_polarity_m88(struct e1000_hw *hw) in igb_check_polarity_m88() argument
1537 struct e1000_phy_info *phy = &hw->phy; in igb_check_polarity_m88()
1541 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &data); in igb_check_polarity_m88()
1560 static s32 igb_check_polarity_igp(struct e1000_hw *hw) in igb_check_polarity_igp() argument
1562 struct e1000_phy_info *phy = &hw->phy; in igb_check_polarity_igp()
1569 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data); in igb_check_polarity_igp()
1585 ret_val = phy->ops.read_reg(hw, offset, &data); in igb_check_polarity_igp()
1603 static s32 igb_wait_autoneg(struct e1000_hw *hw) in igb_wait_autoneg() argument
1610 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_wait_autoneg()
1613 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_wait_autoneg()
1636 s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations, in igb_phy_has_link() argument
1647 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_phy_has_link()
1658 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_phy_has_link()
1689 s32 igb_get_cable_length_m88(struct e1000_hw *hw) in igb_get_cable_length_m88() argument
1691 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_m88()
1695 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); in igb_get_cable_length_m88()
1715 s32 igb_get_cable_length_m88_gen2(struct e1000_hw *hw) in igb_get_cable_length_m88_gen2() argument
1717 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_m88_gen2()
1721 switch (hw->phy.id) { in igb_get_cable_length_m88_gen2()
1724 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) + in igb_get_cable_length_m88_gen2()
1731 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) + in igb_get_cable_length_m88_gen2()
1747 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1752 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x07); in igb_get_cable_length_m88_gen2()
1757 ret_val = phy->ops.read_reg(hw, (I347AT4_PCDL + phy->addr), in igb_get_cable_length_m88_gen2()
1763 ret_val = phy->ops.read_reg(hw, I347AT4_PCDC, &phy_data2); in igb_get_cable_length_m88_gen2()
1775 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1782 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1787 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x05); in igb_get_cable_length_m88_gen2()
1791 ret_val = phy->ops.read_reg(hw, M88E1112_VCT_DSP_DISTANCE, in igb_get_cable_length_m88_gen2()
1810 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1836 s32 igb_get_cable_length_igp_2(struct e1000_hw *hw) in igb_get_cable_length_igp_2() argument
1838 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_igp_2()
1852 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &phy_data); in igb_get_cable_length_igp_2()
1907 s32 igb_get_phy_info_m88(struct e1000_hw *hw) in igb_get_phy_info_m88() argument
1909 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_info_m88()
1920 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_get_phy_info_m88()
1930 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_get_phy_info_m88()
1937 ret_val = igb_check_polarity_m88(hw); in igb_get_phy_info_m88()
1941 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); in igb_get_phy_info_m88()
1948 ret_val = phy->ops.get_cable_length(hw); in igb_get_phy_info_m88()
1952 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data); in igb_get_phy_info_m88()
1983 s32 igb_get_phy_info_igp(struct e1000_hw *hw) in igb_get_phy_info_igp() argument
1985 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_info_igp()
1990 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_get_phy_info_igp()
2002 ret_val = igb_check_polarity_igp(hw); in igb_get_phy_info_igp()
2006 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data); in igb_get_phy_info_igp()
2014 ret_val = phy->ops.get_cable_length(hw); in igb_get_phy_info_igp()
2018 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data); in igb_get_phy_info_igp()
2046 s32 igb_phy_sw_reset(struct e1000_hw *hw) in igb_phy_sw_reset() argument
2051 if (!(hw->phy.ops.read_reg)) in igb_phy_sw_reset()
2054 ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igb_phy_sw_reset()
2059 ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igb_phy_sw_reset()
2078 s32 igb_phy_hw_reset(struct e1000_hw *hw) in igb_phy_hw_reset() argument
2080 struct e1000_phy_info *phy = &hw->phy; in igb_phy_hw_reset()
2084 ret_val = igb_check_reset_block(hw); in igb_phy_hw_reset()
2090 ret_val = phy->ops.acquire(hw); in igb_phy_hw_reset()
2105 phy->ops.release(hw); in igb_phy_hw_reset()
2107 ret_val = phy->ops.get_cfg_done(hw); in igb_phy_hw_reset()
2119 s32 igb_phy_init_script_igp3(struct e1000_hw *hw) in igb_phy_init_script_igp3() argument
2125 hw->phy.ops.write_reg(hw, 0x2F5B, 0x9018); in igb_phy_init_script_igp3()
2127 hw->phy.ops.write_reg(hw, 0x2F52, 0x0000); in igb_phy_init_script_igp3()
2129 hw->phy.ops.write_reg(hw, 0x2FB1, 0x8B24); in igb_phy_init_script_igp3()
2131 hw->phy.ops.write_reg(hw, 0x2FB2, 0xF8F0); in igb_phy_init_script_igp3()
2133 hw->phy.ops.write_reg(hw, 0x2010, 0x10B0); in igb_phy_init_script_igp3()
2135 hw->phy.ops.write_reg(hw, 0x2011, 0x0000); in igb_phy_init_script_igp3()
2137 hw->phy.ops.write_reg(hw, 0x20DD, 0x249A); in igb_phy_init_script_igp3()
2139 hw->phy.ops.write_reg(hw, 0x20DE, 0x00D3); in igb_phy_init_script_igp3()
2141 hw->phy.ops.write_reg(hw, 0x28B4, 0x04CE); in igb_phy_init_script_igp3()
2143 hw->phy.ops.write_reg(hw, 0x2F70, 0x29E4); in igb_phy_init_script_igp3()
2145 hw->phy.ops.write_reg(hw, 0x0000, 0x0140); in igb_phy_init_script_igp3()
2147 hw->phy.ops.write_reg(hw, 0x1F30, 0x1606); in igb_phy_init_script_igp3()
2149 hw->phy.ops.write_reg(hw, 0x1F31, 0xB814); in igb_phy_init_script_igp3()
2151 hw->phy.ops.write_reg(hw, 0x1F35, 0x002A); in igb_phy_init_script_igp3()
2153 hw->phy.ops.write_reg(hw, 0x1F3E, 0x0067); in igb_phy_init_script_igp3()
2155 hw->phy.ops.write_reg(hw, 0x1F54, 0x0065); in igb_phy_init_script_igp3()
2157 hw->phy.ops.write_reg(hw, 0x1F55, 0x002A); in igb_phy_init_script_igp3()
2159 hw->phy.ops.write_reg(hw, 0x1F56, 0x002A); in igb_phy_init_script_igp3()
2161 hw->phy.ops.write_reg(hw, 0x1F72, 0x3FB0); in igb_phy_init_script_igp3()
2163 hw->phy.ops.write_reg(hw, 0x1F76, 0xC0FF); in igb_phy_init_script_igp3()
2165 hw->phy.ops.write_reg(hw, 0x1F77, 0x1DEC); in igb_phy_init_script_igp3()
2167 hw->phy.ops.write_reg(hw, 0x1F78, 0xF9EF); in igb_phy_init_script_igp3()
2169 hw->phy.ops.write_reg(hw, 0x1F79, 0x0210); in igb_phy_init_script_igp3()
2171 hw->phy.ops.write_reg(hw, 0x1895, 0x0003); in igb_phy_init_script_igp3()
2173 hw->phy.ops.write_reg(hw, 0x1796, 0x0008); in igb_phy_init_script_igp3()
2175 hw->phy.ops.write_reg(hw, 0x1798, 0xD008); in igb_phy_init_script_igp3()
2179 hw->phy.ops.write_reg(hw, 0x1898, 0xD918); in igb_phy_init_script_igp3()
2181 hw->phy.ops.write_reg(hw, 0x187A, 0x0800); in igb_phy_init_script_igp3()
2185 hw->phy.ops.write_reg(hw, 0x0019, 0x008D); in igb_phy_init_script_igp3()
2187 hw->phy.ops.write_reg(hw, 0x001B, 0x2080); in igb_phy_init_script_igp3()
2189 hw->phy.ops.write_reg(hw, 0x0014, 0x0045); in igb_phy_init_script_igp3()
2191 hw->phy.ops.write_reg(hw, 0x0000, 0x1340); in igb_phy_init_script_igp3()
2202 s32 igb_initialize_M88E1512_phy(struct e1000_hw *hw) in igb_initialize_M88E1512_phy() argument
2204 struct e1000_phy_info *phy = &hw->phy; in igb_initialize_M88E1512_phy()
2208 ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FF); in igb_initialize_M88E1512_phy()
2212 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x214B); in igb_initialize_M88E1512_phy()
2216 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2144); in igb_initialize_M88E1512_phy()
2220 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x0C28); in igb_initialize_M88E1512_phy()
2224 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2146); in igb_initialize_M88E1512_phy()
2228 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xB233); in igb_initialize_M88E1512_phy()
2232 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x214D); in igb_initialize_M88E1512_phy()
2236 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xCC0C); in igb_initialize_M88E1512_phy()
2240 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2159); in igb_initialize_M88E1512_phy()
2245 ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FB); in igb_initialize_M88E1512_phy()
2249 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_3, 0x000D); in igb_initialize_M88E1512_phy()
2254 ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x12); in igb_initialize_M88E1512_phy()
2259 ret_val = phy->ops.write_reg(hw, E1000_M88E1512_MODE, 0x8001); in igb_initialize_M88E1512_phy()
2264 ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0); in igb_initialize_M88E1512_phy()
2268 ret_val = igb_phy_sw_reset(hw); in igb_initialize_M88E1512_phy()
2287 void igb_power_up_phy_copper(struct e1000_hw *hw) in igb_power_up_phy_copper() argument
2292 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg); in igb_power_up_phy_copper()
2294 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg); in igb_power_up_phy_copper()
2304 void igb_power_down_phy_copper(struct e1000_hw *hw) in igb_power_down_phy_copper() argument
2309 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg); in igb_power_down_phy_copper()
2311 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg); in igb_power_down_phy_copper()
2323 static s32 igb_check_polarity_82580(struct e1000_hw *hw) in igb_check_polarity_82580() argument
2325 struct e1000_phy_info *phy = &hw->phy; in igb_check_polarity_82580()
2330 ret_val = phy->ops.read_reg(hw, I82580_PHY_STATUS_2, &data); in igb_check_polarity_82580()
2348 s32 igb_phy_force_speed_duplex_82580(struct e1000_hw *hw) in igb_phy_force_speed_duplex_82580() argument
2350 struct e1000_phy_info *phy = &hw->phy; in igb_phy_force_speed_duplex_82580()
2355 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); in igb_phy_force_speed_duplex_82580()
2359 igb_phy_force_speed_duplex_setup(hw, &phy_data); in igb_phy_force_speed_duplex_82580()
2361 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); in igb_phy_force_speed_duplex_82580()
2368 ret_val = phy->ops.read_reg(hw, I82580_PHY_CTRL_2, &phy_data); in igb_phy_force_speed_duplex_82580()
2374 ret_val = phy->ops.write_reg(hw, I82580_PHY_CTRL_2, phy_data); in igb_phy_force_speed_duplex_82580()
2385 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link); in igb_phy_force_speed_duplex_82580()
2393 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link); in igb_phy_force_speed_duplex_82580()
2411 s32 igb_get_phy_info_82580(struct e1000_hw *hw) in igb_get_phy_info_82580() argument
2413 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_info_82580()
2418 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_get_phy_info_82580()
2430 ret_val = igb_check_polarity_82580(hw); in igb_get_phy_info_82580()
2434 ret_val = phy->ops.read_reg(hw, I82580_PHY_STATUS_2, &data); in igb_get_phy_info_82580()
2442 ret_val = hw->phy.ops.get_cable_length(hw); in igb_get_phy_info_82580()
2446 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data); in igb_get_phy_info_82580()
2474 s32 igb_get_cable_length_82580(struct e1000_hw *hw) in igb_get_cable_length_82580() argument
2476 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_82580()
2480 ret_val = phy->ops.read_reg(hw, I82580_PHY_DIAG_STATUS, &phy_data); in igb_get_cable_length_82580()
2506 s32 igb_write_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_gs40g() argument
2512 ret_val = hw->phy.ops.acquire(hw); in igb_write_phy_reg_gs40g()
2516 ret_val = igb_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page); in igb_write_phy_reg_gs40g()
2519 ret_val = igb_write_phy_reg_mdic(hw, offset, data); in igb_write_phy_reg_gs40g()
2522 hw->phy.ops.release(hw); in igb_write_phy_reg_gs40g()
2536 s32 igb_read_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_gs40g() argument
2542 ret_val = hw->phy.ops.acquire(hw); in igb_read_phy_reg_gs40g()
2546 ret_val = igb_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page); in igb_read_phy_reg_gs40g()
2549 ret_val = igb_read_phy_reg_mdic(hw, offset, data); in igb_read_phy_reg_gs40g()
2552 hw->phy.ops.release(hw); in igb_read_phy_reg_gs40g()
2562 static s32 igb_set_master_slave_mode(struct e1000_hw *hw) in igb_set_master_slave_mode() argument
2568 ret_val = hw->phy.ops.read_reg(hw, PHY_1000T_CTRL, &phy_data); in igb_set_master_slave_mode()
2573 hw->phy.original_ms_type = (phy_data & CR_1000T_MS_ENABLE) ? in igb_set_master_slave_mode()
2578 switch (hw->phy.ms_type) { in igb_set_master_slave_mode()
2593 return hw->phy.ops.write_reg(hw, PHY_1000T_CTRL, phy_data); in igb_set_master_slave_mode()