Lines Matching refs:ret_val

221 	s32 ret_val = E1000_SUCCESS;
231 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
232 if (ret_val)
233 return ret_val;
237 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
238 if (ret_val)
239 return ret_val;
261 s32 ret_val;
268 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xC1);
269 if (ret_val)
270 return ret_val;
650 s32 ret_val;
657 ret_val = hw->phy.ops.acquire(hw);
658 if (ret_val)
659 return ret_val;
661 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
666 return ret_val;
680 s32 ret_val;
687 ret_val = hw->phy.ops.acquire(hw);
688 if (ret_val)
689 return ret_val;
691 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
696 return ret_val;
733 s32 ret_val = E1000_SUCCESS;
741 ret_val = hw->phy.ops.acquire(hw);
742 if (ret_val)
743 return ret_val;
747 ret_val = e1000_write_phy_reg_mdic(hw,
750 if (!ret_val)
751 ret_val = e1000_read_phy_reg_mdic(hw,
757 return ret_val;
802 s32 ret_val = E1000_SUCCESS;
810 ret_val = hw->phy.ops.acquire(hw);
811 if (ret_val)
812 return ret_val;
816 ret_val = e1000_write_phy_reg_mdic(hw,
819 if (!ret_val)
820 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS &
826 return ret_val;
876 s32 ret_val = E1000_SUCCESS;
881 ret_val = hw->phy.ops.acquire(hw);
882 if (ret_val)
883 return ret_val;
951 s32 ret_val = E1000_SUCCESS;
956 ret_val = hw->phy.ops.acquire(hw);
957 if (ret_val)
958 return ret_val;
1010 s32 ret_val;
1014 ret_val = hw->phy.ops.read_reg(hw, PHY_1000T_CTRL, &phy_data);
1015 if (ret_val)
1016 return ret_val;
1050 s32 ret_val;
1056 ret_val = hw->phy.ops.reset(hw);
1057 if (ret_val) {
1059 return ret_val;
1064 ret_val = hw->phy.ops.read_reg(hw, I82577_CFG_REG, &phy_data);
1065 if (ret_val)
1066 return ret_val;
1073 ret_val = hw->phy.ops.write_reg(hw, I82577_CFG_REG, phy_data);
1074 if (ret_val)
1075 return ret_val;
1078 ret_val = hw->phy.ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data);
1079 if (ret_val)
1080 return ret_val;
1098 ret_val = hw->phy.ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data);
1099 if (ret_val)
1100 return ret_val;
1115 s32 ret_val;
1122 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1123 if (ret_val)
1124 return ret_val;
1170 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1172 if (ret_val)
1173 return ret_val;
1175 ret_val = phy->ops.commit(hw);
1176 if (ret_val) {
1178 return ret_val;
1185 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1186 if (ret_val)
1187 return ret_val;
1195 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1197 if (ret_val)
1198 return ret_val;
1214 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1216 if (ret_val)
1217 return ret_val;
1222 ret_val = phy->ops.write_reg(hw, 29, 0x0003);
1223 if (ret_val)
1224 return ret_val;
1227 ret_val = phy->ops.write_reg(hw, 30, 0x0000);
1228 if (ret_val)
1229 return ret_val;
1233 ret_val = phy->ops.commit(hw);
1234 if (ret_val) {
1236 return ret_val;
1240 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1242 if (ret_val)
1243 return ret_val;
1248 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1250 if (ret_val)
1251 return ret_val;
1267 s32 ret_val;
1274 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1275 if (ret_val)
1276 return ret_val;
1319 ret_val =
1321 if (ret_val)
1322 return ret_val;
1324 ret_val = phy->ops.commit(hw);
1325 if (ret_val) {
1327 return ret_val;
1335 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1336 if (ret_val)
1337 return ret_val;
1340 ret_val = phy->ops.commit(hw);
1341 if (ret_val) {
1343 return ret_val;
1346 ret_val = e1000_set_master_slave_mode(hw);
1347 if (ret_val)
1348 return ret_val;
1363 s32 ret_val;
1369 ret_val = hw->phy.ops.reset(hw);
1370 if (ret_val) {
1372 return ret_val;
1385 ret_val = hw->phy.ops.set_d3_lplu_state(hw, FALSE);
1386 if (ret_val) {
1388 return ret_val;
1394 ret_val = hw->phy.ops.set_d0_lplu_state(hw, FALSE);
1395 if (ret_val) {
1397 return ret_val;
1401 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &data);
1402 if (ret_val)
1403 return ret_val;
1419 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, data);
1420 if (ret_val)
1421 return ret_val;
1431 ret_val = phy->ops.read_reg(hw,
1434 if (ret_val)
1435 return ret_val;
1438 ret_val = phy->ops.write_reg(hw,
1441 if (ret_val)
1442 return ret_val;
1445 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data);
1446 if (ret_val)
1447 return ret_val;
1450 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data);
1451 if (ret_val)
1452 return ret_val;
1455 ret_val = e1000_set_master_slave_mode(hw);
1458 return ret_val;
1473 s32 ret_val;
1482 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg);
1483 if (ret_val)
1484 return ret_val;
1488 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL,
1490 if (ret_val)
1491 return ret_val;
1601 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg);
1602 if (ret_val)
1603 return ret_val;
1608 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
1611 return ret_val;
1626 s32 ret_val;
1643 ret_val = e1000_phy_setup_autoneg(hw);
1644 if (ret_val) {
1646 return ret_val;
1653 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
1654 if (ret_val)
1655 return ret_val;
1658 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
1659 if (ret_val)
1660 return ret_val;
1666 ret_val = e1000_wait_autoneg(hw);
1667 if (ret_val) {
1669 return ret_val;
1675 return ret_val;
1689 s32 ret_val;
1698 ret_val = e1000_copper_link_autoneg(hw);
1699 if (ret_val)
1700 return ret_val;
1706 ret_val = hw->phy.ops.force_speed_duplex(hw);
1707 if (ret_val) {
1709 return ret_val;
1716 ret_val = e1000_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10,
1718 if (ret_val)
1719 return ret_val;
1724 ret_val = e1000_config_fc_after_link_up_generic(hw);
1729 return ret_val;
1743 s32 ret_val;
1749 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1750 if (ret_val)
1751 return ret_val;
1755 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1756 if (ret_val)
1757 return ret_val;
1762 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data);
1763 if (ret_val)
1764 return ret_val;
1769 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data);
1770 if (ret_val)
1771 return ret_val;
1780 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1782 if (ret_val)
1783 return ret_val;
1789 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1793 return ret_val;
1809 s32 ret_val;
1820 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
1822 if (ret_val)
1823 return ret_val;
1826 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1828 if (ret_val)
1829 return ret_val;
1834 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1835 if (ret_val)
1836 return ret_val;
1840 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1841 if (ret_val)
1842 return ret_val;
1845 ret_val = hw->phy.ops.commit(hw);
1846 if (ret_val)
1847 return ret_val;
1852 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1854 if (ret_val)
1855 return ret_val;
1881 ret_val = phy->ops.write_reg(hw,
1884 if (ret_val)
1885 return ret_val;
1886 ret_val = e1000_phy_reset_dsp_generic(hw);
1887 if (ret_val)
1888 return ret_val;
1893 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1895 if (ret_val)
1896 return ret_val;
1911 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data);
1912 if (ret_val)
1913 return ret_val;
1920 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
1921 if (ret_val)
1922 return ret_val;
1927 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1928 if (ret_val)
1929 return ret_val;
1932 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1934 return ret_val;
1948 s32 ret_val;
1954 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &data);
1955 if (ret_val)
1956 return ret_val;
1960 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, data);
1961 if (ret_val)
1962 return ret_val;
1965 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
1966 if (ret_val)
1967 return ret_val;
1972 ret_val = phy->ops.write_reg(hw, IFE_PHY_MDIX_CONTROL, data);
1973 if (ret_val)
1974 return ret_val;
1983 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1985 if (ret_val)
1986 return ret_val;
1992 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1994 if (ret_val)
1995 return ret_val;
2079 s32 ret_val;
2087 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data);
2088 if (ret_val)
2089 return ret_val;
2093 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
2095 if (ret_val)
2096 return ret_val;
2103 ret_val = phy->ops.read_reg(hw,
2106 if (ret_val)
2107 return ret_val;
2110 ret_val = phy->ops.write_reg(hw,
2113 if (ret_val)
2114 return ret_val;
2116 ret_val = phy->ops.read_reg(hw,
2119 if (ret_val)
2120 return ret_val;
2123 ret_val = phy->ops.write_reg(hw,
2126 if (ret_val)
2127 return ret_val;
2133 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
2135 if (ret_val)
2136 return ret_val;
2139 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
2141 if (ret_val)
2142 return ret_val;
2145 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
2149 return ret_val;
2163 s32 ret_val;
2189 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
2191 if (!ret_val)
2194 return ret_val;
2208 s32 ret_val;
2213 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &data);
2215 if (!ret_val)
2220 return ret_val;
2235 s32 ret_val;
2243 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2244 if (ret_val)
2245 return ret_val;
2259 ret_val = phy->ops.read_reg(hw, offset, &data);
2261 if (!ret_val)
2266 return ret_val;
2278 s32 ret_val;
2293 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
2295 if (!ret_val)
2300 return ret_val;
2312 s32 ret_val = E1000_SUCCESS;
2322 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2323 if (ret_val)
2325 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2326 if (ret_val)
2336 return ret_val;
2351 s32 ret_val = E1000_SUCCESS;
2364 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2365 if (ret_val) {
2375 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2376 if (ret_val)
2388 return ret_val;
2409 s32 ret_val;
2414 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2415 if (ret_val)
2416 return ret_val;
2435 s32 ret_val;
2444 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) +
2447 if (ret_val)
2448 return ret_val;
2451 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) +
2453 if (ret_val)
2454 return ret_val;
2468 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT,
2470 if (ret_val)
2471 return ret_val;
2473 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x07);
2474 if (ret_val)
2475 return ret_val;
2478 ret_val = phy->ops.read_reg(hw, (I347AT4_PCDL + phy->addr),
2480 if (ret_val)
2481 return ret_val;
2484 ret_val = phy->ops.read_reg(hw, I347AT4_PCDC, &phy_data2);
2485 if (ret_val)
2486 return ret_val;
2496 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
2498 if (ret_val)
2499 return ret_val;
2504 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT,
2506 if (ret_val)
2507 return ret_val;
2509 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x05);
2510 if (ret_val)
2511 return ret_val;
2513 ret_val = phy->ops.read_reg(hw, M88E1112_VCT_DSP_DISTANCE,
2515 if (ret_val)
2516 return ret_val;
2531 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
2533 if (ret_val)
2534 return ret_val;
2541 return ret_val;
2558 s32 ret_val;
2573 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &phy_data);
2574 if (ret_val)
2575 return ret_val;
2628 s32 ret_val;
2639 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2640 if (ret_val)
2641 return ret_val;
2648 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
2649 if (ret_val)
2650 return ret_val;
2655 ret_val = e1000_check_polarity_m88(hw);
2656 if (ret_val)
2657 return ret_val;
2659 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2660 if (ret_val)
2661 return ret_val;
2666 ret_val = hw->phy.ops.get_cable_length(hw);
2667 if (ret_val)
2668 return ret_val;
2670 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data);
2671 if (ret_val)
2672 return ret_val;
2688 return ret_val;
2703 s32 ret_val;
2709 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2710 if (ret_val)
2711 return ret_val;
2720 ret_val = e1000_check_polarity_igp(hw);
2721 if (ret_val)
2722 return ret_val;
2724 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2725 if (ret_val)
2726 return ret_val;
2732 ret_val = phy->ops.get_cable_length(hw);
2733 if (ret_val)
2734 return ret_val;
2736 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
2737 if (ret_val)
2738 return ret_val;
2753 return ret_val;
2765 s32 ret_val;
2771 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2772 if (ret_val)
2773 return ret_val;
2780 ret_val = phy->ops.read_reg(hw, IFE_PHY_SPECIAL_CONTROL, &data);
2781 if (ret_val)
2782 return ret_val;
2786 ret_val = e1000_check_polarity_ife(hw);
2787 if (ret_val)
2788 return ret_val;
2796 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
2797 if (ret_val)
2798 return ret_val;
2819 s32 ret_val;
2827 ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
2828 if (ret_val)
2829 return ret_val;
2832 ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
2833 if (ret_val)
2834 return ret_val;
2838 return ret_val;
2853 s32 ret_val;
2859 ret_val = phy->ops.check_reset_block(hw);
2860 if (ret_val)
2864 ret_val = phy->ops.acquire(hw);
2865 if (ret_val)
2866 return ret_val;
3113 s32 ret_val;
3118 ret_val = hw->phy.ops.acquire(hw);
3119 if (ret_val)
3120 return ret_val;
3124 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3147 ret_val = e1000_write_phy_reg_mdic(hw, page_select,
3149 if (ret_val)
3153 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3158 return ret_val;
3173 s32 ret_val;
3178 ret_val = hw->phy.ops.acquire(hw);
3179 if (ret_val)
3180 return ret_val;
3184 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3207 ret_val = e1000_write_phy_reg_mdic(hw, page_select,
3209 if (ret_val)
3213 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3217 return ret_val;
3232 s32 ret_val;
3237 ret_val = hw->phy.ops.acquire(hw);
3238 if (ret_val)
3239 return ret_val;
3243 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3252 ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
3255 if (ret_val)
3259 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3263 return ret_val;
3277 s32 ret_val;
3282 ret_val = hw->phy.ops.acquire(hw);
3283 if (ret_val)
3284 return ret_val;
3288 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3297 ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
3300 if (ret_val)
3304 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3309 return ret_val;
3322 s32 ret_val;
3334 ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
3335 if (ret_val) {
3337 return ret_val;
3340 ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
3341 if (ret_val) {
3344 return ret_val;
3354 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, temp);
3355 if (ret_val) {
3358 return ret_val;
3380 s32 ret_val;
3388 ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
3389 if (ret_val) {
3391 return ret_val;
3395 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, *phy_reg);
3396 if (ret_val)
3400 return ret_val;
3431 s32 ret_val;
3446 ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
3447 if (ret_val) {
3449 return ret_val;
3456 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ADDRESS_OPCODE, reg);
3457 if (ret_val) {
3459 return ret_val;
3464 ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
3468 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
3472 if (ret_val) {
3474 return ret_val;
3478 ret_val = e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
3480 return ret_val;
3534 s32 ret_val;
3542 ret_val = hw->phy.ops.acquire(hw);
3543 if (ret_val)
3544 return ret_val;
3548 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3554 ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
3565 ret_val = e1000_set_page_igp(hw,
3570 if (ret_val)
3578 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
3584 return ret_val;
3643 s32 ret_val;
3651 ret_val = hw->phy.ops.acquire(hw);
3652 if (ret_val)
3653 return ret_val;
3657 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3663 ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
3681 ret_val = e1000_access_phy_debug_regs_hv(hw,
3684 if (ret_val)
3690 ret_val = e1000_set_page_igp(hw,
3695 if (ret_val)
3703 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
3710 return ret_val;
3784 s32 ret_val;
3799 ret_val = e1000_write_phy_reg_mdic(hw, addr_reg, (u16)offset & 0x3F);
3800 if (ret_val) {
3802 return ret_val;
3807 ret_val = e1000_read_phy_reg_mdic(hw, data_reg, data);
3809 ret_val = e1000_write_phy_reg_mdic(hw, data_reg, *data);
3811 if (ret_val)
3814 return ret_val;
3830 s32 ret_val = E1000_SUCCESS;
3844 ret_val = hw->phy.ops.read_reg(hw, BM_CS_STATUS, &data);
3845 if (ret_val)
3846 return ret_val;
3858 ret_val = hw->phy.ops.write_reg(hw, HV_MUX_DATA_CTRL,
3861 if (ret_val)
3862 return ret_val;
3879 s32 ret_val;
3884 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
3886 if (!ret_val)
3891 return ret_val;
3903 s32 ret_val;
3909 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
3910 if (ret_val)
3911 return ret_val;
3915 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
3916 if (ret_val)
3917 return ret_val;
3924 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
3926 if (ret_val)
3927 return ret_val;
3933 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
3937 return ret_val;
3952 s32 ret_val;
3958 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
3959 if (ret_val)
3960 return ret_val;
3969 ret_val = e1000_check_polarity_82577(hw);
3970 if (ret_val)
3971 return ret_val;
3973 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
3974 if (ret_val)
3975 return ret_val;
3981 ret_val = hw->phy.ops.get_cable_length(hw);
3982 if (ret_val)
3983 return ret_val;
3985 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
3986 if (ret_val)
3987 return ret_val;
4015 s32 ret_val;
4020 ret_val = phy->ops.read_reg(hw, I82577_PHY_DIAG_STATUS, &phy_data);
4021 if (ret_val)
4022 return ret_val;
4046 s32 ret_val;
4052 ret_val = hw->phy.ops.acquire(hw);
4053 if (ret_val)
4054 return ret_val;
4056 ret_val = e1000_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page);
4057 if (ret_val)
4059 ret_val = e1000_write_phy_reg_mdic(hw, offset, data);
4063 return ret_val;
4078 s32 ret_val;
4084 ret_val = hw->phy.ops.acquire(hw);
4085 if (ret_val)
4086 return ret_val;
4088 ret_val = e1000_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page);
4089 if (ret_val)
4091 ret_val = e1000_read_phy_reg_mdic(hw, offset, data);
4095 return ret_val;