Lines Matching refs:err

214 	int err;  in marvell_ack_interrupt()  local
217 err = phy_read(phydev, MII_M1011_IEVENT); in marvell_ack_interrupt()
219 if (err < 0) in marvell_ack_interrupt()
220 return err; in marvell_ack_interrupt()
227 int err; in marvell_config_intr() local
230 err = phy_write(phydev, MII_M1011_IMASK, in marvell_config_intr()
233 err = phy_write(phydev, MII_M1011_IMASK, in marvell_config_intr()
236 return err; in marvell_config_intr()
242 int err; in marvell_set_polarity() local
268 err = phy_write(phydev, MII_M1011_PHY_SCR, val); in marvell_set_polarity()
269 if (err) in marvell_set_polarity()
270 return err; in marvell_set_polarity()
296 int err; in marvell_config_aneg() local
298 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in marvell_config_aneg()
299 if (err < 0) in marvell_config_aneg()
300 return err; in marvell_config_aneg()
302 changed = err; in marvell_config_aneg()
304 err = phy_write(phydev, MII_M1111_PHY_LED_CONTROL, in marvell_config_aneg()
306 if (err < 0) in marvell_config_aneg()
307 return err; in marvell_config_aneg()
309 err = genphy_config_aneg(phydev); in marvell_config_aneg()
310 if (err < 0) in marvell_config_aneg()
311 return err; in marvell_config_aneg()
318 err = genphy_soft_reset(phydev); in marvell_config_aneg()
319 if (err < 0) in marvell_config_aneg()
320 return err; in marvell_config_aneg()
328 int err; in m88e1101_config_aneg() local
334 err = genphy_soft_reset(phydev); in m88e1101_config_aneg()
335 if (err < 0) in m88e1101_config_aneg()
336 return err; in m88e1101_config_aneg()
338 err = phy_write(phydev, 0x1d, 0x1f); in m88e1101_config_aneg()
339 if (err < 0) in m88e1101_config_aneg()
340 return err; in m88e1101_config_aneg()
342 err = phy_write(phydev, 0x1e, 0x200c); in m88e1101_config_aneg()
343 if (err < 0) in m88e1101_config_aneg()
344 return err; in m88e1101_config_aneg()
346 err = phy_write(phydev, 0x1d, 0x5); in m88e1101_config_aneg()
347 if (err < 0) in m88e1101_config_aneg()
348 return err; in m88e1101_config_aneg()
350 err = phy_write(phydev, 0x1e, 0); in m88e1101_config_aneg()
351 if (err < 0) in m88e1101_config_aneg()
352 return err; in m88e1101_config_aneg()
354 err = phy_write(phydev, 0x1e, 0x100); in m88e1101_config_aneg()
355 if (err < 0) in m88e1101_config_aneg()
356 return err; in m88e1101_config_aneg()
390 goto err; in marvell_of_reg_init()
405 goto err; in marvell_of_reg_init()
413 goto err; in marvell_of_reg_init()
421 goto err; in marvell_of_reg_init()
423 err: in marvell_of_reg_init()
455 int err = 0; in m88e1121_config_aneg() local
458 err = m88e1121_config_aneg_rgmii_delays(phydev); in m88e1121_config_aneg()
459 if (err < 0) in m88e1121_config_aneg()
460 return err; in m88e1121_config_aneg()
463 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in m88e1121_config_aneg()
464 if (err < 0) in m88e1121_config_aneg()
465 return err; in m88e1121_config_aneg()
467 changed = err; in m88e1121_config_aneg()
469 err = genphy_config_aneg(phydev); in m88e1121_config_aneg()
470 if (err < 0) in m88e1121_config_aneg()
471 return err; in m88e1121_config_aneg()
477 err = genphy_soft_reset(phydev); in m88e1121_config_aneg()
478 if (err < 0) in m88e1121_config_aneg()
479 return err; in m88e1121_config_aneg()
487 int err; in m88e1318_config_aneg() local
489 err = phy_modify_paged(phydev, MII_MARVELL_MSCR_PAGE, in m88e1318_config_aneg()
492 if (err < 0) in m88e1318_config_aneg()
493 return err; in m88e1318_config_aneg()
537 int err; in marvell_config_aneg_fiber() local
558 err = phy_write(phydev, MII_ADVERTISE, adv); in marvell_config_aneg_fiber()
559 if (err < 0) in marvell_config_aneg_fiber()
560 return err; in marvell_config_aneg_fiber()
589 int err; in m88e1510_config_aneg() local
591 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in m88e1510_config_aneg()
592 if (err < 0) in m88e1510_config_aneg()
596 err = m88e1318_config_aneg(phydev); in m88e1510_config_aneg()
597 if (err < 0) in m88e1510_config_aneg()
605 err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); in m88e1510_config_aneg()
606 if (err < 0) in m88e1510_config_aneg()
609 err = marvell_config_aneg_fiber(phydev); in m88e1510_config_aneg()
610 if (err < 0) in m88e1510_config_aneg()
617 return err; in m88e1510_config_aneg()
623 int err; in marvell_config_led() local
646 err = phy_write_paged(phydev, MII_MARVELL_LED_PAGE, MII_PHY_LED_CTRL, in marvell_config_led()
648 if (err < 0) in marvell_config_led()
663 int err; in m88e1116r_config_init() local
665 err = genphy_soft_reset(phydev); in m88e1116r_config_init()
666 if (err < 0) in m88e1116r_config_init()
667 return err; in m88e1116r_config_init()
671 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in m88e1116r_config_init()
672 if (err < 0) in m88e1116r_config_init()
673 return err; in m88e1116r_config_init()
675 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in m88e1116r_config_init()
676 if (err < 0) in m88e1116r_config_init()
677 return err; in m88e1116r_config_init()
679 err = marvell_set_downshift(phydev, true, 8); in m88e1116r_config_init()
680 if (err < 0) in m88e1116r_config_init()
681 return err; in m88e1116r_config_init()
684 err = m88e1121_config_aneg_rgmii_delays(phydev); in m88e1116r_config_init()
685 if (err < 0) in m88e1116r_config_init()
686 return err; in m88e1116r_config_init()
689 err = genphy_soft_reset(phydev); in m88e1116r_config_init()
690 if (err < 0) in m88e1116r_config_init()
691 return err; in m88e1116r_config_init()
746 int err; in m88e1111_config_init_rgmii() local
748 err = m88e1111_config_init_rgmii_delays(phydev); in m88e1111_config_init_rgmii()
749 if (err < 0) in m88e1111_config_init_rgmii()
750 return err; in m88e1111_config_init_rgmii()
768 int err; in m88e1111_config_init_sgmii() local
770 err = m88e1111_config_init_hwcfg_mode( in m88e1111_config_init_sgmii()
774 if (err < 0) in m88e1111_config_init_sgmii()
775 return err; in m88e1111_config_init_sgmii()
783 int err; in m88e1111_config_init_rtbi() local
785 err = m88e1111_config_init_rgmii_delays(phydev); in m88e1111_config_init_rtbi()
786 if (err < 0) in m88e1111_config_init_rtbi()
787 return err; in m88e1111_config_init_rtbi()
789 err = m88e1111_config_init_hwcfg_mode( in m88e1111_config_init_rtbi()
793 if (err < 0) in m88e1111_config_init_rtbi()
794 return err; in m88e1111_config_init_rtbi()
797 err = genphy_soft_reset(phydev); in m88e1111_config_init_rtbi()
798 if (err < 0) in m88e1111_config_init_rtbi()
799 return err; in m88e1111_config_init_rtbi()
809 int err; in m88e1111_config_init() local
812 err = m88e1111_config_init_rgmii(phydev); in m88e1111_config_init()
813 if (err < 0) in m88e1111_config_init()
814 return err; in m88e1111_config_init()
818 err = m88e1111_config_init_sgmii(phydev); in m88e1111_config_init()
819 if (err < 0) in m88e1111_config_init()
820 return err; in m88e1111_config_init()
824 err = m88e1111_config_init_rtbi(phydev); in m88e1111_config_init()
825 if (err < 0) in m88e1111_config_init()
826 return err; in m88e1111_config_init()
829 err = marvell_of_reg_init(phydev); in m88e1111_config_init()
830 if (err < 0) in m88e1111_config_init()
831 return err; in m88e1111_config_init()
839 int err = phy_modify_paged( in m88e1318_config_init() local
845 if (err < 0) in m88e1318_config_init()
846 return err; in m88e1318_config_init()
854 int err; in m88e1510_config_init() local
859 err = marvell_set_page(phydev, 18); in m88e1510_config_init()
860 if (err < 0) in m88e1510_config_init()
861 return err; in m88e1510_config_init()
864 err = phy_modify(phydev, MII_88E1510_GEN_CTRL_REG_1, in m88e1510_config_init()
867 if (err < 0) in m88e1510_config_init()
868 return err; in m88e1510_config_init()
871 err = phy_modify(phydev, MII_88E1510_GEN_CTRL_REG_1, 0, in m88e1510_config_init()
873 if (err < 0) in m88e1510_config_init()
874 return err; in m88e1510_config_init()
877 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in m88e1510_config_init()
878 if (err < 0) in m88e1510_config_init()
879 return err; in m88e1510_config_init()
887 int err; in m88e1118_config_aneg() local
889 err = genphy_soft_reset(phydev); in m88e1118_config_aneg()
890 if (err < 0) in m88e1118_config_aneg()
891 return err; in m88e1118_config_aneg()
893 err = marvell_set_polarity(phydev, phydev->mdix_ctrl); in m88e1118_config_aneg()
894 if (err < 0) in m88e1118_config_aneg()
895 return err; in m88e1118_config_aneg()
897 err = genphy_config_aneg(phydev); in m88e1118_config_aneg()
903 int err; in m88e1118_config_init() local
906 err = marvell_set_page(phydev, MII_MARVELL_MSCR_PAGE); in m88e1118_config_init()
907 if (err < 0) in m88e1118_config_init()
908 return err; in m88e1118_config_init()
911 err = phy_write(phydev, 0x15, 0x1070); in m88e1118_config_init()
912 if (err < 0) in m88e1118_config_init()
913 return err; in m88e1118_config_init()
916 err = marvell_set_page(phydev, MII_MARVELL_LED_PAGE); in m88e1118_config_init()
917 if (err < 0) in m88e1118_config_init()
918 return err; in m88e1118_config_init()
922 err = phy_write(phydev, 0x10, 0x1100); in m88e1118_config_init()
924 err = phy_write(phydev, 0x10, 0x021e); in m88e1118_config_init()
925 if (err < 0) in m88e1118_config_init()
926 return err; in m88e1118_config_init()
928 err = marvell_of_reg_init(phydev); in m88e1118_config_init()
929 if (err < 0) in m88e1118_config_init()
930 return err; in m88e1118_config_init()
933 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in m88e1118_config_init()
934 if (err < 0) in m88e1118_config_init()
935 return err; in m88e1118_config_init()
942 int err; in m88e1149_config_init() local
945 err = marvell_set_page(phydev, MII_MARVELL_MSCR_PAGE); in m88e1149_config_init()
946 if (err < 0) in m88e1149_config_init()
947 return err; in m88e1149_config_init()
950 err = phy_write(phydev, 0x15, 0x1048); in m88e1149_config_init()
951 if (err < 0) in m88e1149_config_init()
952 return err; in m88e1149_config_init()
954 err = marvell_of_reg_init(phydev); in m88e1149_config_init()
955 if (err < 0) in m88e1149_config_init()
956 return err; in m88e1149_config_init()
959 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in m88e1149_config_init()
960 if (err < 0) in m88e1149_config_init()
961 return err; in m88e1149_config_init()
968 int err; in m88e1145_config_init_rgmii() local
970 err = m88e1111_config_init_rgmii_delays(phydev); in m88e1145_config_init_rgmii()
971 if (err < 0) in m88e1145_config_init_rgmii()
972 return err; in m88e1145_config_init_rgmii()
975 err = phy_write(phydev, 0x1d, 0x0012); in m88e1145_config_init_rgmii()
976 if (err < 0) in m88e1145_config_init_rgmii()
977 return err; in m88e1145_config_init_rgmii()
979 err = phy_modify(phydev, 0x1e, 0x0fc0, in m88e1145_config_init_rgmii()
982 if (err < 0) in m88e1145_config_init_rgmii()
983 return err; in m88e1145_config_init_rgmii()
985 err = phy_write(phydev, 0x1d, 0x3); in m88e1145_config_init_rgmii()
986 if (err < 0) in m88e1145_config_init_rgmii()
987 return err; in m88e1145_config_init_rgmii()
989 err = phy_write(phydev, 0x1e, 0x8000); in m88e1145_config_init_rgmii()
991 return err; in m88e1145_config_init_rgmii()
1003 int err; in m88e1145_config_init() local
1006 err = phy_write(phydev, 0x1d, 0x001b); in m88e1145_config_init()
1007 if (err < 0) in m88e1145_config_init()
1008 return err; in m88e1145_config_init()
1010 err = phy_write(phydev, 0x1e, 0x418f); in m88e1145_config_init()
1011 if (err < 0) in m88e1145_config_init()
1012 return err; in m88e1145_config_init()
1014 err = phy_write(phydev, 0x1d, 0x0016); in m88e1145_config_init()
1015 if (err < 0) in m88e1145_config_init()
1016 return err; in m88e1145_config_init()
1018 err = phy_write(phydev, 0x1e, 0xa2da); in m88e1145_config_init()
1019 if (err < 0) in m88e1145_config_init()
1020 return err; in m88e1145_config_init()
1023 err = m88e1145_config_init_rgmii(phydev); in m88e1145_config_init()
1024 if (err < 0) in m88e1145_config_init()
1025 return err; in m88e1145_config_init()
1029 err = m88e1145_config_init_sgmii(phydev); in m88e1145_config_init()
1030 if (err < 0) in m88e1145_config_init()
1031 return err; in m88e1145_config_init()
1034 err = marvell_of_reg_init(phydev); in m88e1145_config_init()
1035 if (err < 0) in m88e1145_config_init()
1036 return err; in m88e1145_config_init()
1142 int err; in m88e6390_errata() local
1144 err = phy_write(phydev, MII_BMCR, in m88e6390_errata()
1146 if (err) in m88e6390_errata()
1147 return err; in m88e6390_errata()
1151 err = phy_write_paged(phydev, 0xf8, 0x08, 0x36); in m88e6390_errata()
1152 if (err) in m88e6390_errata()
1153 return err; in m88e6390_errata()
1160 int err; in m88e6390_config_aneg() local
1162 err = m88e6390_errata(phydev); in m88e6390_config_aneg()
1163 if (err) in m88e6390_config_aneg()
1164 return err; in m88e6390_config_aneg()
1324 int err; in marvell_read_status_page() local
1334 err = marvell_update_link(phydev, fiber); in marvell_read_status_page()
1335 if (err) in marvell_read_status_page()
1336 return err; in marvell_read_status_page()
1339 err = marvell_read_status_page_an(phydev, fiber); in marvell_read_status_page()
1341 err = marvell_read_status_page_fixed(phydev); in marvell_read_status_page()
1343 return err; in marvell_read_status_page()
1357 int err; in marvell_read_status() local
1363 err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); in marvell_read_status()
1364 if (err < 0) in marvell_read_status()
1367 err = marvell_read_status_page(phydev, MII_MARVELL_FIBER_PAGE); in marvell_read_status()
1368 if (err < 0) in marvell_read_status()
1382 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in marvell_read_status()
1383 if (err < 0) in marvell_read_status()
1391 return err; in marvell_read_status()
1401 int err; in marvell_suspend() local
1406 err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); in marvell_suspend()
1407 if (err < 0) in marvell_suspend()
1411 err = genphy_suspend(phydev); in marvell_suspend()
1412 if (err < 0) in marvell_suspend()
1416 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in marvell_suspend()
1417 if (err < 0) in marvell_suspend()
1426 return err; in marvell_suspend()
1436 int err; in marvell_resume() local
1441 err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); in marvell_resume()
1442 if (err < 0) in marvell_resume()
1446 err = genphy_resume(phydev); in marvell_resume()
1447 if (err < 0) in marvell_resume()
1451 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); in marvell_resume()
1452 if (err < 0) in marvell_resume()
1461 return err; in marvell_resume()
1506 int err = 0, oldpage; in m88e1318_set_wol() local
1514 err = marvell_write_page(phydev, MII_MARVELL_COPPER_PAGE); in m88e1318_set_wol()
1515 if (err < 0) in m88e1318_set_wol()
1528 err = __phy_modify(phydev, MII_88E1318S_PHY_CSIER, 0, in m88e1318_set_wol()
1530 if (err < 0) in m88e1318_set_wol()
1533 err = marvell_write_page(phydev, MII_MARVELL_LED_PAGE); in m88e1318_set_wol()
1534 if (err < 0) in m88e1318_set_wol()
1538 err = __phy_modify(phydev, MII_88E1318S_PHY_LED_TCR, in m88e1318_set_wol()
1542 if (err < 0) in m88e1318_set_wol()
1545 err = marvell_write_page(phydev, MII_MARVELL_WOL_PAGE); in m88e1318_set_wol()
1546 if (err < 0) in m88e1318_set_wol()
1550 err = __phy_write(phydev, MII_88E1318S_PHY_MAGIC_PACKET_WORD2, in m88e1318_set_wol()
1553 if (err < 0) in m88e1318_set_wol()
1555 err = __phy_write(phydev, MII_88E1318S_PHY_MAGIC_PACKET_WORD1, in m88e1318_set_wol()
1558 if (err < 0) in m88e1318_set_wol()
1560 err = __phy_write(phydev, MII_88E1318S_PHY_MAGIC_PACKET_WORD0, in m88e1318_set_wol()
1563 if (err < 0) in m88e1318_set_wol()
1567 err = __phy_modify(phydev, MII_88E1318S_PHY_WOL_CTRL, 0, in m88e1318_set_wol()
1570 if (err < 0) in m88e1318_set_wol()
1573 err = marvell_write_page(phydev, MII_MARVELL_WOL_PAGE); in m88e1318_set_wol()
1574 if (err < 0) in m88e1318_set_wol()
1578 err = __phy_modify(phydev, MII_88E1318S_PHY_WOL_CTRL, in m88e1318_set_wol()
1581 if (err < 0) in m88e1318_set_wol()
1586 return phy_restore_page(phydev, oldpage, err); in m88e1318_set_wol()
1687 int err; in m88e1121_hwmon_read() local
1691 err = m88e1121_get_temp(phydev, temp); in m88e1121_hwmon_read()
1697 return err; in m88e1121_hwmon_read()
1818 int err; in m88e1510_hwmon_read() local
1822 err = m88e1510_get_temp(phydev, temp); in m88e1510_hwmon_read()
1825 err = m88e1510_get_temp_critical(phydev, temp); in m88e1510_hwmon_read()
1828 err = m88e1510_get_temp_alarm(phydev, temp); in m88e1510_hwmon_read()
1834 return err; in m88e1510_hwmon_read()
1842 int err; in m88e1510_hwmon_write() local
1846 err = m88e1510_set_temp_critical(phydev, temp); in m88e1510_hwmon_write()
1851 return err; in m88e1510_hwmon_write()
1962 int err; in m88e6390_hwmon_read() local
1966 err = m88e6390_get_temp(phydev, temp); in m88e6390_hwmon_read()
1972 return err; in m88e6390_hwmon_read()
2041 int err; in marvell_hwmon_probe() local
2043 err = marvell_hwmon_name(phydev); in marvell_hwmon_probe()
2044 if (err) in marvell_hwmon_probe()
2045 return err; in marvell_hwmon_probe()
2099 int err; in m88e1121_probe() local
2101 err = marvell_probe(phydev); in m88e1121_probe()
2102 if (err) in m88e1121_probe()
2103 return err; in m88e1121_probe()
2110 int err; in m88e1510_probe() local
2112 err = marvell_probe(phydev); in m88e1510_probe()
2113 if (err) in m88e1510_probe()
2114 return err; in m88e1510_probe()
2121 int err; in m88e6390_probe() local
2123 err = marvell_probe(phydev); in m88e6390_probe()
2124 if (err) in m88e6390_probe()
2125 return err; in m88e6390_probe()