Lines Matching refs:phy
19 struct igc_phy_info *phy = &hw->phy; in igc_init_phy_ops_generic() local
23 phy->ops.init_params = igc_null_ops_generic; in igc_init_phy_ops_generic()
24 phy->ops.acquire = igc_null_ops_generic; in igc_init_phy_ops_generic()
25 phy->ops.check_reset_block = igc_null_ops_generic; in igc_init_phy_ops_generic()
26 phy->ops.force_speed_duplex = igc_null_ops_generic; in igc_init_phy_ops_generic()
27 phy->ops.get_info = igc_null_ops_generic; in igc_init_phy_ops_generic()
28 phy->ops.set_page = igc_null_set_page; in igc_init_phy_ops_generic()
29 phy->ops.read_reg = igc_null_read_reg; in igc_init_phy_ops_generic()
30 phy->ops.read_reg_locked = igc_null_read_reg; in igc_init_phy_ops_generic()
31 phy->ops.read_reg_page = igc_null_read_reg; in igc_init_phy_ops_generic()
32 phy->ops.release = igc_null_phy_generic; in igc_init_phy_ops_generic()
33 phy->ops.reset = igc_null_ops_generic; in igc_init_phy_ops_generic()
34 phy->ops.set_d0_lplu_state = igc_null_lplu_state; in igc_init_phy_ops_generic()
35 phy->ops.set_d3_lplu_state = igc_null_lplu_state; in igc_init_phy_ops_generic()
36 phy->ops.write_reg = igc_null_write_reg; in igc_init_phy_ops_generic()
37 phy->ops.write_reg_locked = igc_null_write_reg; in igc_init_phy_ops_generic()
38 phy->ops.write_reg_page = igc_null_write_reg; in igc_init_phy_ops_generic()
39 phy->ops.power_up = igc_null_phy_generic; in igc_init_phy_ops_generic()
40 phy->ops.power_down = igc_null_phy_generic; in igc_init_phy_ops_generic()
137 struct igc_phy_info *phy = &hw->phy; in igc_get_phy_id() local
143 if (!phy->ops.read_reg) in igc_get_phy_id()
146 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igc_get_phy_id()
150 phy->id = (uint32_t)(phy_id << 16); in igc_get_phy_id()
152 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igc_get_phy_id()
156 phy->id |= (uint32_t)(phy_id & PHY_REVISION_MASK); in igc_get_phy_id()
157 phy->revision = (uint32_t)(phy_id & ~PHY_REVISION_MASK); in igc_get_phy_id()
174 struct igc_phy_info *phy = &hw->phy; in igc_read_phy_reg_mdic() local
189 (phy->addr << IGC_MDIC_PHY_SHIFT) | (IGC_MDIC_OP_READ)); in igc_read_phy_reg_mdic()
232 struct igc_phy_info *phy = &hw->phy; in igc_write_phy_reg_mdic() local
247 (phy->addr << IGC_MDIC_PHY_SHIFT) | (IGC_MDIC_OP_WRITE)); in igc_write_phy_reg_mdic()
287 struct igc_phy_info *phy = &hw->phy; in igc_phy_setup_autoneg() local
295 phy->autoneg_advertised &= phy->autoneg_mask; in igc_phy_setup_autoneg()
298 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); in igc_phy_setup_autoneg()
302 if (phy->autoneg_mask & ADVERTISE_1000_FULL) { in igc_phy_setup_autoneg()
304 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, in igc_phy_setup_autoneg()
310 if (phy->autoneg_mask & ADVERTISE_2500_FULL) { in igc_phy_setup_autoneg()
312 ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << in igc_phy_setup_autoneg()
334 DEBUGOUT1("autoneg_advertised %x\n", phy->autoneg_advertised); in igc_phy_setup_autoneg()
337 if (phy->autoneg_advertised & ADVERTISE_10_HALF) { in igc_phy_setup_autoneg()
343 if (phy->autoneg_advertised & ADVERTISE_10_FULL) { in igc_phy_setup_autoneg()
349 if (phy->autoneg_advertised & ADVERTISE_100_HALF) { in igc_phy_setup_autoneg()
355 if (phy->autoneg_advertised & ADVERTISE_100_FULL) { in igc_phy_setup_autoneg()
361 if (phy->autoneg_advertised & ADVERTISE_1000_HALF) in igc_phy_setup_autoneg()
365 if (phy->autoneg_advertised & ADVERTISE_1000_FULL) { in igc_phy_setup_autoneg()
371 if (phy->autoneg_advertised & ADVERTISE_2500_HALF) in igc_phy_setup_autoneg()
375 if (phy->autoneg_advertised & ADVERTISE_2500_FULL) { in igc_phy_setup_autoneg()
435 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); in igc_phy_setup_autoneg()
441 if (phy->autoneg_mask & ADVERTISE_1000_FULL) in igc_phy_setup_autoneg()
442 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, in igc_phy_setup_autoneg()
445 if (phy->autoneg_mask & ADVERTISE_2500_FULL) in igc_phy_setup_autoneg()
446 ret_val = phy->ops.write_reg(hw, in igc_phy_setup_autoneg()
465 struct igc_phy_info *phy = &hw->phy; in igc_copper_link_autoneg() local
474 phy->autoneg_advertised &= phy->autoneg_mask; in igc_copper_link_autoneg()
479 if (!phy->autoneg_advertised) in igc_copper_link_autoneg()
480 phy->autoneg_advertised = phy->autoneg_mask; in igc_copper_link_autoneg()
493 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igc_copper_link_autoneg()
498 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igc_copper_link_autoneg()
505 if (phy->autoneg_wait_to_complete) { in igc_copper_link_autoneg()
545 ret_val = hw->phy.ops.force_speed_duplex(hw); in igc_setup_copper_link_generic()
581 struct igc_phy_info *phy = &hw->phy; in igc_check_downshift_generic() local
586 switch (phy->type) { in igc_check_downshift_generic()
590 phy->speed_downgraded = false; in igc_check_downshift_generic()
612 if (!hw->phy.ops.read_reg) in igc_wait_autoneg()
617 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_wait_autoneg()
620 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_wait_autoneg()
652 if (!hw->phy.ops.read_reg) in igc_phy_has_link_generic()
660 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_phy_has_link_generic()
671 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_phy_has_link_generic()
699 struct igc_phy_info *phy = &hw->phy; in igc_phy_hw_reset_generic() local
705 if (phy->ops.check_reset_block) { in igc_phy_hw_reset_generic()
706 ret_val = phy->ops.check_reset_block(hw); in igc_phy_hw_reset_generic()
711 ret_val = phy->ops.acquire(hw); in igc_phy_hw_reset_generic()
721 DELAY(phy->reset_delay_us); in igc_phy_hw_reset_generic()
737 phy->ops.release(hw); in igc_phy_hw_reset_generic()
756 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg); in igc_power_up_phy_copper()
758 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg); in igc_power_up_phy_copper()
776 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg); in igc_power_down_phy_copper()
778 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg); in igc_power_down_phy_copper()
802 ret_val = hw->phy.ops.acquire(hw); in igc_write_phy_reg_gpy()
808 hw->phy.ops.release(hw); in igc_write_phy_reg_gpy()
838 ret_val = hw->phy.ops.acquire(hw); in igc_read_phy_reg_gpy()
844 hw->phy.ops.release(hw); in igc_read_phy_reg_gpy()
869 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, dev_addr); in __igc_access_xmdio_reg()
873 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAAD, address); in __igc_access_xmdio_reg()
877 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, IGC_MMDAC_FUNC_DATA | in __igc_access_xmdio_reg()
883 ret_val = hw->phy.ops.read_reg(hw, IGC_MMDAAD, data); in __igc_access_xmdio_reg()
885 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAAD, *data); in __igc_access_xmdio_reg()
890 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, 0); in __igc_access_xmdio_reg()