Lines Matching refs:ret_val

34 	s32 ret_val = 0;  in igc_get_phy_id()  local
37 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); in igc_get_phy_id()
38 if (ret_val) in igc_get_phy_id()
43 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); in igc_get_phy_id()
44 if (ret_val) in igc_get_phy_id()
51 return ret_val; in igc_get_phy_id()
67 s32 ret_val = 0; in igc_phy_has_link() local
74 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_phy_has_link()
75 if (ret_val && usec_interval > 0) { in igc_phy_has_link()
85 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_phy_has_link()
86 if (ret_val) in igc_phy_has_link()
98 return ret_val; in igc_phy_has_link()
151 s32 ret_val; in igc_check_downshift() local
158 ret_val = 0; in igc_check_downshift()
161 return ret_val; in igc_check_downshift()
177 s32 ret_val; in igc_phy_hw_reset() local
180 ret_val = igc_check_reset_block(hw); in igc_phy_hw_reset()
181 if (ret_val) { in igc_phy_hw_reset()
182 ret_val = 0; in igc_phy_hw_reset()
186 ret_val = phy->ops.acquire(hw); in igc_phy_hw_reset()
187 if (ret_val) in igc_phy_hw_reset()
217 return ret_val; in igc_phy_hw_reset()
235 s32 ret_val; in igc_phy_setup_autoneg() local
240 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); in igc_phy_setup_autoneg()
241 if (ret_val) in igc_phy_setup_autoneg()
242 return ret_val; in igc_phy_setup_autoneg()
246 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, in igc_phy_setup_autoneg()
248 if (ret_val) in igc_phy_setup_autoneg()
249 return ret_val; in igc_phy_setup_autoneg()
255 ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << in igc_phy_setup_autoneg()
260 if (ret_val) in igc_phy_setup_autoneg()
261 return ret_val; in igc_phy_setup_autoneg()
383 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); in igc_phy_setup_autoneg()
384 if (ret_val) in igc_phy_setup_autoneg()
385 return ret_val; in igc_phy_setup_autoneg()
390 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, in igc_phy_setup_autoneg()
395 ret_val = phy->ops.write_reg(hw, in igc_phy_setup_autoneg()
401 return ret_val; in igc_phy_setup_autoneg()
414 s32 ret_val = 0; in igc_wait_autoneg() local
418 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_wait_autoneg()
419 if (ret_val) in igc_wait_autoneg()
421 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); in igc_wait_autoneg()
422 if (ret_val) in igc_wait_autoneg()
432 return ret_val; in igc_wait_autoneg()
448 s32 ret_val; in igc_copper_link_autoneg() local
462 ret_val = igc_phy_setup_autoneg(hw); in igc_copper_link_autoneg()
463 if (ret_val) { in igc_copper_link_autoneg()
472 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl); in igc_copper_link_autoneg()
473 if (ret_val) in igc_copper_link_autoneg()
477 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl); in igc_copper_link_autoneg()
478 if (ret_val) in igc_copper_link_autoneg()
485 ret_val = igc_wait_autoneg(hw); in igc_copper_link_autoneg()
486 if (ret_val) { in igc_copper_link_autoneg()
495 return ret_val; in igc_copper_link_autoneg()
509 s32 ret_val = 0; in igc_setup_copper_link() local
516 ret_val = igc_copper_link_autoneg(hw); in igc_setup_copper_link()
517 if (ret_val) in igc_setup_copper_link()
524 ret_val = hw->phy.ops.force_speed_duplex(hw); in igc_setup_copper_link()
525 if (ret_val) { in igc_setup_copper_link()
534 ret_val = igc_phy_has_link(hw, COPPER_LINK_UP_LIMIT, 10, &link); in igc_setup_copper_link()
535 if (ret_val) in igc_setup_copper_link()
541 ret_val = igc_config_fc_after_link_up(hw); in igc_setup_copper_link()
547 return ret_val; in igc_setup_copper_link()
563 s32 ret_val = 0; in igc_read_phy_reg_mdic() local
567 ret_val = -IGC_ERR_PARAM; in igc_read_phy_reg_mdic()
593 ret_val = -IGC_ERR_PHY; in igc_read_phy_reg_mdic()
598 ret_val = -IGC_ERR_PHY; in igc_read_phy_reg_mdic()
604 return ret_val; in igc_read_phy_reg_mdic()
619 s32 ret_val = 0; in igc_write_phy_reg_mdic() local
623 ret_val = -IGC_ERR_PARAM; in igc_write_phy_reg_mdic()
650 ret_val = -IGC_ERR_PHY; in igc_write_phy_reg_mdic()
655 ret_val = -IGC_ERR_PHY; in igc_write_phy_reg_mdic()
660 return ret_val; in igc_write_phy_reg_mdic()
674 s32 ret_val; in __igc_access_xmdio_reg() local
676 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, dev_addr); in __igc_access_xmdio_reg()
677 if (ret_val) in __igc_access_xmdio_reg()
678 return ret_val; in __igc_access_xmdio_reg()
680 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAAD, address); in __igc_access_xmdio_reg()
681 if (ret_val) in __igc_access_xmdio_reg()
682 return ret_val; in __igc_access_xmdio_reg()
684 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, IGC_MMDAC_FUNC_DATA | in __igc_access_xmdio_reg()
686 if (ret_val) in __igc_access_xmdio_reg()
687 return ret_val; in __igc_access_xmdio_reg()
690 ret_val = hw->phy.ops.read_reg(hw, IGC_MMDAAD, data); in __igc_access_xmdio_reg()
692 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAAD, *data); in __igc_access_xmdio_reg()
693 if (ret_val) in __igc_access_xmdio_reg()
694 return ret_val; in __igc_access_xmdio_reg()
697 ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, 0); in __igc_access_xmdio_reg()
698 if (ret_val) in __igc_access_xmdio_reg()
699 return ret_val; in __igc_access_xmdio_reg()
701 return ret_val; in __igc_access_xmdio_reg()
742 s32 ret_val; in igc_write_phy_reg_gpy() local
747 ret_val = hw->phy.ops.acquire(hw); in igc_write_phy_reg_gpy()
748 if (ret_val) in igc_write_phy_reg_gpy()
749 return ret_val; in igc_write_phy_reg_gpy()
750 ret_val = igc_write_phy_reg_mdic(hw, offset, data); in igc_write_phy_reg_gpy()
751 if (ret_val) in igc_write_phy_reg_gpy()
752 return ret_val; in igc_write_phy_reg_gpy()
755 ret_val = igc_write_xmdio_reg(hw, (u16)offset, dev_addr, in igc_write_phy_reg_gpy()
759 return ret_val; in igc_write_phy_reg_gpy()
775 s32 ret_val; in igc_read_phy_reg_gpy() local
780 ret_val = hw->phy.ops.acquire(hw); in igc_read_phy_reg_gpy()
781 if (ret_val) in igc_read_phy_reg_gpy()
782 return ret_val; in igc_read_phy_reg_gpy()
783 ret_val = igc_read_phy_reg_mdic(hw, offset, data); in igc_read_phy_reg_gpy()
784 if (ret_val) in igc_read_phy_reg_gpy()
785 return ret_val; in igc_read_phy_reg_gpy()
788 ret_val = igc_read_xmdio_reg(hw, (u16)offset, dev_addr, in igc_read_phy_reg_gpy()
792 return ret_val; in igc_read_phy_reg_gpy()
803 u16 ret_val; in igc_read_phy_fw_version() local
806 ret_val = phy->ops.read_reg(hw, IGC_GPHY_VERSION, &gphy_version); in igc_read_phy_fw_version()
807 if (ret_val) in igc_read_phy_fw_version()