Lines Matching defs:ret_val

228 	s32 ret_val = E1000_SUCCESS;
238 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
239 if (ret_val)
240 return ret_val;
244 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
245 if (ret_val)
246 return ret_val;
268 s32 ret_val;
275 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xC1);
276 if (ret_val)
277 return ret_val;
657 s32 ret_val;
664 ret_val = hw->phy.ops.acquire(hw);
665 if (ret_val)
666 return ret_val;
668 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
673 return ret_val;
687 s32 ret_val;
694 ret_val = hw->phy.ops.acquire(hw);
695 if (ret_val)
696 return ret_val;
698 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
703 return ret_val;
740 s32 ret_val = E1000_SUCCESS;
748 ret_val = hw->phy.ops.acquire(hw);
749 if (ret_val)
750 return ret_val;
754 ret_val = e1000_write_phy_reg_mdic(hw,
757 if (!ret_val)
758 ret_val = e1000_read_phy_reg_mdic(hw,
764 return ret_val;
809 s32 ret_val = E1000_SUCCESS;
817 ret_val = hw->phy.ops.acquire(hw);
818 if (ret_val)
819 return ret_val;
823 ret_val = e1000_write_phy_reg_mdic(hw,
826 if (!ret_val)
827 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS &
833 return ret_val;
883 s32 ret_val = E1000_SUCCESS;
888 ret_val = hw->phy.ops.acquire(hw);
889 if (ret_val)
890 return ret_val;
958 s32 ret_val = E1000_SUCCESS;
963 ret_val = hw->phy.ops.acquire(hw);
964 if (ret_val)
965 return ret_val;
1017 s32 ret_val;
1021 ret_val = hw->phy.ops.read_reg(hw, PHY_1000T_CTRL, &phy_data);
1022 if (ret_val)
1023 return ret_val;
1057 s32 ret_val;
1063 ret_val = hw->phy.ops.reset(hw);
1064 if (ret_val) {
1066 return ret_val;
1071 ret_val = hw->phy.ops.read_reg(hw, I82577_CFG_REG, &phy_data);
1072 if (ret_val)
1073 return ret_val;
1080 ret_val = hw->phy.ops.write_reg(hw, I82577_CFG_REG, phy_data);
1081 if (ret_val)
1082 return ret_val;
1085 ret_val = hw->phy.ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data);
1086 if (ret_val)
1087 return ret_val;
1106 ret_val = hw->phy.ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data);
1107 if (ret_val)
1108 return ret_val;
1123 s32 ret_val;
1130 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1131 if (ret_val)
1132 return ret_val;
1179 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1181 if (ret_val)
1182 return ret_val;
1184 ret_val = phy->ops.commit(hw);
1185 if (ret_val) {
1187 return ret_val;
1194 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1195 if (ret_val)
1196 return ret_val;
1204 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1206 if (ret_val)
1207 return ret_val;
1223 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1225 if (ret_val)
1226 return ret_val;
1231 ret_val = phy->ops.write_reg(hw, 29, 0x0003);
1232 if (ret_val)
1233 return ret_val;
1236 ret_val = phy->ops.write_reg(hw, 30, 0x0000);
1237 if (ret_val)
1238 return ret_val;
1242 ret_val = phy->ops.commit(hw);
1243 if (ret_val) {
1245 return ret_val;
1249 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1251 if (ret_val)
1252 return ret_val;
1257 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1259 if (ret_val)
1260 return ret_val;
1276 s32 ret_val;
1283 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1284 if (ret_val)
1285 return ret_val;
1330 ret_val =
1332 if (ret_val)
1333 return ret_val;
1335 ret_val = phy->ops.commit(hw);
1336 if (ret_val) {
1338 return ret_val;
1346 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1347 if (ret_val)
1348 return ret_val;
1351 ret_val = phy->ops.commit(hw);
1352 if (ret_val) {
1354 return ret_val;
1357 ret_val = e1000_set_master_slave_mode(hw);
1358 if (ret_val)
1359 return ret_val;
1374 s32 ret_val;
1380 ret_val = hw->phy.ops.reset(hw);
1381 if (ret_val) {
1383 return ret_val;
1396 ret_val = hw->phy.ops.set_d3_lplu_state(hw, false);
1397 if (ret_val) {
1399 return ret_val;
1405 ret_val = hw->phy.ops.set_d0_lplu_state(hw, false);
1406 if (ret_val) {
1408 return ret_val;
1412 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &data);
1413 if (ret_val)
1414 return ret_val;
1431 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, data);
1432 if (ret_val)
1433 return ret_val;
1443 ret_val = phy->ops.read_reg(hw,
1446 if (ret_val)
1447 return ret_val;
1450 ret_val = phy->ops.write_reg(hw,
1453 if (ret_val)
1454 return ret_val;
1457 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data);
1458 if (ret_val)
1459 return ret_val;
1462 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data);
1463 if (ret_val)
1464 return ret_val;
1467 ret_val = e1000_set_master_slave_mode(hw);
1470 return ret_val;
1485 s32 ret_val;
1494 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg);
1495 if (ret_val)
1496 return ret_val;
1500 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL,
1502 if (ret_val)
1503 return ret_val;
1613 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg);
1614 if (ret_val)
1615 return ret_val;
1620 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
1623 return ret_val;
1638 s32 ret_val;
1655 ret_val = e1000_phy_setup_autoneg(hw);
1656 if (ret_val) {
1658 return ret_val;
1665 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
1666 if (ret_val)
1667 return ret_val;
1670 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
1671 if (ret_val)
1672 return ret_val;
1678 ret_val = e1000_wait_autoneg(hw);
1679 if (ret_val) {
1681 return ret_val;
1687 return ret_val;
1701 s32 ret_val;
1710 ret_val = e1000_copper_link_autoneg(hw);
1711 if (ret_val)
1712 return ret_val;
1718 ret_val = hw->phy.ops.force_speed_duplex(hw);
1719 if (ret_val) {
1721 return ret_val;
1728 ret_val = e1000_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10,
1730 if (ret_val)
1731 return ret_val;
1736 ret_val = e1000_config_fc_after_link_up_generic(hw);
1741 return ret_val;
1755 s32 ret_val;
1761 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1762 if (ret_val)
1763 return ret_val;
1767 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1768 if (ret_val)
1769 return ret_val;
1774 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data);
1775 if (ret_val)
1776 return ret_val;
1781 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data);
1782 if (ret_val)
1783 return ret_val;
1792 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1794 if (ret_val)
1795 return ret_val;
1801 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1805 return ret_val;
1821 s32 ret_val;
1832 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
1834 if (ret_val)
1835 return ret_val;
1838 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1840 if (ret_val)
1841 return ret_val;
1846 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1847 if (ret_val)
1848 return ret_val;
1852 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1853 if (ret_val)
1854 return ret_val;
1857 ret_val = hw->phy.ops.commit(hw);
1858 if (ret_val)
1859 return ret_val;
1864 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1866 if (ret_val)
1867 return ret_val;
1893 ret_val = phy->ops.write_reg(hw,
1896 if (ret_val)
1897 return ret_val;
1898 ret_val = e1000_phy_reset_dsp_generic(hw);
1899 if (ret_val)
1900 return ret_val;
1905 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1907 if (ret_val)
1908 return ret_val;
1923 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data);
1924 if (ret_val)
1925 return ret_val;
1932 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
1933 if (ret_val)
1934 return ret_val;
1939 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1940 if (ret_val)
1941 return ret_val;
1944 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1946 return ret_val;
1960 s32 ret_val;
1966 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &data);
1967 if (ret_val)
1968 return ret_val;
1972 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, data);
1973 if (ret_val)
1974 return ret_val;
1977 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
1978 if (ret_val)
1979 return ret_val;
1984 ret_val = phy->ops.write_reg(hw, IFE_PHY_MDIX_CONTROL, data);
1985 if (ret_val)
1986 return ret_val;
1995 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1997 if (ret_val)
1998 return ret_val;
2004 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
2006 if (ret_val)
2007 return ret_val;
2091 s32 ret_val;
2099 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data);
2100 if (ret_val)
2101 return ret_val;
2105 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
2107 if (ret_val)
2108 return ret_val;
2115 ret_val = phy->ops.read_reg(hw,
2118 if (ret_val)
2119 return ret_val;
2122 ret_val = phy->ops.write_reg(hw,
2125 if (ret_val)
2126 return ret_val;
2128 ret_val = phy->ops.read_reg(hw,
2131 if (ret_val)
2132 return ret_val;
2135 ret_val = phy->ops.write_reg(hw,
2138 if (ret_val)
2139 return ret_val;
2145 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
2147 if (ret_val)
2148 return ret_val;
2151 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
2153 if (ret_val)
2154 return ret_val;
2157 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
2161 return ret_val;
2175 s32 ret_val;
2201 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
2203 if (!ret_val)
2206 return ret_val;
2220 s32 ret_val;
2225 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &data);
2227 if (!ret_val)
2232 return ret_val;
2247 s32 ret_val;
2255 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2256 if (ret_val)
2257 return ret_val;
2271 ret_val = phy->ops.read_reg(hw, offset, &data);
2273 if (!ret_val)
2278 return ret_val;
2290 s32 ret_val;
2305 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
2307 if (!ret_val)
2312 return ret_val;
2324 s32 ret_val = E1000_SUCCESS;
2334 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2335 if (ret_val)
2337 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2338 if (ret_val)
2348 return ret_val;
2363 s32 ret_val = E1000_SUCCESS;
2376 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2377 if (ret_val) {
2387 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2388 if (ret_val)
2400 return ret_val;
2421 s32 ret_val;
2426 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2427 if (ret_val)
2428 return ret_val;
2447 s32 ret_val;
2456 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) +
2459 if (ret_val)
2460 return ret_val;
2463 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) +
2465 if (ret_val)
2466 return ret_val;
2480 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT,
2482 if (ret_val)
2483 return ret_val;
2485 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x07);
2486 if (ret_val)
2487 return ret_val;
2490 ret_val = phy->ops.read_reg(hw, (I347AT4_PCDL + phy->addr),
2492 if (ret_val)
2493 return ret_val;
2496 ret_val = phy->ops.read_reg(hw, I347AT4_PCDC, &phy_data2);
2497 if (ret_val)
2498 return ret_val;
2508 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
2510 if (ret_val)
2511 return ret_val;
2516 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT,
2518 if (ret_val)
2519 return ret_val;
2521 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x05);
2522 if (ret_val)
2523 return ret_val;
2525 ret_val = phy->ops.read_reg(hw, M88E1112_VCT_DSP_DISTANCE,
2527 if (ret_val)
2528 return ret_val;
2543 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
2545 if (ret_val)
2546 return ret_val;
2553 return ret_val;
2570 s32 ret_val;
2585 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &phy_data);
2586 if (ret_val)
2587 return ret_val;
2640 s32 ret_val;
2651 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2652 if (ret_val)
2653 return ret_val;
2660 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
2661 if (ret_val)
2662 return ret_val;
2667 ret_val = e1000_check_polarity_m88(hw);
2668 if (ret_val)
2669 return ret_val;
2671 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2672 if (ret_val)
2673 return ret_val;
2678 ret_val = hw->phy.ops.get_cable_length(hw);
2679 if (ret_val)
2680 return ret_val;
2682 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data);
2683 if (ret_val)
2684 return ret_val;
2700 return ret_val;
2715 s32 ret_val;
2721 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2722 if (ret_val)
2723 return ret_val;
2732 ret_val = e1000_check_polarity_igp(hw);
2733 if (ret_val)
2734 return ret_val;
2736 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2737 if (ret_val)
2738 return ret_val;
2744 ret_val = phy->ops.get_cable_length(hw);
2745 if (ret_val)
2746 return ret_val;
2748 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
2749 if (ret_val)
2750 return ret_val;
2765 return ret_val;
2777 s32 ret_val;
2783 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2784 if (ret_val)
2785 return ret_val;
2792 ret_val = phy->ops.read_reg(hw, IFE_PHY_SPECIAL_CONTROL, &data);
2793 if (ret_val)
2794 return ret_val;
2798 ret_val = e1000_check_polarity_ife(hw);
2799 if (ret_val)
2800 return ret_val;
2808 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
2809 if (ret_val)
2810 return ret_val;
2831 s32 ret_val;
2839 ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
2840 if (ret_val)
2841 return ret_val;
2844 ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
2845 if (ret_val)
2846 return ret_val;
2850 return ret_val;
2865 s32 ret_val;
2871 ret_val = phy->ops.check_reset_block(hw);
2872 if (ret_val)
2876 ret_val = phy->ops.acquire(hw);
2877 if (ret_val)
2878 return ret_val;
3126 s32 ret_val;
3131 ret_val = hw->phy.ops.acquire(hw);
3132 if (ret_val)
3133 return ret_val;
3137 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3160 ret_val = e1000_write_phy_reg_mdic(hw, page_select,
3162 if (ret_val)
3166 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3171 return ret_val;
3186 s32 ret_val;
3191 ret_val = hw->phy.ops.acquire(hw);
3192 if (ret_val)
3193 return ret_val;
3197 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3220 ret_val = e1000_write_phy_reg_mdic(hw, page_select,
3222 if (ret_val)
3226 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3230 return ret_val;
3245 s32 ret_val;
3250 ret_val = hw->phy.ops.acquire(hw);
3251 if (ret_val)
3252 return ret_val;
3256 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3265 ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
3268 if (ret_val)
3272 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3276 return ret_val;
3290 s32 ret_val;
3295 ret_val = hw->phy.ops.acquire(hw);
3296 if (ret_val)
3297 return ret_val;
3301 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3310 ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
3313 if (ret_val)
3317 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3322 return ret_val;
3335 s32 ret_val;
3347 ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
3348 if (ret_val) {
3350 return ret_val;
3353 ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
3354 if (ret_val) {
3357 return ret_val;
3367 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, temp);
3368 if (ret_val) {
3371 return ret_val;
3393 s32 ret_val;
3401 ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
3402 if (ret_val) {
3404 return ret_val;
3408 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, *phy_reg);
3409 if (ret_val)
3413 return ret_val;
3444 s32 ret_val;
3459 ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
3460 if (ret_val) {
3462 return ret_val;
3469 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ADDRESS_OPCODE, reg);
3470 if (ret_val) {
3472 return ret_val;
3477 ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
3481 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
3485 if (ret_val) {
3487 return ret_val;
3491 ret_val = e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
3493 return ret_val;
3548 s32 ret_val;
3556 ret_val = hw->phy.ops.acquire(hw);
3557 if (ret_val)
3558 return ret_val;
3562 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3568 ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
3579 ret_val = e1000_set_page_igp(hw,
3584 if (ret_val)
3592 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
3598 return ret_val;
3658 s32 ret_val;
3666 ret_val = hw->phy.ops.acquire(hw);
3667 if (ret_val)
3668 return ret_val;
3672 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3678 ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
3696 ret_val = e1000_access_phy_debug_regs_hv(hw,
3699 if (ret_val)
3705 ret_val = e1000_set_page_igp(hw,
3710 if (ret_val)
3718 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
3725 return ret_val;
3799 s32 ret_val;
3814 ret_val = e1000_write_phy_reg_mdic(hw, addr_reg, (u16)offset & 0x3F);
3815 if (ret_val) {
3817 return ret_val;
3822 ret_val = e1000_read_phy_reg_mdic(hw, data_reg, data);
3824 ret_val = e1000_write_phy_reg_mdic(hw, data_reg, *data);
3826 if (ret_val)
3829 return ret_val;
3845 s32 ret_val = E1000_SUCCESS;
3859 ret_val = hw->phy.ops.read_reg(hw, BM_CS_STATUS, &data);
3860 if (ret_val)
3861 return ret_val;
3873 ret_val = hw->phy.ops.write_reg(hw, HV_MUX_DATA_CTRL,
3876 if (ret_val)
3877 return ret_val;
3894 s32 ret_val;
3899 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
3901 if (!ret_val)
3906 return ret_val;
3918 s32 ret_val;
3924 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
3925 if (ret_val)
3926 return ret_val;
3930 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
3931 if (ret_val)
3932 return ret_val;
3939 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
3941 if (ret_val)
3942 return ret_val;
3948 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
3952 return ret_val;
3967 s32 ret_val;
3973 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
3974 if (ret_val)
3975 return ret_val;
3984 ret_val = e1000_check_polarity_82577(hw);
3985 if (ret_val)
3986 return ret_val;
3988 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
3989 if (ret_val)
3990 return ret_val;
3996 ret_val = hw->phy.ops.get_cable_length(hw);
3997 if (ret_val)
3998 return ret_val;
4000 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
4001 if (ret_val)
4002 return ret_val;
4030 s32 ret_val;
4035 ret_val = phy->ops.read_reg(hw, I82577_PHY_DIAG_STATUS, &phy_data);
4036 if (ret_val)
4037 return ret_val;
4061 s32 ret_val;
4067 ret_val = hw->phy.ops.acquire(hw);
4068 if (ret_val)
4069 return ret_val;
4071 ret_val = e1000_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page);
4072 if (ret_val)
4074 ret_val = e1000_write_phy_reg_mdic(hw, offset, data);
4078 return ret_val;
4093 s32 ret_val;
4099 ret_val = hw->phy.ops.acquire(hw);
4100 if (ret_val)
4101 return ret_val;
4103 ret_val = e1000_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page);
4104 if (ret_val)
4106 ret_val = e1000_read_phy_reg_mdic(hw, offset, data);
4110 return ret_val;
4279 s32 ret_val;
4283 ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAC, dev_addr);
4284 if (ret_val)
4285 return ret_val;
4287 ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAAD, address);
4288 if (ret_val)
4289 return ret_val;
4291 ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAC, E1000_MMDAC_FUNC_DATA |
4293 if (ret_val)
4294 return ret_val;
4297 ret_val = hw->phy.ops.read_reg(hw, E1000_MMDAAD, data);
4299 ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAAD, *data);
4300 if (ret_val)
4301 return ret_val;
4304 ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAC, 0);
4305 if (ret_val)
4306 return ret_val;
4308 return ret_val;