Lines Matching refs:ret_val

215 	s32 ret_val = E1000_SUCCESS;
225 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
226 if (ret_val)
227 return ret_val;
231 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
232 if (ret_val)
233 return ret_val;
255 s32 ret_val;
262 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xC1);
263 if (ret_val)
264 return ret_val;
644 s32 ret_val;
651 ret_val = hw->phy.ops.acquire(hw);
652 if (ret_val)
653 return ret_val;
655 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
660 return ret_val;
674 s32 ret_val;
681 ret_val = hw->phy.ops.acquire(hw);
682 if (ret_val)
683 return ret_val;
685 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
690 return ret_val;
727 s32 ret_val = E1000_SUCCESS;
735 ret_val = hw->phy.ops.acquire(hw);
736 if (ret_val)
737 return ret_val;
741 ret_val = e1000_write_phy_reg_mdic(hw,
744 if (!ret_val)
745 ret_val = e1000_read_phy_reg_mdic(hw,
751 return ret_val;
796 s32 ret_val = E1000_SUCCESS;
804 ret_val = hw->phy.ops.acquire(hw);
805 if (ret_val)
806 return ret_val;
810 ret_val = e1000_write_phy_reg_mdic(hw,
813 if (!ret_val)
814 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS &
820 return ret_val;
870 s32 ret_val = E1000_SUCCESS;
875 ret_val = hw->phy.ops.acquire(hw);
876 if (ret_val)
877 return ret_val;
945 s32 ret_val = E1000_SUCCESS;
950 ret_val = hw->phy.ops.acquire(hw);
951 if (ret_val)
952 return ret_val;
1004 s32 ret_val;
1008 ret_val = hw->phy.ops.read_reg(hw, PHY_1000T_CTRL, &phy_data);
1009 if (ret_val)
1010 return ret_val;
1044 s32 ret_val;
1050 ret_val = hw->phy.ops.reset(hw);
1051 if (ret_val) {
1053 return ret_val;
1060 ret_val = hw->phy.ops.read_reg(hw, I82577_CFG_REG, &phy_data);
1061 if (ret_val)
1062 return ret_val;
1071 ret_val = hw->phy.ops.write_reg(hw, I82577_CFG_REG, phy_data);
1072 if (ret_val)
1073 return ret_val;
1076 ret_val = hw->phy.ops.read_reg(hw, I82577_PHY_CTRL_2, &phy_data);
1077 if (ret_val)
1078 return ret_val;
1096 ret_val = hw->phy.ops.write_reg(hw, I82577_PHY_CTRL_2, phy_data);
1097 if (ret_val)
1098 return ret_val;
1113 s32 ret_val;
1120 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1121 if (ret_val)
1122 return ret_val;
1168 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1170 if (ret_val)
1171 return ret_val;
1173 ret_val = phy->ops.commit(hw);
1174 if (ret_val) {
1176 return ret_val;
1183 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1184 if (ret_val)
1185 return ret_val;
1193 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1195 if (ret_val)
1196 return ret_val;
1212 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1214 if (ret_val)
1215 return ret_val;
1220 ret_val = phy->ops.write_reg(hw, 29, 0x0003);
1221 if (ret_val)
1222 return ret_val;
1225 ret_val = phy->ops.write_reg(hw, 30, 0x0000);
1226 if (ret_val)
1227 return ret_val;
1231 ret_val = phy->ops.commit(hw);
1232 if (ret_val) {
1234 return ret_val;
1238 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1240 if (ret_val)
1241 return ret_val;
1246 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL,
1248 if (ret_val)
1249 return ret_val;
1253 ret_val = e1000_set_master_slave_mode(hw);
1254 if (ret_val)
1255 return ret_val;
1271 s32 ret_val;
1278 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1279 if (ret_val)
1280 return ret_val;
1325 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1326 if (ret_val)
1327 return ret_val;
1330 ret_val = phy->ops.commit(hw);
1331 if (ret_val) {
1333 return ret_val;
1349 s32 ret_val;
1355 ret_val = hw->phy.ops.reset(hw);
1356 if (ret_val) {
1358 return ret_val;
1371 ret_val = hw->phy.ops.set_d3_lplu_state(hw, FALSE);
1372 if (ret_val) {
1374 return ret_val;
1380 ret_val = hw->phy.ops.set_d0_lplu_state(hw, FALSE);
1381 if (ret_val) {
1383 return ret_val;
1387 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &data);
1388 if (ret_val)
1389 return ret_val;
1405 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, data);
1406 if (ret_val)
1407 return ret_val;
1417 ret_val = phy->ops.read_reg(hw,
1420 if (ret_val)
1421 return ret_val;
1424 ret_val = phy->ops.write_reg(hw,
1427 if (ret_val)
1428 return ret_val;
1431 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL, &data);
1432 if (ret_val)
1433 return ret_val;
1436 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, data);
1437 if (ret_val)
1438 return ret_val;
1441 ret_val = e1000_set_master_slave_mode(hw);
1444 return ret_val;
1459 s32 ret_val;
1468 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg);
1469 if (ret_val)
1470 return ret_val;
1474 ret_val = phy->ops.read_reg(hw, PHY_1000T_CTRL,
1476 if (ret_val)
1477 return ret_val;
1587 ret_val = phy->ops.write_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg);
1588 if (ret_val)
1589 return ret_val;
1594 ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
1597 return ret_val;
1612 s32 ret_val;
1629 ret_val = e1000_phy_setup_autoneg(hw);
1630 if (ret_val) {
1632 return ret_val;
1639 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
1640 if (ret_val)
1641 return ret_val;
1644 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
1645 if (ret_val)
1646 return ret_val;
1652 ret_val = e1000_wait_autoneg(hw);
1653 if (ret_val) {
1655 return ret_val;
1661 return ret_val;
1675 s32 ret_val;
1684 ret_val = e1000_copper_link_autoneg(hw);
1685 if (ret_val)
1686 return ret_val;
1692 ret_val = hw->phy.ops.force_speed_duplex(hw);
1693 if (ret_val) {
1695 return ret_val;
1702 ret_val = e1000_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10,
1704 if (ret_val)
1705 return ret_val;
1710 ret_val = e1000_config_fc_after_link_up_generic(hw);
1715 return ret_val;
1729 s32 ret_val;
1735 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1736 if (ret_val)
1737 return ret_val;
1741 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1742 if (ret_val)
1743 return ret_val;
1748 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data);
1749 if (ret_val)
1750 return ret_val;
1755 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data);
1756 if (ret_val)
1757 return ret_val;
1766 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1768 if (ret_val)
1769 return ret_val;
1775 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1779 return ret_val;
1795 s32 ret_val;
1806 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
1808 if (ret_val)
1809 return ret_val;
1812 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
1814 if (ret_val)
1815 return ret_val;
1820 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
1821 if (ret_val)
1822 return ret_val;
1826 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
1827 if (ret_val)
1828 return ret_val;
1831 ret_val = hw->phy.ops.commit(hw);
1832 if (ret_val)
1833 return ret_val;
1838 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1840 if (ret_val)
1841 return ret_val;
1865 ret_val = phy->ops.write_reg(hw,
1868 if (ret_val)
1869 return ret_val;
1870 ret_val = e1000_phy_reset_dsp_generic(hw);
1871 if (ret_val)
1872 return ret_val;
1877 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1879 if (ret_val)
1880 return ret_val;
1892 ret_val = phy->ops.read_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data);
1893 if (ret_val)
1894 return ret_val;
1901 ret_val = phy->ops.write_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data);
1902 if (ret_val)
1903 return ret_val;
1908 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
1909 if (ret_val)
1910 return ret_val;
1913 ret_val = phy->ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
1915 return ret_val;
1929 s32 ret_val;
1935 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &data);
1936 if (ret_val)
1937 return ret_val;
1941 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, data);
1942 if (ret_val)
1943 return ret_val;
1946 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
1947 if (ret_val)
1948 return ret_val;
1953 ret_val = phy->ops.write_reg(hw, IFE_PHY_MDIX_CONTROL, data);
1954 if (ret_val)
1955 return ret_val;
1964 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1966 if (ret_val)
1967 return ret_val;
1973 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
1975 if (ret_val)
1976 return ret_val;
2060 s32 ret_val;
2068 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data);
2069 if (ret_val)
2070 return ret_val;
2074 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
2076 if (ret_val)
2077 return ret_val;
2084 ret_val = phy->ops.read_reg(hw,
2087 if (ret_val)
2088 return ret_val;
2091 ret_val = phy->ops.write_reg(hw,
2094 if (ret_val)
2095 return ret_val;
2097 ret_val = phy->ops.read_reg(hw,
2100 if (ret_val)
2101 return ret_val;
2104 ret_val = phy->ops.write_reg(hw,
2107 if (ret_val)
2108 return ret_val;
2114 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
2116 if (ret_val)
2117 return ret_val;
2120 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
2122 if (ret_val)
2123 return ret_val;
2126 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
2130 return ret_val;
2144 s32 ret_val;
2170 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
2172 if (!ret_val)
2175 return ret_val;
2189 s32 ret_val;
2194 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &data);
2196 if (!ret_val)
2201 return ret_val;
2216 s32 ret_val;
2224 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2225 if (ret_val)
2226 return ret_val;
2240 ret_val = phy->ops.read_reg(hw, offset, &data);
2242 if (!ret_val)
2247 return ret_val;
2259 s32 ret_val;
2274 ret_val = phy->ops.read_reg(hw, offset, &phy_data);
2276 if (!ret_val)
2281 return ret_val;
2293 s32 ret_val = E1000_SUCCESS;
2303 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2304 if (ret_val)
2306 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2307 if (ret_val)
2317 return ret_val;
2332 s32 ret_val = E1000_SUCCESS;
2345 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2346 if (ret_val)
2352 ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status);
2353 if (ret_val)
2365 return ret_val;
2386 s32 ret_val;
2391 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2392 if (ret_val)
2393 return ret_val;
2412 s32 ret_val;
2421 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) +
2424 if (ret_val)
2425 return ret_val;
2428 ret_val = phy->ops.read_reg(hw, (0x7 << GS40G_PAGE_SHIFT) +
2430 if (ret_val)
2431 return ret_val;
2443 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT,
2445 if (ret_val)
2446 return ret_val;
2448 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x07);
2449 if (ret_val)
2450 return ret_val;
2453 ret_val = phy->ops.read_reg(hw, (I347AT4_PCDL + phy->addr),
2455 if (ret_val)
2456 return ret_val;
2459 ret_val = phy->ops.read_reg(hw, I347AT4_PCDC, &phy_data2);
2460 if (ret_val)
2461 return ret_val;
2471 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
2473 if (ret_val)
2474 return ret_val;
2479 ret_val = phy->ops.read_reg(hw, I347AT4_PAGE_SELECT,
2481 if (ret_val)
2482 return ret_val;
2484 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT, 0x05);
2485 if (ret_val)
2486 return ret_val;
2488 ret_val = phy->ops.read_reg(hw, M88E1112_VCT_DSP_DISTANCE,
2490 if (ret_val)
2491 return ret_val;
2506 ret_val = phy->ops.write_reg(hw, I347AT4_PAGE_SELECT,
2508 if (ret_val)
2509 return ret_val;
2516 return ret_val;
2533 s32 ret_val;
2548 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &phy_data);
2549 if (ret_val)
2550 return ret_val;
2603 s32 ret_val;
2614 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2615 if (ret_val)
2616 return ret_val;
2623 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
2624 if (ret_val)
2625 return ret_val;
2630 ret_val = e1000_check_polarity_m88(hw);
2631 if (ret_val)
2632 return ret_val;
2634 ret_val = phy->ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
2635 if (ret_val)
2636 return ret_val;
2641 ret_val = hw->phy.ops.get_cable_length(hw);
2642 if (ret_val)
2643 return ret_val;
2645 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data);
2646 if (ret_val)
2647 return ret_val;
2663 return ret_val;
2678 s32 ret_val;
2684 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2685 if (ret_val)
2686 return ret_val;
2695 ret_val = e1000_check_polarity_igp(hw);
2696 if (ret_val)
2697 return ret_val;
2699 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_STATUS, &data);
2700 if (ret_val)
2701 return ret_val;
2707 ret_val = phy->ops.get_cable_length(hw);
2708 if (ret_val)
2709 return ret_val;
2711 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
2712 if (ret_val)
2713 return ret_val;
2728 return ret_val;
2740 s32 ret_val;
2746 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
2747 if (ret_val)
2748 return ret_val;
2755 ret_val = phy->ops.read_reg(hw, IFE_PHY_SPECIAL_CONTROL, &data);
2756 if (ret_val)
2757 return ret_val;
2761 ret_val = e1000_check_polarity_ife(hw);
2762 if (ret_val)
2763 return ret_val;
2771 ret_val = phy->ops.read_reg(hw, IFE_PHY_MDIX_CONTROL, &data);
2772 if (ret_val)
2773 return ret_val;
2794 s32 ret_val;
2802 ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
2803 if (ret_val)
2804 return ret_val;
2807 ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
2808 if (ret_val)
2809 return ret_val;
2813 return ret_val;
2828 s32 ret_val;
2834 ret_val = phy->ops.check_reset_block(hw);
2835 if (ret_val)
2839 ret_val = phy->ops.acquire(hw);
2840 if (ret_val)
2841 return ret_val;
3086 s32 ret_val;
3091 ret_val = hw->phy.ops.acquire(hw);
3092 if (ret_val)
3093 return ret_val;
3097 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3120 ret_val = e1000_write_phy_reg_mdic(hw, page_select,
3122 if (ret_val)
3126 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3131 return ret_val;
3146 s32 ret_val;
3151 ret_val = hw->phy.ops.acquire(hw);
3152 if (ret_val)
3153 return ret_val;
3157 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3180 ret_val = e1000_write_phy_reg_mdic(hw, page_select,
3182 if (ret_val)
3186 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3190 return ret_val;
3205 s32 ret_val;
3210 ret_val = hw->phy.ops.acquire(hw);
3211 if (ret_val)
3212 return ret_val;
3216 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3225 ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
3228 if (ret_val)
3232 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3236 return ret_val;
3250 s32 ret_val;
3255 ret_val = hw->phy.ops.acquire(hw);
3256 if (ret_val)
3257 return ret_val;
3261 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3270 ret_val = e1000_write_phy_reg_mdic(hw, BM_PHY_PAGE_SELECT,
3273 if (ret_val)
3277 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset,
3282 return ret_val;
3295 s32 ret_val;
3307 ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
3308 if (ret_val) {
3310 return ret_val;
3313 ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg);
3314 if (ret_val) {
3317 return ret_val;
3327 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, temp);
3328 if (ret_val) {
3331 return ret_val;
3353 s32 ret_val;
3361 ret_val = e1000_set_page_igp(hw, (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT));
3362 if (ret_val) {
3364 return ret_val;
3368 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, *phy_reg);
3369 if (ret_val)
3373 return ret_val;
3404 s32 ret_val;
3419 ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
3420 if (ret_val) {
3422 return ret_val;
3429 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_ADDRESS_OPCODE, reg);
3430 if (ret_val) {
3432 return ret_val;
3437 ret_val = e1000_read_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
3441 ret_val = e1000_write_phy_reg_mdic(hw, BM_WUC_DATA_OPCODE,
3445 if (ret_val) {
3447 return ret_val;
3451 ret_val = e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
3453 return ret_val;
3520 s32 ret_val;
3528 ret_val = hw->phy.ops.acquire(hw);
3529 if (ret_val)
3530 return ret_val;
3535 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
3541 ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
3552 ret_val = e1000_set_page_igp(hw,
3557 if (ret_val)
3565 ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
3571 return ret_val;
3630 s32 ret_val;
3638 ret_val = hw->phy.ops.acquire(hw);
3639 if (ret_val)
3640 return ret_val;
3645 ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
3651 ret_val = e1000_access_phy_debug_regs_hv(hw, offset,
3669 ret_val = e1000_access_phy_debug_regs_hv(hw,
3672 if (ret_val)
3678 ret_val = e1000_set_page_igp(hw,
3683 if (ret_val)
3691 ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg,
3698 return ret_val;
3772 s32 ret_val;
3787 ret_val = e1000_write_phy_reg_mdic(hw, addr_reg, (u16)offset & 0x3F);
3788 if (ret_val) {
3790 return ret_val;
3795 ret_val = e1000_read_phy_reg_mdic(hw, data_reg, data);
3797 ret_val = e1000_write_phy_reg_mdic(hw, data_reg, *data);
3799 if (ret_val)
3802 return ret_val;
3818 s32 ret_val = E1000_SUCCESS;
3832 ret_val = hw->phy.ops.read_reg(hw, BM_CS_STATUS, &data);
3833 if (ret_val)
3834 return ret_val;
3846 ret_val = hw->phy.ops.write_reg(hw, HV_MUX_DATA_CTRL,
3849 if (ret_val)
3850 return ret_val;
3867 s32 ret_val;
3872 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
3874 if (!ret_val)
3879 return ret_val;
3891 s32 ret_val;
3897 ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
3898 if (ret_val)
3899 return ret_val;
3903 ret_val = phy->ops.write_reg(hw, PHY_CONTROL, phy_data);
3904 if (ret_val)
3905 return ret_val;
3912 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
3914 if (ret_val)
3915 return ret_val;
3921 ret_val = e1000_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
3925 return ret_val;
3940 s32 ret_val;
3946 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
3947 if (ret_val)
3948 return ret_val;
3957 ret_val = e1000_check_polarity_82577(hw);
3958 if (ret_val)
3959 return ret_val;
3961 ret_val = phy->ops.read_reg(hw, I82577_PHY_STATUS_2, &data);
3962 if (ret_val)
3963 return ret_val;
3969 ret_val = hw->phy.ops.get_cable_length(hw);
3970 if (ret_val)
3971 return ret_val;
3973 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &data);
3974 if (ret_val)
3975 return ret_val;
4003 s32 ret_val;
4008 ret_val = phy->ops.read_reg(hw, I82577_PHY_DIAG_STATUS, &phy_data);
4009 if (ret_val)
4010 return ret_val;
4034 s32 ret_val;
4040 ret_val = hw->phy.ops.acquire(hw);
4041 if (ret_val)
4042 return ret_val;
4044 ret_val = e1000_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page);
4045 if (ret_val)
4047 ret_val = e1000_write_phy_reg_mdic(hw, offset, data);
4051 return ret_val;
4066 s32 ret_val;
4072 ret_val = hw->phy.ops.acquire(hw);
4073 if (ret_val)
4074 return ret_val;
4076 ret_val = e1000_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page);
4077 if (ret_val)
4079 ret_val = e1000_read_phy_reg_mdic(hw, offset, data);
4083 return ret_val;