Lines Matching refs:ret_val

134 	s32 ret_val = IGC_SUCCESS;  in igc_get_phy_id()  local
142 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igc_get_phy_id()
143 if (ret_val) in igc_get_phy_id()
144 return ret_val; in igc_get_phy_id()
148 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igc_get_phy_id()
149 if (ret_val) in igc_get_phy_id()
150 return ret_val; in igc_get_phy_id()
289 s32 ret_val; in igc_phy_setup_autoneg() local
299 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); in igc_phy_setup_autoneg()
300 if (ret_val) in igc_phy_setup_autoneg()
301 return ret_val; in igc_phy_setup_autoneg()
305 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, in igc_phy_setup_autoneg()
307 if (ret_val) in igc_phy_setup_autoneg()
308 return ret_val; in igc_phy_setup_autoneg()
313 ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << in igc_phy_setup_autoneg()
318 if (ret_val) in igc_phy_setup_autoneg()
319 return ret_val; in igc_phy_setup_autoneg()
441 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); in igc_phy_setup_autoneg()
442 if (ret_val) in igc_phy_setup_autoneg()
443 return ret_val; in igc_phy_setup_autoneg()
448 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, in igc_phy_setup_autoneg()
452 ret_val = phy->ops.write_reg(hw, in igc_phy_setup_autoneg()
458 return ret_val; in igc_phy_setup_autoneg()
473 s32 ret_val; in igc_copper_link_autoneg() local
490 ret_val = igc_phy_setup_autoneg(hw); in igc_copper_link_autoneg()
491 if (ret_val) { in igc_copper_link_autoneg()
493 return ret_val; in igc_copper_link_autoneg()
500 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igc_copper_link_autoneg()
501 if (ret_val) in igc_copper_link_autoneg()
502 return ret_val; in igc_copper_link_autoneg()
505 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igc_copper_link_autoneg()
506 if (ret_val) in igc_copper_link_autoneg()
507 return ret_val; in igc_copper_link_autoneg()
513 ret_val = igc_wait_autoneg(hw); in igc_copper_link_autoneg()
514 if (ret_val) { in igc_copper_link_autoneg()
516 return ret_val; in igc_copper_link_autoneg()
522 return ret_val; in igc_copper_link_autoneg()
536 s32 ret_val; in igc_setup_copper_link_generic() local
545 ret_val = igc_copper_link_autoneg(hw); in igc_setup_copper_link_generic()
546 if (ret_val) in igc_setup_copper_link_generic()
547 return ret_val; in igc_setup_copper_link_generic()
553 ret_val = hw->phy.ops.force_speed_duplex(hw); in igc_setup_copper_link_generic()
554 if (ret_val) { in igc_setup_copper_link_generic()
556 return ret_val; in igc_setup_copper_link_generic()
563 ret_val = igc_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10, in igc_setup_copper_link_generic()
565 if (ret_val) in igc_setup_copper_link_generic()
566 return ret_val; in igc_setup_copper_link_generic()
571 ret_val = igc_config_fc_after_link_up_generic(hw); in igc_setup_copper_link_generic()
576 return ret_val; in igc_setup_copper_link_generic()
657 s32 ret_val; in igc_set_d3_lplu_state_generic() local
665 ret_val = phy->ops.read_reg(hw, IGP02IGC_PHY_POWER_MGMT, &data); in igc_set_d3_lplu_state_generic()
666 if (ret_val) in igc_set_d3_lplu_state_generic()
667 return ret_val; in igc_set_d3_lplu_state_generic()
671 ret_val = phy->ops.write_reg(hw, IGP02IGC_PHY_POWER_MGMT, in igc_set_d3_lplu_state_generic()
673 if (ret_val) in igc_set_d3_lplu_state_generic()
674 return ret_val; in igc_set_d3_lplu_state_generic()
681 ret_val = phy->ops.read_reg(hw, in igc_set_d3_lplu_state_generic()
684 if (ret_val) in igc_set_d3_lplu_state_generic()
685 return ret_val; in igc_set_d3_lplu_state_generic()
688 ret_val = phy->ops.write_reg(hw, in igc_set_d3_lplu_state_generic()
691 if (ret_val) in igc_set_d3_lplu_state_generic()
692 return ret_val; in igc_set_d3_lplu_state_generic()
694 ret_val = phy->ops.read_reg(hw, in igc_set_d3_lplu_state_generic()
697 if (ret_val) in igc_set_d3_lplu_state_generic()
698 return ret_val; in igc_set_d3_lplu_state_generic()
701 ret_val = phy->ops.write_reg(hw, in igc_set_d3_lplu_state_generic()
704 if (ret_val) in igc_set_d3_lplu_state_generic()
705 return ret_val; in igc_set_d3_lplu_state_generic()
711 ret_val = phy->ops.write_reg(hw, IGP02IGC_PHY_POWER_MGMT, in igc_set_d3_lplu_state_generic()
713 if (ret_val) in igc_set_d3_lplu_state_generic()
714 return ret_val; in igc_set_d3_lplu_state_generic()
717 ret_val = phy->ops.read_reg(hw, IGP01IGC_PHY_PORT_CONFIG, in igc_set_d3_lplu_state_generic()
719 if (ret_val) in igc_set_d3_lplu_state_generic()
720 return ret_val; in igc_set_d3_lplu_state_generic()
723 ret_val = phy->ops.write_reg(hw, IGP01IGC_PHY_PORT_CONFIG, in igc_set_d3_lplu_state_generic()
727 return ret_val; in igc_set_d3_lplu_state_generic()
741 s32 ret_val; in igc_check_downshift_generic() local
753 return ret_val; in igc_check_downshift_generic()
765 s32 ret_val = IGC_SUCCESS; in igc_wait_autoneg() local
775 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_wait_autoneg()
776 if (ret_val) in igc_wait_autoneg()
778 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_wait_autoneg()
779 if (ret_val) in igc_wait_autoneg()
789 return ret_val; in igc_wait_autoneg()
804 s32 ret_val = IGC_SUCCESS; in igc_phy_has_link_generic() local
817 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_phy_has_link_generic()
818 if (ret_val) { in igc_phy_has_link_generic()
828 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_phy_has_link_generic()
829 if (ret_val) in igc_phy_has_link_generic()
841 return ret_val; in igc_phy_has_link_generic()
856 s32 ret_val; in igc_phy_hw_reset_generic() local
862 ret_val = phy->ops.check_reset_block(hw); in igc_phy_hw_reset_generic()
863 if (ret_val) in igc_phy_hw_reset_generic()
867 ret_val = phy->ops.acquire(hw); in igc_phy_hw_reset_generic()
868 if (ret_val) in igc_phy_hw_reset_generic()
869 return ret_val; in igc_phy_hw_reset_generic()
895 return ret_val; in igc_phy_hw_reset_generic()
946 s32 ret_val; in igc_write_phy_reg_gpy() local
954 ret_val = hw->phy.ops.acquire(hw); in igc_write_phy_reg_gpy()
955 if (ret_val) in igc_write_phy_reg_gpy()
956 return ret_val; in igc_write_phy_reg_gpy()
957 ret_val = igc_write_phy_reg_mdic(hw, offset, data); in igc_write_phy_reg_gpy()
958 if (ret_val) in igc_write_phy_reg_gpy()
959 return ret_val; in igc_write_phy_reg_gpy()
962 ret_val = igc_write_xmdio_reg(hw, (u16)offset, dev_addr, in igc_write_phy_reg_gpy()
965 return ret_val; in igc_write_phy_reg_gpy()
980 s32 ret_val; in igc_read_phy_reg_gpy() local
988 ret_val = hw->phy.ops.acquire(hw); in igc_read_phy_reg_gpy()
989 if (ret_val) in igc_read_phy_reg_gpy()
990 return ret_val; in igc_read_phy_reg_gpy()
991 ret_val = igc_read_phy_reg_mdic(hw, offset, data); in igc_read_phy_reg_gpy()
992 if (ret_val) in igc_read_phy_reg_gpy()
993 return ret_val; in igc_read_phy_reg_gpy()
996 ret_val = igc_read_xmdio_reg(hw, (u16)offset, dev_addr, in igc_read_phy_reg_gpy()
999 return ret_val; in igc_read_phy_reg_gpy()
1014 s32 ret_val; in __igc_access_xmdio_reg() local
1018 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, dev_addr); in __igc_access_xmdio_reg()
1019 if (ret_val) in __igc_access_xmdio_reg()
1020 return ret_val; in __igc_access_xmdio_reg()
1022 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAAD, address); in __igc_access_xmdio_reg()
1023 if (ret_val) in __igc_access_xmdio_reg()
1024 return ret_val; in __igc_access_xmdio_reg()
1026 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, IGC_MMDAC_FUNC_DATA | in __igc_access_xmdio_reg()
1028 if (ret_val) in __igc_access_xmdio_reg()
1029 return ret_val; in __igc_access_xmdio_reg()
1032 ret_val = hw->phy.ops.read_reg(hw, IGC_MMDAAD, data); in __igc_access_xmdio_reg()
1034 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAAD, *data); in __igc_access_xmdio_reg()
1035 if (ret_val) in __igc_access_xmdio_reg()
1036 return ret_val; in __igc_access_xmdio_reg()
1039 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, 0); in __igc_access_xmdio_reg()
1040 if (ret_val) in __igc_access_xmdio_reg()
1041 return ret_val; in __igc_access_xmdio_reg()
1043 return ret_val; in __igc_access_xmdio_reg()