Lines Matching refs:ret_val

172 	s32 ret_val = E1000_SUCCESS;
180 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
181 if (ret_val)
186 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
187 if (ret_val)
194 return (ret_val);
206 s32 ret_val = E1000_SUCCESS;
213 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xC1);
214 if (ret_val)
217 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0);
220 return (ret_val);
237 s32 ret_val = E1000_SUCCESS;
265 ret_val = -E1000_ERR_PHY;
270 ret_val = -E1000_ERR_PHY;
276 return (ret_val);
292 s32 ret_val = E1000_SUCCESS;
321 ret_val = -E1000_ERR_PHY;
326 ret_val = -E1000_ERR_PHY;
331 return (ret_val);
448 s32 ret_val = E1000_SUCCESS;
455 ret_val = hw->phy.ops.acquire(hw);
456 if (ret_val)
459 ret_val = e1000_read_phy_reg_mdic(hw,
465 return (ret_val);
480 s32 ret_val = E1000_SUCCESS;
487 ret_val = hw->phy.ops.acquire(hw);
488 if (ret_val)
491 ret_val = e1000_write_phy_reg_mdic(hw,
497 return (ret_val);
515 s32 ret_val = E1000_SUCCESS;
523 ret_val = hw->phy.ops.acquire(hw);
524 if (ret_val)
529 ret_val = e1000_write_phy_reg_mdic(hw,
531 if (ret_val)
535 ret_val = e1000_read_phy_reg_mdic(hw,
543 return (ret_val);
591 s32 ret_val = E1000_SUCCESS;
599 ret_val = hw->phy.ops.acquire(hw);
600 if (ret_val)
605 ret_val = e1000_write_phy_reg_mdic(hw,
607 if (ret_val)
611 ret_val = e1000_write_phy_reg_mdic(hw,
619 return (ret_val);
667 s32 ret_val = E1000_SUCCESS;
675 ret_val = hw->phy.ops.acquire(hw);
676 if (ret_val)
693 return (ret_val);
743 s32 ret_val = E1000_SUCCESS;
751 ret_val = hw->phy.ops.acquire(hw);
752 if (ret_val)
766 return (ret_val);
809 s32 ret_val;
815 ret_val = E1000_SUCCESS;
820 ret_val = hw->phy.ops.reset(hw);
821 if (ret_val) {
828 ret_val = phy->ops.read_reg(hw, I82577_CFG_REG, &phy_data);
829 if (ret_val)
837 ret_val = phy->ops.write_reg(hw, I82577_CFG_REG, phy_data);
840 return (ret_val);
854 s32 ret_val;
860 ret_val = E1000_SUCCESS;
865 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
866 if (ret_val)
908 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
909 if (ret_val)
917 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
919 if (ret_val)
936 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
938 if (ret_val)
943 ret_val = phy->ops.commit(hw);
944 if (ret_val) {
950 return (ret_val);
964 s32 ret_val;
970 ret_val = E1000_SUCCESS;
974 ret_val = hw->phy.ops.reset(hw);
975 if (ret_val) {
992 ret_val = hw->phy.ops.set_d3_lplu_state(hw, false);
993 if (ret_val) {
1001 ret_val = hw->phy.ops.set_d0_lplu_state(hw, false);
1002 if (ret_val) {
1008 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &data);
1009 if (ret_val)
1026 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, data);
1027 if (ret_val)
1039 ret_val = phy->ops.read_reg(hw,
1041 if (ret_val)
1045 ret_val = phy->ops.write_reg(hw,
1047 if (ret_val)
1051 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data);
1052 if (ret_val)
1056 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data);
1057 if (ret_val)
1061 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data);
1062 if (ret_val)
1085 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data);
1086 if (ret_val)
1091 return (ret_val);
1107 s32 ret_val;
1126 ret_val = e1000_phy_setup_autoneg(hw);
1127 if (ret_val) {
1137 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
1138 if (ret_val)
1142 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
1143 if (ret_val)
1151 ret_val = hw->mac.ops.wait_autoneg(hw);
1152 if (ret_val) {
1162 return (ret_val);
1178 s32 ret_val;
1187 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg);
1188 if (ret_val)
1193 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL,
1195 if (ret_val)
1310 ret_val = -E1000_ERR_CONFIG;
1314 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg);
1315 if (ret_val)
1321 ret_val = phy->ops.write_reg(hw,
1323 if (ret_val)
1328 return (ret_val);
1343 s32 ret_val;
1353 ret_val = e1000_copper_link_autoneg(hw);
1354 if (ret_val)
1362 ret_val = hw->phy.ops.force_speed_duplex(hw);
1363 if (ret_val) {
1373 ret_val = e1000_phy_has_link_generic(hw,
1377 if (ret_val)
1383 ret_val = e1000_config_fc_after_link_up_generic(hw);
1389 return (ret_val);
1404 s32 ret_val;
1410 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1411 if (ret_val)
1416 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1417 if (ret_val)
1424 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data);
1425 if (ret_val)
1431 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data);
1432 if (ret_val)
1442 ret_val = e1000_phy_has_link_generic(hw,
1446 if (ret_val)
1453 ret_val = e1000_phy_has_link_generic(hw,
1457 if (ret_val)
1462 return (ret_val);
1479 s32 ret_val;
1489 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1490 if (ret_val)
1494 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1495 if (ret_val)
1500 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1501 if (ret_val)
1506 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1507 if (ret_val)
1511 ret_val = hw->phy.ops.commit(hw);
1512 if (ret_val)
1518 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1520 if (ret_val)
1528 ret_val = phy->ops.write_reg(hw,
1531 if (ret_val)
1533 ret_val = e1000_phy_reset_dsp_generic(hw);
1534 if (ret_val)
1539 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1541 if (ret_val)
1545 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data);
1546 if (ret_val)
1555 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
1556 if (ret_val)
1563 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1564 if (ret_val)
1568 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1571 return (ret_val);
1586 s32 ret_val;
1593 ret_val = e1000_phy_force_speed_duplex_igp(hw);
1597 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &data);
1598 if (ret_val)
1603 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, data);
1604 if (ret_val)
1608 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
1609 if (ret_val)
1615 ret_val = phy->ops.write_reg(hw, IFE_PHY_MDIX_CONTROL, data);
1616 if (ret_val)
1626 ret_val = e1000_phy_has_link_generic(hw,
1628 if (ret_val)
1635 ret_val = e1000_phy_has_link_generic(hw,
1637 if (ret_val)
1642 return (ret_val);
1726 s32 ret_val = E1000_SUCCESS;
1734 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data);
1735 if (ret_val)
1740 ret_val = phy->ops.write_reg(hw,
1743 if (ret_val)
1752 ret_val = phy->ops.read_reg(hw,
1755 if (ret_val)
1759 ret_val = phy->ops.write_reg(hw,
1762 if (ret_val)
1765 ret_val = phy->ops.read_reg(hw,
1768 if (ret_val)
1772 ret_val = phy->ops.write_reg(hw,
1775 if (ret_val)
1782 ret_val = phy->ops.write_reg(hw,
1785 if (ret_val)
1789 ret_val = phy->ops.read_reg(hw,
1792 if (ret_val)
1796 ret_val = phy->ops.write_reg(hw,
1802 return (ret_val);
1817 s32 ret_val;
1837 ret_val = E1000_SUCCESS;
1841 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
1843 if (!ret_val)
1847 return (ret_val);
1862 s32 ret_val;
1867 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &data);
1869 if (!ret_val)
1874 return (ret_val);
1890 s32 ret_val;
1899 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
1900 if (ret_val)
1916 ret_val = phy->ops.read_reg(hw, offset, &data);
1918 if (!ret_val)
1924 return (ret_val);
1937 s32 ret_val;
1953 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
1955 if (!ret_val)
1960 return (ret_val);
1972 s32 ret_val = E1000_SUCCESS;
1982 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
1983 if (ret_val)
1985 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
1986 if (ret_val)
1997 return (ret_val);
2013 s32 ret_val = E1000_SUCCESS;
2027 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2028 if (ret_val) {
2036 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2037 if (ret_val)
2049 return (ret_val);
2071 s32 ret_val;
2076 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2077 if (ret_val)
2083 ret_val = -E1000_ERR_PHY;
2094 return (ret_val);
2112 s32 ret_val = E1000_SUCCESS;
2126 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &phy_data);
2127 if (ret_val)
2142 ret_val = -E1000_ERR_PHY;
2169 return (ret_val);
2186 s32 ret_val;
2194 ret_val = -E1000_ERR_CONFIG;
2198 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2199 if (ret_val)
2204 ret_val = -E1000_ERR_CONFIG;
2208 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
2209 if (ret_val)
2215 ret_val = e1000_check_polarity_m88(hw);
2216 if (ret_val)
2219 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2220 if (ret_val)
2226 ret_val = hw->phy.ops.get_cable_length(hw);
2227 if (ret_val)
2230 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data);
2231 if (ret_val)
2249 return (ret_val);
2265 s32 ret_val;
2271 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2272 if (ret_val)
2277 ret_val = -E1000_ERR_CONFIG;
2283 ret_val = e1000_check_polarity_igp(hw);
2284 if (ret_val)
2287 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2288 if (ret_val)
2295 ret_val = phy->ops.get_cable_length(hw);
2296 if (ret_val)
2299 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
2300 if (ret_val)
2317 return (ret_val);
2330 s32 ret_val = E1000_SUCCESS;
2338 ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
2339 if (ret_val)
2343 ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
2344 if (ret_val)
2350 return (ret_val);
2366 s32 ret_val = E1000_SUCCESS;
2371 ret_val = phy->ops.check_reset_block(hw);
2372 if (ret_val) {
2373 ret_val = E1000_SUCCESS;
2377 ret_val = phy->ops.acquire(hw);
2378 if (ret_val)
2394 ret_val = phy->ops.get_cfg_done(hw);
2397 return (ret_val);
2557 s32 ret_val = -E1000_ERR_PHY_TYPE;
2577 ret_val = E1000_SUCCESS;
2586 return (ret_val);
2639 s32 ret_val;
2644 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
2646 if (!ret_val)
2651 return (ret_val);
2666 s32 ret_val;
2672 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
2673 if (ret_val)
2678 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
2679 if (ret_val)
2686 ret_val = phy->ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data);
2687 if (ret_val)
2693 ret_val = phy->ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data);
2694 if (ret_val)
2704 ret_val = e1000_phy_has_link_generic(hw,
2708 if (ret_val)
2715 ret_val = e1000_phy_has_link_generic(hw,
2719 if (ret_val)
2724 return (ret_val);
2740 s32 ret_val;
2746 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2747 if (ret_val)
2752 ret_val = -E1000_ERR_CONFIG;
2758 ret_val = e1000_check_polarity_82577(hw);
2759 if (ret_val)
2762 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
2763 if (ret_val)
2770 ret_val = hw->phy.ops.get_cable_length(hw);
2771 if (ret_val)
2774 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
2775 if (ret_val)
2792 return (ret_val);
2806 s32 ret_val;
2811 ret_val = phy->ops.read_reg(hw, I82577_PHY_DIAG_STATUS, &phy_data);
2812 if (ret_val)
2819 ret_val = -E1000_ERR_PHY;
2825 return (ret_val);