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);
64 s32 igb_check_reset_block(struct e1000_hw *hw) in igb_check_reset_block() argument
80 s32 igb_get_phy_id(struct e1000_hw *hw) in igb_get_phy_id() argument
82 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_id()
86 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igb_get_phy_id()
92 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igb_get_phy_id()
109 static s32 igb_phy_reset_dsp(struct e1000_hw *hw) in igb_phy_reset_dsp() argument
113 if (!(hw->phy.ops.write_reg)) in igb_phy_reset_dsp()
116 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xC1); in igb_phy_reset_dsp()
120 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0); in igb_phy_reset_dsp()
135 s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_mdic() argument
137 struct e1000_phy_info *phy = &hw->phy; in igb_read_phy_reg_mdic()
191 s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_mdic() argument
193 struct e1000_phy_info *phy = &hw->phy; in igb_write_phy_reg_mdic()
248 s32 igb_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_i2c() argument
250 struct e1000_phy_info *phy = &hw->phy; in igb_read_phy_reg_i2c()
293 s32 igb_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_i2c() argument
295 struct e1000_phy_info *phy = &hw->phy; in igb_write_phy_reg_i2c()
300 if ((hw->phy.addr == 0) || (hw->phy.addr > 7)) { in igb_write_phy_reg_i2c()
302 hw->phy.addr); in igb_write_phy_reg_i2c()
352 s32 igb_read_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 *data) in igb_read_sfp_data_byte() argument
402 s32 igb_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_igp() argument
406 if (!(hw->phy.ops.acquire)) in igb_read_phy_reg_igp()
409 ret_val = hw->phy.ops.acquire(hw); in igb_read_phy_reg_igp()
414 ret_val = igb_write_phy_reg_mdic(hw, in igb_read_phy_reg_igp()
418 hw->phy.ops.release(hw); in igb_read_phy_reg_igp()
423 ret_val = igb_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, in igb_read_phy_reg_igp()
426 hw->phy.ops.release(hw); in igb_read_phy_reg_igp()
441 s32 igb_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_igp() argument
445 if (!(hw->phy.ops.acquire)) in igb_write_phy_reg_igp()
448 ret_val = hw->phy.ops.acquire(hw); in igb_write_phy_reg_igp()
453 ret_val = igb_write_phy_reg_mdic(hw, in igb_write_phy_reg_igp()
457 hw->phy.ops.release(hw); in igb_write_phy_reg_igp()
462 ret_val = igb_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, in igb_write_phy_reg_igp()
465 hw->phy.ops.release(hw); in igb_write_phy_reg_igp()
477 s32 igb_copper_link_setup_82580(struct e1000_hw *hw) in igb_copper_link_setup_82580() argument
479 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_82580()
489 ret_val = hw->phy.ops.reset(hw); in igb_copper_link_setup_82580()
497 ret_val = phy->ops.read_reg(hw, I82580_CFG_REG, &phy_data); in igb_copper_link_setup_82580()
506 ret_val = phy->ops.write_reg(hw, I82580_CFG_REG, phy_data); in igb_copper_link_setup_82580()
511 ret_val = phy->ops.read_reg(hw, I82580_PHY_CTRL_2, &phy_data); in igb_copper_link_setup_82580()
520 switch (hw->phy.mdix) { in igb_copper_link_setup_82580()
531 ret_val = hw->phy.ops.write_reg(hw, I82580_PHY_CTRL_2, phy_data); in igb_copper_link_setup_82580()
544 s32 igb_copper_link_setup_m88(struct e1000_hw *hw) in igb_copper_link_setup_m88() argument
546 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_m88()
556 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_copper_link_setup_m88()
597 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_copper_link_setup_m88()
605 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, in igb_copper_link_setup_m88()
624 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, in igb_copper_link_setup_m88()
631 ret_val = igb_phy_sw_reset(hw); in igb_copper_link_setup_m88()
648 s32 igb_copper_link_setup_m88_gen2(struct e1000_hw *hw) in igb_copper_link_setup_m88_gen2() argument
650 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_m88_gen2()
658 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_copper_link_setup_m88_gen2()
704 phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_copper_link_setup_m88_gen2()
708 ret_val = igb_phy_sw_reset(hw); in igb_copper_link_setup_m88_gen2()
719 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_copper_link_setup_m88_gen2()
724 ret_val = igb_phy_sw_reset(hw); in igb_copper_link_setup_m88_gen2()
729 ret_val = igb_set_master_slave_mode(hw); in igb_copper_link_setup_m88_gen2()
743 s32 igb_copper_link_setup_igp(struct e1000_hw *hw) in igb_copper_link_setup_igp() argument
745 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_setup_igp()
754 ret_val = phy->ops.reset(hw); in igb_copper_link_setup_igp()
771 ret_val = phy->ops.set_d3_lplu_state(hw, false); in igb_copper_link_setup_igp()
779 ret_val = phy->ops.set_d0_lplu_state(hw, false); in igb_copper_link_setup_igp()
785 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &data); in igb_copper_link_setup_igp()
803 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, data); in igb_copper_link_setup_igp()
808 if (hw->mac.autoneg) { in igb_copper_link_setup_igp()
815 ret_val = phy->ops.read_reg(hw, in igb_copper_link_setup_igp()
822 ret_val = phy->ops.write_reg(hw, in igb_copper_link_setup_igp()
829 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data); in igb_copper_link_setup_igp()
834 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data); in igb_copper_link_setup_igp()
839 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data); in igb_copper_link_setup_igp()
863 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data); in igb_copper_link_setup_igp()
881 static s32 igb_copper_link_autoneg(struct e1000_hw *hw) in igb_copper_link_autoneg() argument
883 struct e1000_phy_info *phy = &hw->phy; in igb_copper_link_autoneg()
899 ret_val = igb_phy_setup_autoneg(hw); in igb_copper_link_autoneg()
909 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igb_copper_link_autoneg()
914 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igb_copper_link_autoneg()
922 ret_val = igb_wait_autoneg(hw); in igb_copper_link_autoneg()
929 hw->mac.get_link_status = true; in igb_copper_link_autoneg()
944 static s32 igb_phy_setup_autoneg(struct e1000_hw *hw) in igb_phy_setup_autoneg() argument
946 struct e1000_phy_info *phy = &hw->phy; in igb_phy_setup_autoneg()
954 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); in igb_phy_setup_autoneg()
960 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, in igb_phy_setup_autoneg()
1036 switch (hw->fc.current_mode) { in igb_phy_setup_autoneg()
1074 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); in igb_phy_setup_autoneg()
1081 ret_val = phy->ops.write_reg(hw, in igb_phy_setup_autoneg()
1101 s32 igb_setup_copper_link(struct e1000_hw *hw) in igb_setup_copper_link() argument
1106 if (hw->mac.autoneg) { in igb_setup_copper_link()
1110 ret_val = igb_copper_link_autoneg(hw); in igb_setup_copper_link()
1118 ret_val = hw->phy.ops.force_speed_duplex(hw); in igb_setup_copper_link()
1128 ret_val = igb_phy_has_link(hw, COPPER_LINK_UP_LIMIT, 10, &link); in igb_setup_copper_link()
1134 igb_config_collision_dist(hw); in igb_setup_copper_link()
1135 ret_val = igb_config_fc_after_link_up(hw); in igb_setup_copper_link()
1152 s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw) in igb_phy_force_speed_duplex_igp() argument
1154 struct e1000_phy_info *phy = &hw->phy; in igb_phy_force_speed_duplex_igp()
1159 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); in igb_phy_force_speed_duplex_igp()
1163 igb_phy_force_speed_duplex_setup(hw, &phy_data); in igb_phy_force_speed_duplex_igp()
1165 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); in igb_phy_force_speed_duplex_igp()
1172 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data); in igb_phy_force_speed_duplex_igp()
1179 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data); in igb_phy_force_speed_duplex_igp()
1190 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 10000, &link); in igb_phy_force_speed_duplex_igp()
1198 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 10000, &link); in igb_phy_force_speed_duplex_igp()
1217 s32 igb_phy_force_speed_duplex_m88(struct e1000_hw *hw) in igb_phy_force_speed_duplex_m88() argument
1219 struct e1000_phy_info *phy = &hw->phy; in igb_phy_force_speed_duplex_m88()
1229 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, in igb_phy_force_speed_duplex_m88()
1235 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, in igb_phy_force_speed_duplex_m88()
1243 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); in igb_phy_force_speed_duplex_m88()
1247 igb_phy_force_speed_duplex_setup(hw, &phy_data); in igb_phy_force_speed_duplex_m88()
1249 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); in igb_phy_force_speed_duplex_m88()
1254 ret_val = igb_phy_sw_reset(hw); in igb_phy_force_speed_duplex_m88()
1261 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link); in igb_phy_force_speed_duplex_m88()
1268 switch (hw->phy.id) { in igb_phy_force_speed_duplex_m88()
1275 if (hw->phy.type != e1000_phy_m88) in igb_phy_force_speed_duplex_m88()
1285 ret_val = phy->ops.write_reg(hw, in igb_phy_force_speed_duplex_m88()
1290 ret_val = igb_phy_reset_dsp(hw); in igb_phy_force_speed_duplex_m88()
1297 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, in igb_phy_force_speed_duplex_m88()
1303 if (hw->phy.type != e1000_phy_m88 || in igb_phy_force_speed_duplex_m88()
1304 hw->phy.id == I347AT4_E_PHY_ID || in igb_phy_force_speed_duplex_m88()
1305 hw->phy.id == M88E1112_E_PHY_ID || in igb_phy_force_speed_duplex_m88()
1306 hw->phy.id == I210_I_PHY_ID) in igb_phy_force_speed_duplex_m88()
1309 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data); in igb_phy_force_speed_duplex_m88()
1318 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data); in igb_phy_force_speed_duplex_m88()
1325 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_phy_force_speed_duplex_m88()
1330 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in igb_phy_force_speed_duplex_m88()
1348 static void igb_phy_force_speed_duplex_setup(struct e1000_hw *hw, in igb_phy_force_speed_duplex_setup() argument
1351 struct e1000_mac_info *mac = &hw->mac; in igb_phy_force_speed_duplex_setup()
1355 hw->fc.current_mode = e1000_fc_none; in igb_phy_force_speed_duplex_setup()
1392 igb_config_collision_dist(hw); in igb_phy_force_speed_duplex_setup()
1411 s32 igb_set_d3_lplu_state(struct e1000_hw *hw, bool active) in igb_set_d3_lplu_state() argument
1413 struct e1000_phy_info *phy = &hw->phy; in igb_set_d3_lplu_state()
1417 if (!(hw->phy.ops.read_reg)) in igb_set_d3_lplu_state()
1420 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data); in igb_set_d3_lplu_state()
1426 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, in igb_set_d3_lplu_state()
1436 ret_val = phy->ops.read_reg(hw, in igb_set_d3_lplu_state()
1443 ret_val = phy->ops.write_reg(hw, in igb_set_d3_lplu_state()
1449 ret_val = phy->ops.read_reg(hw, in igb_set_d3_lplu_state()
1456 ret_val = phy->ops.write_reg(hw, in igb_set_d3_lplu_state()
1466 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT, in igb_set_d3_lplu_state()
1472 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG, in igb_set_d3_lplu_state()
1478 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG, in igb_set_d3_lplu_state()
1494 s32 igb_check_downshift(struct e1000_hw *hw) in igb_check_downshift() argument
1496 struct e1000_phy_info *phy = &hw->phy; in igb_check_downshift()
1520 ret_val = phy->ops.read_reg(hw, offset, &phy_data); in igb_check_downshift()
1537 s32 igb_check_polarity_m88(struct e1000_hw *hw) in igb_check_polarity_m88() argument
1539 struct e1000_phy_info *phy = &hw->phy; in igb_check_polarity_m88()
1543 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &data); in igb_check_polarity_m88()
1562 static s32 igb_check_polarity_igp(struct e1000_hw *hw) in igb_check_polarity_igp() argument
1564 struct e1000_phy_info *phy = &hw->phy; in igb_check_polarity_igp()
1571 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data); in igb_check_polarity_igp()
1587 ret_val = phy->ops.read_reg(hw, offset, &data); in igb_check_polarity_igp()
1605 static s32 igb_wait_autoneg(struct e1000_hw *hw) in igb_wait_autoneg() argument
1612 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_wait_autoneg()
1615 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_wait_autoneg()
1638 s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations, in igb_phy_has_link() argument
1649 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_phy_has_link()
1660 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igb_phy_has_link()
1691 s32 igb_get_cable_length_m88(struct e1000_hw *hw) in igb_get_cable_length_m88() argument
1693 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_m88()
1697 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); in igb_get_cable_length_m88()
1717 s32 igb_get_cable_length_m88_gen2(struct e1000_hw *hw) in igb_get_cable_length_m88_gen2() argument
1719 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_m88_gen2()
1723 switch (hw->phy.id) { in igb_get_cable_length_m88_gen2()
1726 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) + in igb_get_cable_length_m88_gen2()
1733 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) + in igb_get_cable_length_m88_gen2()
1748 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1753 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x07); in igb_get_cable_length_m88_gen2()
1758 ret_val = phy->ops.read_reg(hw, (I347AT4_PCDL + phy->addr), in igb_get_cable_length_m88_gen2()
1764 ret_val = phy->ops.read_reg(hw, I347AT4_PCDC, &phy_data2); in igb_get_cable_length_m88_gen2()
1776 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1783 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1788 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x05); in igb_get_cable_length_m88_gen2()
1792 ret_val = phy->ops.read_reg(hw, M88E1112_VCT_DSP_DISTANCE, in igb_get_cable_length_m88_gen2()
1811 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, in igb_get_cable_length_m88_gen2()
1837 s32 igb_get_cable_length_igp_2(struct e1000_hw *hw) in igb_get_cable_length_igp_2() argument
1839 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_igp_2()
1853 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &phy_data); in igb_get_cable_length_igp_2()
1908 s32 igb_get_phy_info_m88(struct e1000_hw *hw) in igb_get_phy_info_m88() argument
1910 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_info_m88()
1921 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_get_phy_info_m88()
1931 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in igb_get_phy_info_m88()
1938 ret_val = igb_check_polarity_m88(hw); in igb_get_phy_info_m88()
1942 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); in igb_get_phy_info_m88()
1949 ret_val = phy->ops.get_cable_length(hw); in igb_get_phy_info_m88()
1953 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data); in igb_get_phy_info_m88()
1984 s32 igb_get_phy_info_igp(struct e1000_hw *hw) in igb_get_phy_info_igp() argument
1986 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_info_igp()
1991 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_get_phy_info_igp()
2003 ret_val = igb_check_polarity_igp(hw); in igb_get_phy_info_igp()
2007 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data); in igb_get_phy_info_igp()
2015 ret_val = phy->ops.get_cable_length(hw); in igb_get_phy_info_igp()
2019 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data); in igb_get_phy_info_igp()
2047 s32 igb_phy_sw_reset(struct e1000_hw *hw) in igb_phy_sw_reset() argument
2052 if (!(hw->phy.ops.read_reg)) in igb_phy_sw_reset()
2055 ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igb_phy_sw_reset()
2060 ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igb_phy_sw_reset()
2079 s32 igb_phy_hw_reset(struct e1000_hw *hw) in igb_phy_hw_reset() argument
2081 struct e1000_phy_info *phy = &hw->phy; in igb_phy_hw_reset()
2085 ret_val = igb_check_reset_block(hw); in igb_phy_hw_reset()
2091 ret_val = phy->ops.acquire(hw); in igb_phy_hw_reset()
2106 phy->ops.release(hw); in igb_phy_hw_reset()
2108 ret_val = phy->ops.get_cfg_done(hw); in igb_phy_hw_reset()
2120 s32 igb_phy_init_script_igp3(struct e1000_hw *hw) in igb_phy_init_script_igp3() argument
2126 hw->phy.ops.write_reg(hw, 0x2F5B, 0x9018); in igb_phy_init_script_igp3()
2128 hw->phy.ops.write_reg(hw, 0x2F52, 0x0000); in igb_phy_init_script_igp3()
2130 hw->phy.ops.write_reg(hw, 0x2FB1, 0x8B24); in igb_phy_init_script_igp3()
2132 hw->phy.ops.write_reg(hw, 0x2FB2, 0xF8F0); in igb_phy_init_script_igp3()
2134 hw->phy.ops.write_reg(hw, 0x2010, 0x10B0); in igb_phy_init_script_igp3()
2136 hw->phy.ops.write_reg(hw, 0x2011, 0x0000); in igb_phy_init_script_igp3()
2138 hw->phy.ops.write_reg(hw, 0x20DD, 0x249A); in igb_phy_init_script_igp3()
2140 hw->phy.ops.write_reg(hw, 0x20DE, 0x00D3); in igb_phy_init_script_igp3()
2142 hw->phy.ops.write_reg(hw, 0x28B4, 0x04CE); in igb_phy_init_script_igp3()
2144 hw->phy.ops.write_reg(hw, 0x2F70, 0x29E4); in igb_phy_init_script_igp3()
2146 hw->phy.ops.write_reg(hw, 0x0000, 0x0140); in igb_phy_init_script_igp3()
2148 hw->phy.ops.write_reg(hw, 0x1F30, 0x1606); in igb_phy_init_script_igp3()
2150 hw->phy.ops.write_reg(hw, 0x1F31, 0xB814); in igb_phy_init_script_igp3()
2152 hw->phy.ops.write_reg(hw, 0x1F35, 0x002A); in igb_phy_init_script_igp3()
2154 hw->phy.ops.write_reg(hw, 0x1F3E, 0x0067); in igb_phy_init_script_igp3()
2156 hw->phy.ops.write_reg(hw, 0x1F54, 0x0065); in igb_phy_init_script_igp3()
2158 hw->phy.ops.write_reg(hw, 0x1F55, 0x002A); in igb_phy_init_script_igp3()
2160 hw->phy.ops.write_reg(hw, 0x1F56, 0x002A); in igb_phy_init_script_igp3()
2162 hw->phy.ops.write_reg(hw, 0x1F72, 0x3FB0); in igb_phy_init_script_igp3()
2164 hw->phy.ops.write_reg(hw, 0x1F76, 0xC0FF); in igb_phy_init_script_igp3()
2166 hw->phy.ops.write_reg(hw, 0x1F77, 0x1DEC); in igb_phy_init_script_igp3()
2168 hw->phy.ops.write_reg(hw, 0x1F78, 0xF9EF); in igb_phy_init_script_igp3()
2170 hw->phy.ops.write_reg(hw, 0x1F79, 0x0210); in igb_phy_init_script_igp3()
2172 hw->phy.ops.write_reg(hw, 0x1895, 0x0003); in igb_phy_init_script_igp3()
2174 hw->phy.ops.write_reg(hw, 0x1796, 0x0008); in igb_phy_init_script_igp3()
2176 hw->phy.ops.write_reg(hw, 0x1798, 0xD008); in igb_phy_init_script_igp3()
2180 hw->phy.ops.write_reg(hw, 0x1898, 0xD918); in igb_phy_init_script_igp3()
2182 hw->phy.ops.write_reg(hw, 0x187A, 0x0800); in igb_phy_init_script_igp3()
2186 hw->phy.ops.write_reg(hw, 0x0019, 0x008D); in igb_phy_init_script_igp3()
2188 hw->phy.ops.write_reg(hw, 0x001B, 0x2080); in igb_phy_init_script_igp3()
2190 hw->phy.ops.write_reg(hw, 0x0014, 0x0045); in igb_phy_init_script_igp3()
2192 hw->phy.ops.write_reg(hw, 0x0000, 0x1340); in igb_phy_init_script_igp3()
2204 void igb_power_up_phy_copper(struct e1000_hw *hw) in igb_power_up_phy_copper() argument
2209 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg); in igb_power_up_phy_copper()
2211 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg); in igb_power_up_phy_copper()
2221 void igb_power_down_phy_copper(struct e1000_hw *hw) in igb_power_down_phy_copper() argument
2226 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg); in igb_power_down_phy_copper()
2228 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg); in igb_power_down_phy_copper()
2240 static s32 igb_check_polarity_82580(struct e1000_hw *hw) in igb_check_polarity_82580() argument
2242 struct e1000_phy_info *phy = &hw->phy; in igb_check_polarity_82580()
2247 ret_val = phy->ops.read_reg(hw, I82580_PHY_STATUS_2, &data); in igb_check_polarity_82580()
2265 s32 igb_phy_force_speed_duplex_82580(struct e1000_hw *hw) in igb_phy_force_speed_duplex_82580() argument
2267 struct e1000_phy_info *phy = &hw->phy; in igb_phy_force_speed_duplex_82580()
2272 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data); in igb_phy_force_speed_duplex_82580()
2276 igb_phy_force_speed_duplex_setup(hw, &phy_data); in igb_phy_force_speed_duplex_82580()
2278 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data); in igb_phy_force_speed_duplex_82580()
2285 ret_val = phy->ops.read_reg(hw, I82580_PHY_CTRL_2, &phy_data); in igb_phy_force_speed_duplex_82580()
2291 ret_val = phy->ops.write_reg(hw, I82580_PHY_CTRL_2, phy_data); in igb_phy_force_speed_duplex_82580()
2302 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link); in igb_phy_force_speed_duplex_82580()
2310 ret_val = igb_phy_has_link(hw, PHY_FORCE_LIMIT, 100000, &link); in igb_phy_force_speed_duplex_82580()
2328 s32 igb_get_phy_info_82580(struct e1000_hw *hw) in igb_get_phy_info_82580() argument
2330 struct e1000_phy_info *phy = &hw->phy; in igb_get_phy_info_82580()
2335 ret_val = igb_phy_has_link(hw, 1, 0, &link); in igb_get_phy_info_82580()
2347 ret_val = igb_check_polarity_82580(hw); in igb_get_phy_info_82580()
2351 ret_val = phy->ops.read_reg(hw, I82580_PHY_STATUS_2, &data); in igb_get_phy_info_82580()
2359 ret_val = hw->phy.ops.get_cable_length(hw); in igb_get_phy_info_82580()
2363 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data); in igb_get_phy_info_82580()
2391 s32 igb_get_cable_length_82580(struct e1000_hw *hw) in igb_get_cable_length_82580() argument
2393 struct e1000_phy_info *phy = &hw->phy; in igb_get_cable_length_82580()
2397 ret_val = phy->ops.read_reg(hw, I82580_PHY_DIAG_STATUS, &phy_data); in igb_get_cable_length_82580()
2423 s32 igb_write_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 data) in igb_write_phy_reg_gs40g() argument
2429 ret_val = hw->phy.ops.acquire(hw); in igb_write_phy_reg_gs40g()
2433 ret_val = igb_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page); in igb_write_phy_reg_gs40g()
2436 ret_val = igb_write_phy_reg_mdic(hw, offset, data); in igb_write_phy_reg_gs40g()
2439 hw->phy.ops.release(hw); in igb_write_phy_reg_gs40g()
2453 s32 igb_read_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 *data) in igb_read_phy_reg_gs40g() argument
2459 ret_val = hw->phy.ops.acquire(hw); in igb_read_phy_reg_gs40g()
2463 ret_val = igb_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page); in igb_read_phy_reg_gs40g()
2466 ret_val = igb_read_phy_reg_mdic(hw, offset, data); in igb_read_phy_reg_gs40g()
2469 hw->phy.ops.release(hw); in igb_read_phy_reg_gs40g()
2479 static s32 igb_set_master_slave_mode(struct e1000_hw *hw) in igb_set_master_slave_mode() argument
2485 ret_val = hw->phy.ops.read_reg(hw, PHY_1000T_CTRL, &phy_data); in igb_set_master_slave_mode()
2490 hw->phy.original_ms_type = (phy_data & CR_1000T_MS_ENABLE) ? in igb_set_master_slave_mode()
2495 switch (hw->phy.ms_type) { in igb_set_master_slave_mode()
2510 return hw->phy.ops.write_reg(hw, PHY_1000T_CTRL, phy_data); in igb_set_master_slave_mode()