phydev 806 arch/arm/mach-davinci/board-dm644x-evm.c static int davinci_phy_fixup(struct phy_device *phydev) phydev 814 arch/arm/mach-davinci/board-dm644x-evm.c control = phy_read(phydev, 26); phydev 815 arch/arm/mach-davinci/board-dm644x-evm.c phy_write(phydev, 26, (control | 0x800)); phydev 37 arch/arm/mach-imx/mach-imx6q.c static int ksz9021rn_phy_fixup(struct phy_device *phydev) phydev 41 arch/arm/mach-imx/mach-imx6q.c phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, phydev 43 arch/arm/mach-imx/mach-imx6q.c phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0x0000); phydev 46 arch/arm/mach-imx/mach-imx6q.c phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, phydev 48 arch/arm/mach-imx/mach-imx6q.c phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0xf0f0); phydev 49 arch/arm/mach-imx/mach-imx6q.c phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, phydev 66 arch/powerpc/platforms/85xx/mpc85xx_mds.c static int mpc8568_fixup_125_clock(struct phy_device *phydev) phydev 72 arch/powerpc/platforms/85xx/mpc85xx_mds.c scr = phy_read(phydev, MV88E1111_SCR); phydev 77 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev, MV88E1111_SCR, scr & ~(MV88E1111_SCR_125CLK)); phydev 82 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev, MII_BMCR, BMCR_RESET); phydev 87 arch/powerpc/platforms/85xx/mpc85xx_mds.c scr = phy_read(phydev, MV88E1111_SCR); phydev 92 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev, MV88E1111_SCR, scr | 0x0008); phydev 97 arch/powerpc/platforms/85xx/mpc85xx_mds.c static int mpc8568_mds_phy_fixups(struct phy_device *phydev) phydev 103 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev,29, 0x0006); phydev 108 arch/powerpc/platforms/85xx/mpc85xx_mds.c temp = phy_read(phydev, 30); phydev 114 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev,30, temp); phydev 119 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev,29, 0x000a); phydev 124 arch/powerpc/platforms/85xx/mpc85xx_mds.c temp = phy_read(phydev, 30); phydev 129 arch/powerpc/platforms/85xx/mpc85xx_mds.c temp = phy_read(phydev, 30); phydev 136 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev,30,temp); phydev 142 arch/powerpc/platforms/85xx/mpc85xx_mds.c temp = phy_read(phydev, 16); phydev 148 arch/powerpc/platforms/85xx/mpc85xx_mds.c err = phy_write(phydev,16,temp); phydev 875 drivers/net/dsa/b53/b53_common.c struct phy_device *phydev; phydev 883 drivers/net/dsa/b53/b53_common.c phydev = b53_get_phy_device(ds, port); phydev 884 drivers/net/dsa/b53/b53_common.c if (!phydev) phydev 887 drivers/net/dsa/b53/b53_common.c phy_ethtool_get_strings(phydev, data); phydev 927 drivers/net/dsa/b53/b53_common.c struct phy_device *phydev; phydev 929 drivers/net/dsa/b53/b53_common.c phydev = b53_get_phy_device(ds, port); phydev 930 drivers/net/dsa/b53/b53_common.c if (!phydev) phydev 933 drivers/net/dsa/b53/b53_common.c phy_ethtool_get_stats(phydev, NULL, data); phydev 940 drivers/net/dsa/b53/b53_common.c struct phy_device *phydev; phydev 945 drivers/net/dsa/b53/b53_common.c phydev = b53_get_phy_device(ds, port); phydev 946 drivers/net/dsa/b53/b53_common.c if (!phydev) phydev 949 drivers/net/dsa/b53/b53_common.c return phy_ethtool_get_sset_count(phydev); phydev 1064 drivers/net/dsa/b53/b53_common.c struct phy_device *phydev) phydev 1071 drivers/net/dsa/b53/b53_common.c if (!phy_is_pseudo_fixed_link(phydev)) phydev 1078 drivers/net/dsa/b53/b53_common.c if (phydev->pause) { phydev 1079 drivers/net/dsa/b53/b53_common.c if (phydev->asym_pause) phydev 1084 drivers/net/dsa/b53/b53_common.c b53_force_port_config(dev, port, phydev->speed, phydev->duplex, pause); phydev 1085 drivers/net/dsa/b53/b53_common.c b53_force_link(dev, port, phydev->link); phydev 1087 drivers/net/dsa/b53/b53_common.c if (is531x5(dev) && phy_interface_is_rgmii(phydev)) { phydev 1114 drivers/net/dsa/b53/b53_common.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) phydev 1116 drivers/net/dsa/b53/b53_common.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII) phydev 1122 drivers/net/dsa/b53/b53_common.c phy_modes(phydev->interface)); phydev 1152 drivers/net/dsa/b53/b53_common.c p->eee_enabled = b53_eee_init(ds, port, phydev); phydev 1279 drivers/net/dsa/b53/b53_common.c struct phy_device *phydev) phydev 340 drivers/net/dsa/b53/b53_priv.h struct phy_device *phydev); phydev 638 drivers/net/dsa/bcm_sf2.c struct phy_device *phydev) phydev 645 drivers/net/dsa/bcm_sf2.c if (mode == MLO_AN_PHY && phydev) phydev 646 drivers/net/dsa/bcm_sf2.c p->eee_enabled = b53_eee_init(ds, port, phydev); phydev 1041 drivers/net/dsa/lan9303-core.c struct phy_device *phydev) phydev 1046 drivers/net/dsa/lan9303-core.c if (!phy_is_pseudo_fixed_link(phydev)) phydev 1053 drivers/net/dsa/lan9303-core.c if (phydev->speed == SPEED_100) phydev 1055 drivers/net/dsa/lan9303-core.c else if (phydev->speed == SPEED_10) phydev 1058 drivers/net/dsa/lan9303-core.c dev_err(ds->dev, "unsupported speed: %d\n", phydev->speed); phydev 1060 drivers/net/dsa/lan9303-core.c if (phydev->duplex == DUPLEX_FULL) phydev 640 drivers/net/dsa/lantiq_gswip.c struct phy_device *phydev) phydev 670 drivers/net/dsa/lantiq_gswip.c (phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK); phydev 1519 drivers/net/dsa/lantiq_gswip.c struct phy_device *phydev) phydev 949 drivers/net/dsa/microchip/ksz8795.c p->phydev.speed = SPEED_100; phydev 953 drivers/net/dsa/microchip/ksz8795.c p->phydev.speed = SPEED_100; phydev 958 drivers/net/dsa/microchip/ksz8795.c p->phydev.speed = SPEED_1000; phydev 971 drivers/net/dsa/microchip/ksz8795.c p->phydev.speed = SPEED_1000; phydev 975 drivers/net/dsa/microchip/ksz8795.c p->phydev.duplex = 1; phydev 985 drivers/net/dsa/microchip/ksz8795.c if (p->phydev.link) phydev 345 drivers/net/dsa/microchip/ksz9477.c if (p->phydev.speed == SPEED_1000) phydev 1240 drivers/net/dsa/microchip/ksz9477.c p->phydev.speed = SPEED_100; phydev 1245 drivers/net/dsa/microchip/ksz9477.c p->phydev.speed = SPEED_100; phydev 1250 drivers/net/dsa/microchip/ksz9477.c p->phydev.speed = SPEED_1000; phydev 1263 drivers/net/dsa/microchip/ksz9477.c p->phydev.speed = SPEED_1000; phydev 1267 drivers/net/dsa/microchip/ksz9477.c p->phydev.duplex = 1; phydev 1279 drivers/net/dsa/microchip/ksz9477.c if (p->phydev.link) phydev 147 drivers/net/dsa/microchip/ksz_common.c struct phy_device *phydev) phydev 153 drivers/net/dsa/microchip/ksz_common.c if (!phydev->link) { phydev 158 drivers/net/dsa/microchip/ksz_common.c if (!phydev->link) phydev 31 drivers/net/dsa/microchip/ksz_common.h struct phy_device phydev; phydev 164 drivers/net/dsa/microchip/ksz_common.h struct phy_device *phydev); phydev 1404 drivers/net/dsa/mt7530.c struct phy_device *phydev) phydev 655 drivers/net/dsa/mv88e6xxx/chip.c struct phy_device *phydev) phydev 2546 drivers/net/dsa/mv88e6xxx/chip.c struct phy_device *phydev) phydev 987 drivers/net/dsa/rtl8366rb.c struct phy_device *phydev) phydev 833 drivers/net/dsa/sja1105/sja1105_main.c struct phy_device *phydev) phydev 727 drivers/net/dsa/vitesse-vsc73xx-core.c int port, struct phy_device *phydev, phydev 767 drivers/net/dsa/vitesse-vsc73xx-core.c struct phy_device *phydev) phydev 791 drivers/net/dsa/vitesse-vsc73xx-core.c if (!phydev->link) { phydev 841 drivers/net/dsa/vitesse-vsc73xx-core.c if (phydev->speed == SPEED_1000) { phydev 846 drivers/net/dsa/vitesse-vsc73xx-core.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII) phydev 850 drivers/net/dsa/vitesse-vsc73xx-core.c vsc73xx_adjust_enable_port(vsc, port, phydev, val); phydev 851 drivers/net/dsa/vitesse-vsc73xx-core.c } else if (phydev->speed == SPEED_100) { phydev 852 drivers/net/dsa/vitesse-vsc73xx-core.c if (phydev->duplex == DUPLEX_FULL) { phydev 863 drivers/net/dsa/vitesse-vsc73xx-core.c vsc73xx_adjust_enable_port(vsc, port, phydev, val); phydev 864 drivers/net/dsa/vitesse-vsc73xx-core.c } else if (phydev->speed == SPEED_10) { phydev 865 drivers/net/dsa/vitesse-vsc73xx-core.c if (phydev->duplex == DUPLEX_FULL) { phydev 876 drivers/net/dsa/vitesse-vsc73xx-core.c vsc73xx_adjust_enable_port(vsc, port, phydev, val); phydev 332 drivers/net/ethernet/8390/ax88796.c struct phy_device *phy_dev = dev->phydev; phydev 510 drivers/net/ethernet/8390/ax88796.c phy_start(dev->phydev); phydev 521 drivers/net/ethernet/8390/ax88796.c phy_disconnect(dev->phydev); phydev 546 drivers/net/ethernet/8390/ax88796.c phy_disconnect(dev->phydev); phydev 557 drivers/net/ethernet/8390/ax88796.c struct phy_device *phy_dev = dev->phydev; phydev 1203 drivers/net/ethernet/aeroflex/greth.c struct phy_device *phydev = dev->phydev; phydev 1210 drivers/net/ethernet/aeroflex/greth.c if (phydev->link) { phydev 1212 drivers/net/ethernet/aeroflex/greth.c if ((greth->speed != phydev->speed) || (greth->duplex != phydev->duplex)) { phydev 1216 drivers/net/ethernet/aeroflex/greth.c if (phydev->duplex) phydev 1219 drivers/net/ethernet/aeroflex/greth.c if (phydev->speed == SPEED_100) phydev 1221 drivers/net/ethernet/aeroflex/greth.c else if (phydev->speed == SPEED_1000) phydev 1225 drivers/net/ethernet/aeroflex/greth.c greth->speed = phydev->speed; phydev 1226 drivers/net/ethernet/aeroflex/greth.c greth->duplex = phydev->duplex; phydev 1231 drivers/net/ethernet/aeroflex/greth.c if (phydev->link != greth->link) { phydev 1232 drivers/net/ethernet/aeroflex/greth.c if (!phydev->link) { phydev 1236 drivers/net/ethernet/aeroflex/greth.c greth->link = phydev->link; phydev 1244 drivers/net/ethernet/aeroflex/greth.c if (phydev->link) phydev 1246 drivers/net/ethernet/aeroflex/greth.c dev->name, phydev->speed, phydev 1247 drivers/net/ethernet/aeroflex/greth.c DUPLEX_FULL == phydev->duplex ? "Full" : "Half"); phydev 1319 drivers/net/ethernet/aeroflex/greth.c phy_start(ndev->phydev); phydev 1323 drivers/net/ethernet/aeroflex/greth.c phy_start_aneg(ndev->phydev); phydev 1325 drivers/net/ethernet/aeroflex/greth.c while (!phy_aneg_done(ndev->phydev) && phydev 1328 drivers/net/ethernet/aeroflex/greth.c phy_read_status(ndev->phydev); phydev 1539 drivers/net/ethernet/aeroflex/greth.c if (ndev->phydev) phydev 1540 drivers/net/ethernet/aeroflex/greth.c phy_stop(ndev->phydev); phydev 868 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 881 drivers/net/ethernet/agere/et131x.c if (phydev->speed == SPEED_1000) { phydev 908 drivers/net/ethernet/agere/et131x.c if (phydev->duplex == DUPLEX_FULL) phydev 912 drivers/net/ethernet/agere/et131x.c if (phydev->duplex == DUPLEX_HALF) phydev 1039 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 1126 drivers/net/ethernet/agere/et131x.c if (phydev && phydev->speed == SPEED_100) phydev 1234 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 1236 drivers/net/ethernet/agere/et131x.c if (!phydev) phydev 1239 drivers/net/ethernet/agere/et131x.c return et131x_phy_mii_read(adapter, phydev->mdio.addr, reg, value); phydev 1315 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 1317 drivers/net/ethernet/agere/et131x.c if (phydev->duplex == DUPLEX_HALF) { phydev 1460 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 1466 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, MII_BMCR, data); phydev 1473 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 1494 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, PHY_LED_2, lcr2); phydev 2115 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 2120 drivers/net/ethernet/agere/et131x.c if ((phydev->speed == SPEED_100) || (phydev->speed == SPEED_10)) { phydev 2430 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 2503 drivers/net/ethernet/agere/et131x.c if (phydev && phydev->speed == SPEED_1000) { phydev 2581 drivers/net/ethernet/agere/et131x.c if (phydev && phydev->speed == SPEED_1000) { phydev 3086 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = adapter->netdev->phydev; phydev 3099 drivers/net/ethernet/agere/et131x.c if (!phydev->link && adapter->boot_coma < 11) phydev 3103 drivers/net/ethernet/agere/et131x.c if (!phydev->link) { phydev 3156 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = netdev->phydev; phydev 3158 drivers/net/ethernet/agere/et131x.c if (!phydev) phydev 3160 drivers/net/ethernet/agere/et131x.c if (phydev->link == adapter->link) phydev 3170 drivers/net/ethernet/agere/et131x.c adapter->link = phydev->link; phydev 3171 drivers/net/ethernet/agere/et131x.c phy_print_status(phydev); phydev 3173 drivers/net/ethernet/agere/et131x.c if (phydev->link) { phydev 3175 drivers/net/ethernet/agere/et131x.c if (phydev->speed == SPEED_10) { phydev 3180 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3183 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3185 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3187 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3193 drivers/net/ethernet/agere/et131x.c if (phydev->speed == SPEED_1000 && phydev 3200 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3209 drivers/net/ethernet/agere/et131x.c if (phydev->speed == SPEED_10) { phydev 3214 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3217 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3219 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3221 drivers/net/ethernet/agere/et131x.c et131x_mii_write(adapter, phydev->mdio.addr, phydev 3245 drivers/net/ethernet/agere/et131x.c struct phy_device *phydev = NULL; phydev 3247 drivers/net/ethernet/agere/et131x.c phydev = phy_find_first(adapter->mii_bus); phydev 3248 drivers/net/ethernet/agere/et131x.c if (!phydev) { phydev 3253 drivers/net/ethernet/agere/et131x.c phydev = phy_connect(netdev, phydev_name(phydev), phydev 3256 drivers/net/ethernet/agere/et131x.c if (IS_ERR(phydev)) { phydev 3258 drivers/net/ethernet/agere/et131x.c return PTR_ERR(phydev); phydev 3261 drivers/net/ethernet/agere/et131x.c phy_set_max_speed(phydev, SPEED_100); phydev 3264 drivers/net/ethernet/agere/et131x.c phy_set_max_speed(phydev, SPEED_1000); phydev 3266 drivers/net/ethernet/agere/et131x.c phydev->autoneg = AUTONEG_ENABLE; phydev 3268 drivers/net/ethernet/agere/et131x.c phy_attached_info(phydev); phydev 3302 drivers/net/ethernet/agere/et131x.c phy_disconnect(netdev->phydev); phydev 3318 drivers/net/ethernet/agere/et131x.c phy_start(netdev->phydev); phydev 3326 drivers/net/ethernet/agere/et131x.c phy_stop(netdev->phydev); phydev 3657 drivers/net/ethernet/agere/et131x.c if (!netdev->phydev) phydev 3660 drivers/net/ethernet/agere/et131x.c return phy_mii_ioctl(netdev->phydev, reqbuf, cmd); phydev 4043 drivers/net/ethernet/agere/et131x.c phy_disconnect(netdev->phydev); phydev 122 drivers/net/ethernet/allwinner/sun4i-emac.c struct phy_device *phydev = dev->phydev; phydev 126 drivers/net/ethernet/allwinner/sun4i-emac.c if (phydev->link) { phydev 127 drivers/net/ethernet/allwinner/sun4i-emac.c if (db->speed != phydev->speed) { phydev 129 drivers/net/ethernet/allwinner/sun4i-emac.c db->speed = phydev->speed; phydev 135 drivers/net/ethernet/allwinner/sun4i-emac.c if (db->duplex != phydev->duplex) { phydev 137 drivers/net/ethernet/allwinner/sun4i-emac.c db->duplex = phydev->duplex; phydev 144 drivers/net/ethernet/allwinner/sun4i-emac.c if (phydev->link != db->link) { phydev 145 drivers/net/ethernet/allwinner/sun4i-emac.c if (!phydev->link) { phydev 149 drivers/net/ethernet/allwinner/sun4i-emac.c db->link = phydev->link; phydev 155 drivers/net/ethernet/allwinner/sun4i-emac.c phy_print_status(phydev); phydev 161 drivers/net/ethernet/allwinner/sun4i-emac.c struct phy_device *phydev; phydev 166 drivers/net/ethernet/allwinner/sun4i-emac.c phydev = of_phy_connect(db->ndev, db->phy_node, phydev 169 drivers/net/ethernet/allwinner/sun4i-emac.c if (!phydev) { phydev 175 drivers/net/ethernet/allwinner/sun4i-emac.c phy_set_max_speed(phydev, SPEED_100); phydev 186 drivers/net/ethernet/allwinner/sun4i-emac.c phy_disconnect(dev->phydev); phydev 212 drivers/net/ethernet/allwinner/sun4i-emac.c struct phy_device *phydev = dev->phydev; phydev 217 drivers/net/ethernet/allwinner/sun4i-emac.c if (!phydev) phydev 220 drivers/net/ethernet/allwinner/sun4i-emac.c return phy_mii_ioctl(phydev, rq, cmd); phydev 740 drivers/net/ethernet/allwinner/sun4i-emac.c phy_start(dev->phydev); phydev 777 drivers/net/ethernet/allwinner/sun4i-emac.c phy_stop(ndev->phydev); phydev 627 drivers/net/ethernet/altera/altera_tse_main.c struct phy_device *phydev = dev->phydev; phydev 632 drivers/net/ethernet/altera/altera_tse_main.c if (phydev->link) { phydev 637 drivers/net/ethernet/altera/altera_tse_main.c if (phydev->duplex != priv->oldduplex) { phydev 639 drivers/net/ethernet/altera/altera_tse_main.c if (!(phydev->duplex)) phydev 645 drivers/net/ethernet/altera/altera_tse_main.c dev->name, phydev->duplex); phydev 647 drivers/net/ethernet/altera/altera_tse_main.c priv->oldduplex = phydev->duplex; phydev 651 drivers/net/ethernet/altera/altera_tse_main.c if (phydev->speed != priv->oldspeed) { phydev 653 drivers/net/ethernet/altera/altera_tse_main.c switch (phydev->speed) { phydev 669 drivers/net/ethernet/altera/altera_tse_main.c phydev->speed); phydev 672 drivers/net/ethernet/altera/altera_tse_main.c priv->oldspeed = phydev->speed; phydev 688 drivers/net/ethernet/altera/altera_tse_main.c phy_print_status(phydev); phydev 695 drivers/net/ethernet/altera/altera_tse_main.c struct phy_device *phydev = NULL; phydev 704 drivers/net/ethernet/altera/altera_tse_main.c phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link, phydev 706 drivers/net/ethernet/altera/altera_tse_main.c if (IS_ERR(phydev)) { phydev 708 drivers/net/ethernet/altera/altera_tse_main.c phydev = NULL; phydev 713 drivers/net/ethernet/altera/altera_tse_main.c phydev = phy_find_first(priv->mdio); phydev 714 drivers/net/ethernet/altera/altera_tse_main.c if (phydev == NULL) { phydev 716 drivers/net/ethernet/altera/altera_tse_main.c return phydev; phydev 719 drivers/net/ethernet/altera/altera_tse_main.c ret = phy_connect_direct(dev, phydev, &altera_tse_adjust_link, phydev 723 drivers/net/ethernet/altera/altera_tse_main.c phydev = NULL; phydev 726 drivers/net/ethernet/altera/altera_tse_main.c return phydev; phydev 772 drivers/net/ethernet/altera/altera_tse_main.c struct phy_device *phydev; phydev 803 drivers/net/ethernet/altera/altera_tse_main.c phydev = of_phy_connect(dev, phynode, phydev 812 drivers/net/ethernet/altera/altera_tse_main.c phydev = connect_local_phy(dev); phydev 816 drivers/net/ethernet/altera/altera_tse_main.c phydev = of_phy_connect(dev, phynode, phydev 821 drivers/net/ethernet/altera/altera_tse_main.c if (!phydev) { phydev 832 drivers/net/ethernet/altera/altera_tse_main.c phy_set_max_speed(phydev, SPEED_100); phydev 840 drivers/net/ethernet/altera/altera_tse_main.c if ((phydev->phy_id == 0) && !fixed_link) { phydev 841 drivers/net/ethernet/altera/altera_tse_main.c netdev_err(dev, "Bad PHY UID 0x%08x\n", phydev->phy_id); phydev 842 drivers/net/ethernet/altera/altera_tse_main.c phy_disconnect(phydev); phydev 847 drivers/net/ethernet/altera/altera_tse_main.c phydev->mdio.addr, phydev->phy_id, phydev->link); phydev 1235 drivers/net/ethernet/altera/altera_tse_main.c if (dev->phydev) phydev 1236 drivers/net/ethernet/altera/altera_tse_main.c phy_start(dev->phydev); phydev 1268 drivers/net/ethernet/altera/altera_tse_main.c if (dev->phydev) phydev 1269 drivers/net/ethernet/altera/altera_tse_main.c phy_stop(dev->phydev); phydev 1613 drivers/net/ethernet/altera/altera_tse_main.c if (ndev->phydev) { phydev 1614 drivers/net/ethernet/altera/altera_tse_main.c phy_disconnect(ndev->phydev); phydev 398 drivers/net/ethernet/amd/au1000_eth.c struct phy_device *phydev = dev->phydev; phydev 404 drivers/net/ethernet/amd/au1000_eth.c BUG_ON(!phydev); phydev 408 drivers/net/ethernet/amd/au1000_eth.c if (phydev->link && (aup->old_speed != phydev->speed)) { phydev 411 drivers/net/ethernet/amd/au1000_eth.c switch (phydev->speed) { phydev 417 drivers/net/ethernet/amd/au1000_eth.c phydev->speed); phydev 421 drivers/net/ethernet/amd/au1000_eth.c aup->old_speed = phydev->speed; phydev 426 drivers/net/ethernet/amd/au1000_eth.c if (phydev->link && (aup->old_duplex != phydev->duplex)) { phydev 433 drivers/net/ethernet/amd/au1000_eth.c if (DUPLEX_FULL == phydev->duplex) { phydev 445 drivers/net/ethernet/amd/au1000_eth.c aup->old_duplex = phydev->duplex; phydev 450 drivers/net/ethernet/amd/au1000_eth.c if (phydev->link != aup->old_link) { phydev 453 drivers/net/ethernet/amd/au1000_eth.c if (!phydev->link) { phydev 459 drivers/net/ethernet/amd/au1000_eth.c aup->old_link = phydev->link; phydev 466 drivers/net/ethernet/amd/au1000_eth.c if (phydev->link) phydev 468 drivers/net/ethernet/amd/au1000_eth.c phydev->speed, phydev 469 drivers/net/ethernet/amd/au1000_eth.c DUPLEX_FULL == phydev->duplex ? "Full" : "Half"); phydev 478 drivers/net/ethernet/amd/au1000_eth.c struct phy_device *phydev = NULL; phydev 485 drivers/net/ethernet/amd/au1000_eth.c phydev = mdiobus_get_phy(aup->mii_bus, aup->phy_addr); phydev 496 drivers/net/ethernet/amd/au1000_eth.c phydev = mdiobus_get_phy(aup->mii_bus, phy_addr); phydev 504 drivers/net/ethernet/amd/au1000_eth.c if (!phydev && (aup->mac_id == 1)) { phydev 528 drivers/net/ethernet/amd/au1000_eth.c phydev = tmp_phydev; phydev 534 drivers/net/ethernet/amd/au1000_eth.c if (!phydev) { phydev 540 drivers/net/ethernet/amd/au1000_eth.c BUG_ON(phydev->attached_dev); phydev 542 drivers/net/ethernet/amd/au1000_eth.c phydev = phy_connect(dev, phydev_name(phydev), phydev 545 drivers/net/ethernet/amd/au1000_eth.c if (IS_ERR(phydev)) { phydev 547 drivers/net/ethernet/amd/au1000_eth.c return PTR_ERR(phydev); phydev 550 drivers/net/ethernet/amd/au1000_eth.c phy_set_max_speed(phydev, SPEED_100); phydev 556 drivers/net/ethernet/amd/au1000_eth.c phy_attached_info(phydev); phydev 730 drivers/net/ethernet/amd/au1000_eth.c if (dev->phydev) { phydev 731 drivers/net/ethernet/amd/au1000_eth.c if (dev->phydev->link && (DUPLEX_FULL == dev->phydev->duplex)) phydev 846 drivers/net/ethernet/amd/au1000_eth.c if (!dev->phydev || (DUPLEX_FULL == dev->phydev->duplex)) { phydev 926 drivers/net/ethernet/amd/au1000_eth.c if (dev->phydev) phydev 927 drivers/net/ethernet/amd/au1000_eth.c phy_start(dev->phydev); phydev 943 drivers/net/ethernet/amd/au1000_eth.c if (dev->phydev) phydev 944 drivers/net/ethernet/amd/au1000_eth.c phy_stop(dev->phydev); phydev 1061 drivers/net/ethernet/amd/au1000_eth.c if (!dev->phydev) phydev 1064 drivers/net/ethernet/amd/au1000_eth.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 367 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c struct phy_device *phydev; phydev 850 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev) { phydev 851 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_detach(phy_data->phydev); phydev 852 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_device_remove(phy_data->phydev); phydev 853 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_device_free(phy_data->phydev); phydev 854 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_data->phydev = NULL; phydev 862 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c unsigned int phy_id = phy_data->phydev->phy_id; phydev 871 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x16, 0x0001); phydev 872 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x00, 0x9140); phydev 873 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x16, 0x0000); phydev 876 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1b, 0x9084); phydev 877 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x09, 0x0e00); phydev 878 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x00, 0x8140); phydev 879 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x04, 0x0d01); phydev 880 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x00, 0x9140); phydev 889 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c linkmode_copy(phy_data->phydev->supported, supported); phydev 891 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_support_asym_pause(phy_data->phydev); phydev 904 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c unsigned int phy_id = phy_data->phydev->phy_id; phydev 925 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x18, 0x7007); phydev 926 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x18); phydev 927 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x18, reg & ~0x0080); phydev 930 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1c, 0x7c00); phydev 931 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x1c); phydev 934 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1c, 0x8000 | 0x7c00 | reg | 0x0001); phydev 937 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x00); phydev 938 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x00, reg | 0x00800); phydev 941 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1c, 0x7c00); phydev 942 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x1c); phydev 945 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1c, 0x8000 | 0x7c00 | reg | 0x0004); phydev 948 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x00); phydev 949 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x00, reg & ~0x00800); phydev 952 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1c, 0x7c00); phydev 953 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x1c); phydev 956 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x1c, 0x8000 | 0x7c00 | reg); phydev 959 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c reg = phy_read(phy_data->phydev, 0x00); phydev 960 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_write(phy_data->phydev, 0x00, reg & ~0x00800); phydev 968 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c linkmode_copy(phy_data->phydev->supported, supported); phydev 969 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_support_asym_pause(phy_data->phydev); phydev 990 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c struct phy_device *phydev; phydev 994 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev) phydev 1020 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phydev = get_phy_device(phy_data->mii, phy_data->mdio_addr, phydev 1022 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (IS_ERR(phydev)) { phydev 1027 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phydev->phy_id); phydev 1031 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ret = phy_device_register(phydev); phydev 1034 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_device_free(phydev); phydev 1038 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ret = phy_attach_direct(pdata->netdev, phydev, phydev->dev_flags, phydev 1042 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_device_remove(phydev); phydev 1043 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_device_free(phydev); phydev 1046 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_data->phydev = phydev; phydev 1050 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c linkmode_and(phydev->advertising, phydev->advertising, phydev 1053 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_start_aneg(phy_data->phydev); phydev 1507 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (!phy_data->phydev) phydev 1510 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c lcl_adv = linkmode_adv_to_lcl_adv_t(phy_data->phydev->advertising); phydev 1512 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev->pause) { phydev 1516 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev->asym_pause) { phydev 1654 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev && phydev 1655 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c (phy_data->phydev->speed == SPEED_100)) phydev 1669 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev && phydev 1670 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c (phy_data->phydev->speed == SPEED_100)) phydev 1796 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev && phydev 1797 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c (phy_data->phydev->speed == SPEED_10000)) phydev 1834 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (!phy_data->phydev) phydev 1837 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_data->phydev->autoneg = pdata->phy.autoneg; phydev 1838 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c linkmode_and(phy_data->phydev->advertising, phydev 1839 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_data->phydev->supported, phydev 1843 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_data->phydev->speed = pdata->phy.speed; phydev 1844 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c phy_data->phydev->duplex = pdata->phy.duplex; phydev 1847 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ret = phy_start_aneg(phy_data->phydev); phydev 2556 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (phy_data->phydev) { phydev 2558 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ret = phy_read_status(phy_data->phydev); phydev 2563 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c !phy_aneg_done(phy_data->phydev)) phydev 2566 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (!phy_data->phydev->link) phydev 3059 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c if (!phy_data->phydev) phydev 3067 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c return phy_init_hw(phy_data->phydev); phydev 143 drivers/net/ethernet/apm/xgene-v2/ethtool.c struct phy_device *phydev = ndev->phydev; phydev 145 drivers/net/ethernet/apm/xgene-v2/ethtool.c if (!phydev) phydev 148 drivers/net/ethernet/apm/xgene-v2/ethtool.c phy_ethtool_ksettings_get(phydev, cmd); phydev 156 drivers/net/ethernet/apm/xgene-v2/ethtool.c struct phy_device *phydev = ndev->phydev; phydev 158 drivers/net/ethernet/apm/xgene-v2/ethtool.c if (!phydev) phydev 161 drivers/net/ethernet/apm/xgene-v2/ethtool.c return phy_ethtool_ksettings_set(phydev, cmd); phydev 487 drivers/net/ethernet/apm/xgene-v2/main.c phy_start(ndev->phydev); phydev 500 drivers/net/ethernet/apm/xgene-v2/main.c phy_stop(ndev->phydev); phydev 66 drivers/net/ethernet/apm/xgene-v2/mdio.c struct phy_device *phydev = ndev->phydev; phydev 68 drivers/net/ethernet/apm/xgene-v2/mdio.c if (phydev->link) { phydev 69 drivers/net/ethernet/apm/xgene-v2/mdio.c if (pdata->phy_speed != phydev->speed) { phydev 70 drivers/net/ethernet/apm/xgene-v2/mdio.c pdata->phy_speed = phydev->speed; phydev 73 drivers/net/ethernet/apm/xgene-v2/mdio.c phy_print_status(phydev); phydev 79 drivers/net/ethernet/apm/xgene-v2/mdio.c phy_print_status(phydev); phydev 89 drivers/net/ethernet/apm/xgene-v2/mdio.c if (ndev->phydev) phydev 90 drivers/net/ethernet/apm/xgene-v2/mdio.c phy_disconnect(ndev->phydev); phydev 104 drivers/net/ethernet/apm/xgene-v2/mdio.c struct phy_device *phydev; phydev 124 drivers/net/ethernet/apm/xgene-v2/mdio.c phydev = phy_find_first(mdio_bus); phydev 125 drivers/net/ethernet/apm/xgene-v2/mdio.c if (!phydev) { phydev 130 drivers/net/ethernet/apm/xgene-v2/mdio.c phydev = phy_connect(ndev, phydev_name(phydev), phydev 134 drivers/net/ethernet/apm/xgene-v2/mdio.c if (IS_ERR(phydev)) { phydev 136 drivers/net/ethernet/apm/xgene-v2/mdio.c ret = PTR_ERR(phydev); phydev 149 drivers/net/ethernet/apm/xgene-v2/mdio.c linkmode_andnot(phydev->supported, phydev->supported, mask); phydev 150 drivers/net/ethernet/apm/xgene-v2/mdio.c linkmode_copy(phydev->advertising, phydev->supported); phydev 115 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c struct phy_device *phydev = ndev->phydev; phydev 119 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c if (phydev == NULL) phydev 122 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c phy_ethtool_ksettings_get(phydev, cmd); phydev 127 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c if (!phydev) phydev 130 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c phy_ethtool_ksettings_get(phydev, cmd); phydev 170 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c struct phy_device *phydev = ndev->phydev; phydev 173 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c if (!phydev) phydev 176 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c return phy_ethtool_ksettings_set(phydev, cmd); phydev 181 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c if (!phydev) phydev 184 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c return phy_ethtool_ksettings_set(phydev, cmd); phydev 296 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c struct phy_device *phydev = ndev->phydev; phydev 300 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c if (!phydev) phydev 303 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c if (!phy_validate_pause(phydev, pp)) phydev 310 drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c phy_set_asym_pause(phydev, pp->rx_pause, pp->tx_pause); phydev 262 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (pdata->mdio_driver && ndev->phydev && phydev 264 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c struct mii_bus *bus = ndev->phydev->mdio.bus; phydev 321 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (pdata->mdio_driver && ndev->phydev && phydev 323 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c struct mii_bus *bus = ndev->phydev->mdio.bus; phydev 761 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c struct phy_device *phydev = ndev->phydev; phydev 766 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (!phydev->duplex || !pdata->pause_autoneg) phydev 777 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (phydev->pause) phydev 780 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (phydev->asym_pause) phydev 804 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c struct phy_device *phydev = ndev->phydev; phydev 806 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (phydev->link) { phydev 807 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (pdata->phy_speed != phydev->speed) { phydev 808 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c pdata->phy_speed = phydev->speed; phydev 812 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c phy_print_status(phydev); phydev 820 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c phy_print_status(phydev); phydev 981 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (ndev->phydev) phydev 982 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c phy_disconnect(ndev->phydev); phydev 989 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c if (ndev->phydev) phydev 990 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c phy_disconnect(ndev->phydev); phydev 1008 drivers/net/ethernet/apm/xgene/xgene_enet_main.c if (ndev->phydev) { phydev 1009 drivers/net/ethernet/apm/xgene/xgene_enet_main.c phy_start(ndev->phydev); phydev 1032 drivers/net/ethernet/apm/xgene/xgene_enet_main.c if (ndev->phydev) phydev 1033 drivers/net/ethernet/apm/xgene/xgene_enet_main.c phy_stop(ndev->phydev); phydev 49 drivers/net/ethernet/arc/emac_main.c struct phy_device *phy_dev = ndev->phydev; phydev 426 drivers/net/ethernet/arc/emac_main.c struct phy_device *phy_dev = ndev->phydev; phydev 498 drivers/net/ethernet/arc/emac_main.c phy_start(ndev->phydev); phydev 620 drivers/net/ethernet/arc/emac_main.c phy_stop(ndev->phydev); phydev 789 drivers/net/ethernet/arc/emac_main.c if (!dev->phydev) phydev 792 drivers/net/ethernet/arc/emac_main.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 871 drivers/net/ethernet/arc/emac_main.c struct phy_device *phydev = NULL; phydev 990 drivers/net/ethernet/arc/emac_main.c phydev = of_phy_connect(ndev, phy_node, arc_emac_adjust_link, 0, phydev 992 drivers/net/ethernet/arc/emac_main.c if (!phydev) { phydev 999 drivers/net/ethernet/arc/emac_main.c phydev->drv->name, phydev->phy_id); phydev 1014 drivers/net/ethernet/arc/emac_main.c phy_disconnect(phydev); phydev 1031 drivers/net/ethernet/arc/emac_main.c phy_disconnect(ndev->phydev); phydev 850 drivers/net/ethernet/atheros/ag71xx.c struct phy_device *phydev = ag->ndev->phydev; phydev 855 drivers/net/ethernet/atheros/ag71xx.c if (!phydev->link && update) { phydev 865 drivers/net/ethernet/atheros/ag71xx.c cfg2 |= (phydev->duplex) ? MAC_CFG2_FDX : 0; phydev 873 drivers/net/ethernet/atheros/ag71xx.c switch (phydev->speed) { phydev 886 drivers/net/ethernet/atheros/ag71xx.c WARN(1, "not supported speed %i\n", phydev->speed); phydev 904 drivers/net/ethernet/atheros/ag71xx.c phy_print_status(phydev); phydev 919 drivers/net/ethernet/atheros/ag71xx.c struct phy_device *phydev; phydev 940 drivers/net/ethernet/atheros/ag71xx.c phydev = of_phy_connect(ag->ndev, phy_node, ag71xx_phy_link_adjust, phydev 945 drivers/net/ethernet/atheros/ag71xx.c if (!phydev) { phydev 950 drivers/net/ethernet/atheros/ag71xx.c phy_attached_info(phydev); phydev 1258 drivers/net/ethernet/atheros/ag71xx.c phy_start(ndev->phydev); phydev 1271 drivers/net/ethernet/atheros/ag71xx.c phy_stop(ndev->phydev); phydev 1272 drivers/net/ethernet/atheros/ag71xx.c phy_disconnect(ndev->phydev); phydev 1399 drivers/net/ethernet/atheros/ag71xx.c if (!ndev->phydev) phydev 1402 drivers/net/ethernet/atheros/ag71xx.c return phy_mii_ioctl(ndev->phydev, ifr, cmd); phydev 1430 drivers/net/ethernet/atheros/ag71xx.c if (ndev->phydev->link) phydev 602 drivers/net/ethernet/aurora/nb8800.c if (phy_interface_is_rgmii(dev->phydev)) phydev 625 drivers/net/ethernet/aurora/nb8800.c struct phy_device *phydev = dev->phydev; phydev 629 drivers/net/ethernet/aurora/nb8800.c if (!phydev || !phydev->link) phydev 632 drivers/net/ethernet/aurora/nb8800.c priv->pause_rx = phydev->pause; phydev 633 drivers/net/ethernet/aurora/nb8800.c priv->pause_tx = phydev->pause ^ phydev->asym_pause; phydev 658 drivers/net/ethernet/aurora/nb8800.c struct phy_device *phydev = dev->phydev; phydev 661 drivers/net/ethernet/aurora/nb8800.c if (phydev->link) { phydev 662 drivers/net/ethernet/aurora/nb8800.c if (phydev->speed != priv->speed) { phydev 663 drivers/net/ethernet/aurora/nb8800.c priv->speed = phydev->speed; phydev 667 drivers/net/ethernet/aurora/nb8800.c if (phydev->duplex != priv->duplex) { phydev 668 drivers/net/ethernet/aurora/nb8800.c priv->duplex = phydev->duplex; phydev 678 drivers/net/ethernet/aurora/nb8800.c if (phydev->link != priv->link) { phydev 679 drivers/net/ethernet/aurora/nb8800.c priv->link = phydev->link; phydev 684 drivers/net/ethernet/aurora/nb8800.c phy_print_status(phydev); phydev 929 drivers/net/ethernet/aurora/nb8800.c struct phy_device *phydev = dev->phydev; phydev 931 drivers/net/ethernet/aurora/nb8800.c if (!phydev) phydev 934 drivers/net/ethernet/aurora/nb8800.c phy_set_asym_pause(phydev, priv->pause_rx, priv->pause_tx); phydev 940 drivers/net/ethernet/aurora/nb8800.c struct phy_device *phydev; phydev 958 drivers/net/ethernet/aurora/nb8800.c phydev = of_phy_connect(dev, priv->phy_node, phydev 961 drivers/net/ethernet/aurora/nb8800.c if (!phydev) { phydev 973 drivers/net/ethernet/aurora/nb8800.c phy_start(phydev); phydev 988 drivers/net/ethernet/aurora/nb8800.c struct phy_device *phydev = dev->phydev; phydev 990 drivers/net/ethernet/aurora/nb8800.c phy_stop(phydev); phydev 999 drivers/net/ethernet/aurora/nb8800.c phy_disconnect(phydev); phydev 1010 drivers/net/ethernet/aurora/nb8800.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 1037 drivers/net/ethernet/aurora/nb8800.c struct phy_device *phydev = dev->phydev; phydev 1047 drivers/net/ethernet/aurora/nb8800.c else if (phydev) phydev 1048 drivers/net/ethernet/aurora/nb8800.c phy_start_aneg(phydev); phydev 1484 drivers/net/ethernet/broadcom/b44.c phy_start(dev->phydev); phydev 1652 drivers/net/ethernet/broadcom/b44.c phy_stop(dev->phydev); phydev 1839 drivers/net/ethernet/broadcom/b44.c BUG_ON(!dev->phydev); phydev 1840 drivers/net/ethernet/broadcom/b44.c phy_ethtool_ksettings_get(dev->phydev, cmd); phydev 1895 drivers/net/ethernet/broadcom/b44.c BUG_ON(!dev->phydev); phydev 1900 drivers/net/ethernet/broadcom/b44.c ret = phy_ethtool_ksettings_set(dev->phydev, cmd); phydev 2149 drivers/net/ethernet/broadcom/b44.c BUG_ON(!dev->phydev); phydev 2150 drivers/net/ethernet/broadcom/b44.c err = phy_mii_ioctl(dev->phydev, ifr, cmd); phydev 2218 drivers/net/ethernet/broadcom/b44.c struct phy_device *phydev = dev->phydev; phydev 2221 drivers/net/ethernet/broadcom/b44.c BUG_ON(!phydev); phydev 2223 drivers/net/ethernet/broadcom/b44.c if (bp->old_link != phydev->link) { phydev 2225 drivers/net/ethernet/broadcom/b44.c bp->old_link = phydev->link; phydev 2229 drivers/net/ethernet/broadcom/b44.c if (phydev->link) { phydev 2230 drivers/net/ethernet/broadcom/b44.c if ((phydev->duplex == DUPLEX_HALF) && phydev 2234 drivers/net/ethernet/broadcom/b44.c } else if ((phydev->duplex == DUPLEX_FULL) && phydev 2248 drivers/net/ethernet/broadcom/b44.c phy_print_status(phydev); phydev 2257 drivers/net/ethernet/broadcom/b44.c struct phy_device *phydev; phydev 2300 drivers/net/ethernet/broadcom/b44.c phydev = phy_connect(bp->dev, bus_id, &b44_adjust_link, phydev 2302 drivers/net/ethernet/broadcom/b44.c if (IS_ERR(phydev)) { phydev 2305 drivers/net/ethernet/broadcom/b44.c err = PTR_ERR(phydev); phydev 2314 drivers/net/ethernet/broadcom/b44.c linkmode_and(phydev->supported, phydev->supported, mask); phydev 2315 drivers/net/ethernet/broadcom/b44.c linkmode_copy(phydev->advertising, phydev->supported); phydev 2318 drivers/net/ethernet/broadcom/b44.c bp->phy_addr = phydev->mdio.addr; phydev 2320 drivers/net/ethernet/broadcom/b44.c phy_attached_info(phydev); phydev 2339 drivers/net/ethernet/broadcom/b44.c phy_disconnect(dev->phydev); phydev 774 drivers/net/ethernet/broadcom/bcm63xx_enet.c struct phy_device *phydev; phydev 778 drivers/net/ethernet/broadcom/bcm63xx_enet.c phydev = dev->phydev; phydev 781 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (priv->old_link != phydev->link) { phydev 783 drivers/net/ethernet/broadcom/bcm63xx_enet.c priv->old_link = phydev->link; phydev 787 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (phydev->link && phydev->duplex != priv->old_duplex) { phydev 789 drivers/net/ethernet/broadcom/bcm63xx_enet.c (phydev->duplex == DUPLEX_FULL) ? 1 : 0); phydev 791 drivers/net/ethernet/broadcom/bcm63xx_enet.c priv->old_duplex = phydev->duplex; phydev 796 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (phydev->link && phydev->pause != priv->old_pause) { phydev 799 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (phydev->pause) { phydev 814 drivers/net/ethernet/broadcom/bcm63xx_enet.c priv->old_pause = phydev->pause; phydev 818 drivers/net/ethernet/broadcom/bcm63xx_enet.c pr_info("%s: link %s", dev->name, phydev->link ? phydev 820 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (phydev->link) phydev 821 drivers/net/ethernet/broadcom/bcm63xx_enet.c pr_cont(" - %d/%s - flow control %s", phydev->speed, phydev 822 drivers/net/ethernet/broadcom/bcm63xx_enet.c DUPLEX_FULL == phydev->duplex ? "full" : "half", phydev 823 drivers/net/ethernet/broadcom/bcm63xx_enet.c phydev->pause == 1 ? "rx&tx" : "off"); phydev 857 drivers/net/ethernet/broadcom/bcm63xx_enet.c struct phy_device *phydev; phydev 872 drivers/net/ethernet/broadcom/bcm63xx_enet.c phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, phydev 875 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (IS_ERR(phydev)) { phydev 877 drivers/net/ethernet/broadcom/bcm63xx_enet.c return PTR_ERR(phydev); phydev 881 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_support_sym_pause(phydev); phydev 882 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_set_max_speed(phydev, SPEED_100); phydev 883 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_set_sym_pause(phydev, priv->pause_rx, priv->pause_rx, phydev 886 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_attached_info(phydev); phydev 892 drivers/net/ethernet/broadcom/bcm63xx_enet.c phydev = NULL; phydev 1064 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (phydev) phydev 1065 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_start(phydev); phydev 1107 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (phydev) phydev 1108 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_disconnect(phydev); phydev 1171 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_stop(dev->phydev); phydev 1216 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_disconnect(dev->phydev); phydev 1430 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (!dev->phydev) phydev 1433 drivers/net/ethernet/broadcom/bcm63xx_enet.c phy_ethtool_ksettings_get(dev->phydev, cmd); phydev 1463 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (!dev->phydev) phydev 1465 drivers/net/ethernet/broadcom/bcm63xx_enet.c return phy_ethtool_ksettings_set(dev->phydev, cmd); phydev 1587 drivers/net/ethernet/broadcom/bcm63xx_enet.c if (!dev->phydev) phydev 1589 drivers/net/ethernet/broadcom/bcm63xx_enet.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 1372 drivers/net/ethernet/broadcom/bcmsysport.c struct phy_device *phydev = dev->phydev; phydev 1376 drivers/net/ethernet/broadcom/bcmsysport.c if (priv->old_link != phydev->link) { phydev 1378 drivers/net/ethernet/broadcom/bcmsysport.c priv->old_link = phydev->link; phydev 1381 drivers/net/ethernet/broadcom/bcmsysport.c if (priv->old_duplex != phydev->duplex) { phydev 1383 drivers/net/ethernet/broadcom/bcmsysport.c priv->old_duplex = phydev->duplex; phydev 1389 drivers/net/ethernet/broadcom/bcmsysport.c switch (phydev->speed) { phydev 1407 drivers/net/ethernet/broadcom/bcmsysport.c if (phydev->duplex == DUPLEX_HALF) phydev 1410 drivers/net/ethernet/broadcom/bcmsysport.c if (priv->old_pause != phydev->pause) { phydev 1412 drivers/net/ethernet/broadcom/bcmsysport.c priv->old_pause = phydev->pause; phydev 1415 drivers/net/ethernet/broadcom/bcmsysport.c if (!phydev->pause) phydev 1421 drivers/net/ethernet/broadcom/bcmsysport.c if (phydev->link) { phydev 1431 drivers/net/ethernet/broadcom/bcmsysport.c phy_print_status(phydev); phydev 1857 drivers/net/ethernet/broadcom/bcmsysport.c phy_start(dev->phydev); phydev 1912 drivers/net/ethernet/broadcom/bcmsysport.c struct phy_device *phydev; phydev 1942 drivers/net/ethernet/broadcom/bcmsysport.c phydev = of_phy_connect(dev, priv->phy_dn, bcm_sysport_adj_link, phydev 1944 drivers/net/ethernet/broadcom/bcmsysport.c if (!phydev) { phydev 2023 drivers/net/ethernet/broadcom/bcmsysport.c phy_disconnect(phydev); phydev 2035 drivers/net/ethernet/broadcom/bcmsysport.c phy_stop(dev->phydev); phydev 2080 drivers/net/ethernet/broadcom/bcmsysport.c phy_disconnect(dev->phydev); phydev 2673 drivers/net/ethernet/broadcom/bcmsysport.c phy_suspend(dev->phydev); phydev 2796 drivers/net/ethernet/broadcom/bcmsysport.c phy_resume(dev->phydev); phydev 173 drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c if (bgmac->net_dev && bgmac->net_dev->phydev) phydev 174 drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c phy_init_hw(bgmac->net_dev->phydev); phydev 187 drivers/net/ethernet/broadcom/bgmac-bcma.c struct phy_device *phydev; phydev 196 drivers/net/ethernet/broadcom/bgmac-bcma.c phydev = mdiobus_get_phy(bgmac->mii_bus, bgmac->phyaddr); phydev 197 drivers/net/ethernet/broadcom/bgmac-bcma.c if (ci->id == BCMA_CHIP_ID_BCM53573 && phydev && phydev 198 drivers/net/ethernet/broadcom/bgmac-bcma.c (phydev->drv->phy_id & phydev->drv->phy_id_mask) == PHY_ID_BCM54210E) phydev 199 drivers/net/ethernet/broadcom/bgmac-bcma.c phydev->dev_flags |= PHY_BRCM_EN_MASTER_MODE; phydev 131 drivers/net/ethernet/broadcom/bgmac-platform.c switch (bgmac->net_dev->phydev->speed) { phydev 1198 drivers/net/ethernet/broadcom/bgmac.c phy_start(net_dev->phydev); phydev 1211 drivers/net/ethernet/broadcom/bgmac.c phy_stop(net_dev->phydev); phydev 1256 drivers/net/ethernet/broadcom/bgmac.c return phy_mii_ioctl(net_dev->phydev, ifr, cmd); phydev 1417 drivers/net/ethernet/broadcom/bgmac.c struct phy_device *phy_dev = net_dev->phydev; phydev 1552 drivers/net/ethernet/broadcom/bgmac.c phy_disconnect(net_dev->phydev); phydev 1564 drivers/net/ethernet/broadcom/bgmac.c phy_disconnect(bgmac->net_dev->phydev); phydev 1576 drivers/net/ethernet/broadcom/bgmac.c phy_stop(bgmac->net_dev->phydev); phydev 1615 drivers/net/ethernet/broadcom/bgmac.c phy_start(bgmac->net_dev->phydev); phydev 491 drivers/net/ethernet/broadcom/genet/bcmgenet.c if (!dev->phydev) phydev 494 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_ethtool_ksettings_get(dev->phydev, cmd); phydev 505 drivers/net/ethernet/broadcom/genet/bcmgenet.c if (!dev->phydev) phydev 508 drivers/net/ethernet/broadcom/genet/bcmgenet.c return phy_ethtool_ksettings_set(dev->phydev, cmd); phydev 1069 drivers/net/ethernet/broadcom/genet/bcmgenet.c if (!dev->phydev) phydev 1076 drivers/net/ethernet/broadcom/genet/bcmgenet.c return phy_ethtool_get_eee(dev->phydev, e); phydev 1088 drivers/net/ethernet/broadcom/genet/bcmgenet.c if (!dev->phydev) phydev 1096 drivers/net/ethernet/broadcom/genet/bcmgenet.c ret = phy_init_eee(dev->phydev, 0); phydev 1106 drivers/net/ethernet/broadcom/genet/bcmgenet.c return phy_ethtool_set_eee(dev->phydev, e); phydev 1141 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_detach(priv->dev->phydev); phydev 1229 drivers/net/ethernet/broadcom/genet/bcmgenet.c if (!dev->phydev) phydev 1232 drivers/net/ethernet/broadcom/genet/bcmgenet.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 2618 drivers/net/ethernet/broadcom/genet/bcmgenet.c priv->dev->phydev->autoneg != AUTONEG_ENABLE) { phydev 2619 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_init_hw(priv->dev->phydev); phydev 2620 drivers/net/ethernet/broadcom/genet/bcmgenet.c genphy_config_aneg(priv->dev->phydev); phydev 2625 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_mac_interrupt(priv->dev->phydev); phydev 2864 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_start(dev->phydev); phydev 2973 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_stop(dev->phydev); phydev 3002 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_disconnect(dev->phydev); phydev 3640 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_init_hw(dev->phydev); phydev 3643 drivers/net/ethernet/broadcom/genet/bcmgenet.c genphy_config_aneg(dev->phydev); phydev 3671 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_resume(dev->phydev); phydev 3703 drivers/net/ethernet/broadcom/genet/bcmgenet.c phy_suspend(dev->phydev); phydev 34 drivers/net/ethernet/broadcom/genet/bcmmii.c struct phy_device *phydev = dev->phydev; phydev 38 drivers/net/ethernet/broadcom/genet/bcmmii.c if (priv->old_link != phydev->link) { phydev 40 drivers/net/ethernet/broadcom/genet/bcmmii.c priv->old_link = phydev->link; phydev 43 drivers/net/ethernet/broadcom/genet/bcmmii.c if (phydev->link) { phydev 45 drivers/net/ethernet/broadcom/genet/bcmmii.c if (priv->old_speed != phydev->speed) { phydev 47 drivers/net/ethernet/broadcom/genet/bcmmii.c priv->old_speed = phydev->speed; phydev 50 drivers/net/ethernet/broadcom/genet/bcmmii.c if (priv->old_duplex != phydev->duplex) { phydev 52 drivers/net/ethernet/broadcom/genet/bcmmii.c priv->old_duplex = phydev->duplex; phydev 55 drivers/net/ethernet/broadcom/genet/bcmmii.c if (priv->old_pause != phydev->pause) { phydev 57 drivers/net/ethernet/broadcom/genet/bcmmii.c priv->old_pause = phydev->pause; phydev 65 drivers/net/ethernet/broadcom/genet/bcmmii.c if (phydev->speed == SPEED_1000) phydev 67 drivers/net/ethernet/broadcom/genet/bcmmii.c else if (phydev->speed == SPEED_100) phydev 74 drivers/net/ethernet/broadcom/genet/bcmmii.c if (phydev->duplex != DUPLEX_FULL) phydev 78 drivers/net/ethernet/broadcom/genet/bcmmii.c if (!phydev->pause) phydev 108 drivers/net/ethernet/broadcom/genet/bcmmii.c phy_print_status(phydev); phydev 118 drivers/net/ethernet/broadcom/genet/bcmmii.c if (dev && dev->phydev && status) { phydev 172 drivers/net/ethernet/broadcom/genet/bcmmii.c fixed_phy_set_link_update(priv->dev->phydev, phydev 179 drivers/net/ethernet/broadcom/genet/bcmmii.c struct phy_device *phydev = dev->phydev; phydev 193 drivers/net/ethernet/broadcom/genet/bcmmii.c ret = phy_read(phydev, MII_BMCR); phydev 196 drivers/net/ethernet/broadcom/genet/bcmmii.c ret = phy_write(phydev, MII_BMCR, phydev 244 drivers/net/ethernet/broadcom/genet/bcmmii.c phy_set_max_speed(phydev, SPEED_100); phydev 249 drivers/net/ethernet/broadcom/genet/bcmmii.c phy_write(phydev, MII_BMCR, bmcr); phydev 260 drivers/net/ethernet/broadcom/genet/bcmmii.c dev->phydev->supported)) phydev 312 drivers/net/ethernet/broadcom/genet/bcmmii.c struct phy_device *phydev; phydev 327 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev = of_phy_connect(dev, priv->phy_dn, bcmgenet_mii_setup, phydev 329 drivers/net/ethernet/broadcom/genet/bcmmii.c if (!phydev) { phydev 334 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev = dev->phydev; phydev 335 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev->dev_flags = phy_flags; phydev 337 drivers/net/ethernet/broadcom/genet/bcmmii.c ret = phy_connect_direct(dev, phydev, bcmgenet_mii_setup, phydev 352 drivers/net/ethernet/broadcom/genet/bcmmii.c phy_disconnect(dev->phydev); phydev 356 drivers/net/ethernet/broadcom/genet/bcmmii.c linkmode_copy(phydev->advertising, phydev->supported); phydev 365 drivers/net/ethernet/broadcom/genet/bcmmii.c dev->phydev->irq = PHY_IGNORE_INTERRUPT; phydev 481 drivers/net/ethernet/broadcom/genet/bcmmii.c struct phy_device *phydev; phydev 517 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev = of_phy_find_device(dn); phydev 518 drivers/net/ethernet/broadcom/genet/bcmmii.c if (phydev) { phydev 519 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev->link = 0; phydev 520 drivers/net/ethernet/broadcom/genet/bcmmii.c put_device(&phydev->mdio.dev); phydev 533 drivers/net/ethernet/broadcom/genet/bcmmii.c struct phy_device *phydev; phydev 545 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev = phy_attach(priv->dev, phy_name, pd->phy_interface); phydev 546 drivers/net/ethernet/broadcom/genet/bcmmii.c if (!phydev) { phydev 563 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL); phydev 564 drivers/net/ethernet/broadcom/genet/bcmmii.c if (!phydev || IS_ERR(phydev)) { phydev 570 drivers/net/ethernet/broadcom/genet/bcmmii.c phydev->link = 0; phydev 1419 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 1421 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 1422 drivers/net/ethernet/broadcom/tg3.c switch (phydev->drv->phy_id & phydev->drv->phy_id_mask) { phydev 1440 drivers/net/ethernet/broadcom/tg3.c if (phydev->interface != PHY_INTERFACE_MODE_RGMII) { phydev 1512 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 1569 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 1571 drivers/net/ethernet/broadcom/tg3.c if (!phydev || !phydev->drv) { phydev 1578 drivers/net/ethernet/broadcom/tg3.c switch (phydev->drv->phy_id & phydev->drv->phy_id_mask) { phydev 1580 drivers/net/ethernet/broadcom/tg3.c phydev->interface = PHY_INTERFACE_MODE_GMII; phydev 1581 drivers/net/ethernet/broadcom/tg3.c phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE; phydev 1585 drivers/net/ethernet/broadcom/tg3.c phydev->dev_flags |= PHY_BRCM_CLEAR_RGMII_MODE | phydev 1590 drivers/net/ethernet/broadcom/tg3.c phydev->dev_flags |= PHY_BRCM_STD_IBND_DISABLE; phydev 1592 drivers/net/ethernet/broadcom/tg3.c phydev->dev_flags |= PHY_BRCM_EXT_IBND_RX_ENABLE; phydev 1594 drivers/net/ethernet/broadcom/tg3.c phydev->dev_flags |= PHY_BRCM_EXT_IBND_TX_ENABLE; phydev 1597 drivers/net/ethernet/broadcom/tg3.c phydev->interface = PHY_INTERFACE_MODE_RGMII; phydev 1601 drivers/net/ethernet/broadcom/tg3.c phydev->interface = PHY_INTERFACE_MODE_MII; phydev 1602 drivers/net/ethernet/broadcom/tg3.c phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE; phydev 2015 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 2024 drivers/net/ethernet/broadcom/tg3.c if (phydev->link) { phydev 2028 drivers/net/ethernet/broadcom/tg3.c if (phydev->speed == SPEED_100 || phydev->speed == SPEED_10) phydev 2030 drivers/net/ethernet/broadcom/tg3.c else if (phydev->speed == SPEED_1000 || phydev 2036 drivers/net/ethernet/broadcom/tg3.c if (phydev->duplex == DUPLEX_HALF) phydev 2042 drivers/net/ethernet/broadcom/tg3.c if (phydev->pause) phydev 2044 drivers/net/ethernet/broadcom/tg3.c if (phydev->asym_pause) phydev 2059 drivers/net/ethernet/broadcom/tg3.c if (phydev->speed == SPEED_10) phydev 2067 drivers/net/ethernet/broadcom/tg3.c if (phydev->speed == SPEED_1000 && phydev->duplex == DUPLEX_HALF) phydev 2078 drivers/net/ethernet/broadcom/tg3.c if (phydev->link != tp->old_link || phydev 2079 drivers/net/ethernet/broadcom/tg3.c phydev->speed != tp->link_config.active_speed || phydev 2080 drivers/net/ethernet/broadcom/tg3.c phydev->duplex != tp->link_config.active_duplex || phydev 2084 drivers/net/ethernet/broadcom/tg3.c tp->old_link = phydev->link; phydev 2085 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = phydev->speed; phydev 2086 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = phydev->duplex; phydev 2096 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 2104 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 2107 drivers/net/ethernet/broadcom/tg3.c phydev = phy_connect(tp->dev, phydev_name(phydev), phydev 2108 drivers/net/ethernet/broadcom/tg3.c tg3_adjust_link, phydev->interface); phydev 2109 drivers/net/ethernet/broadcom/tg3.c if (IS_ERR(phydev)) { phydev 2111 drivers/net/ethernet/broadcom/tg3.c return PTR_ERR(phydev); phydev 2115 drivers/net/ethernet/broadcom/tg3.c switch (phydev->interface) { phydev 2119 drivers/net/ethernet/broadcom/tg3.c phy_set_max_speed(phydev, SPEED_1000); phydev 2120 drivers/net/ethernet/broadcom/tg3.c phy_support_asym_pause(phydev); phydev 2125 drivers/net/ethernet/broadcom/tg3.c phy_set_max_speed(phydev, SPEED_100); phydev 2126 drivers/net/ethernet/broadcom/tg3.c phy_support_asym_pause(phydev); phydev 2135 drivers/net/ethernet/broadcom/tg3.c phy_attached_info(phydev); phydev 2142 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 2147 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 2151 drivers/net/ethernet/broadcom/tg3.c phydev->speed = tp->link_config.speed; phydev 2152 drivers/net/ethernet/broadcom/tg3.c phydev->duplex = tp->link_config.duplex; phydev 2153 drivers/net/ethernet/broadcom/tg3.c phydev->autoneg = tp->link_config.autoneg; phydev 2155 drivers/net/ethernet/broadcom/tg3.c phydev->advertising, tp->link_config.advertising); phydev 2158 drivers/net/ethernet/broadcom/tg3.c phy_start(phydev); phydev 2160 drivers/net/ethernet/broadcom/tg3.c phy_start_aneg(phydev); phydev 4056 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 4059 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 4063 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = phydev->speed; phydev 4064 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = phydev->duplex; phydev 4065 drivers/net/ethernet/broadcom/tg3.c tp->link_config.autoneg = phydev->autoneg; phydev 4068 drivers/net/ethernet/broadcom/tg3.c phydev->advertising); phydev 4092 drivers/net/ethernet/broadcom/tg3.c linkmode_copy(phydev->advertising, advertising); phydev 4093 drivers/net/ethernet/broadcom/tg3.c phy_start_aneg(phydev); phydev 4095 drivers/net/ethernet/broadcom/tg3.c phyid = phydev->drv->phy_id & phydev->drv->phy_id_mask; phydev 12153 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 12156 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 12157 drivers/net/ethernet/broadcom/tg3.c phy_ethtool_ksettings_get(phydev, cmd); phydev 12229 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 12232 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 12233 drivers/net/ethernet/broadcom/tg3.c return phy_ethtool_ksettings_set(phydev, cmd); phydev 12513 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 12515 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 12517 drivers/net/ethernet/broadcom/tg3.c if (!phy_validate_pause(phydev, epause)) phydev 12521 drivers/net/ethernet/broadcom/tg3.c phy_set_asym_pause(phydev, epause->rx_pause, epause->tx_pause); phydev 12538 drivers/net/ethernet/broadcom/tg3.c if (phydev->autoneg) { phydev 14001 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev; phydev 14004 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); phydev 14005 drivers/net/ethernet/broadcom/tg3.c return phy_mii_ioctl(phydev, ifr, cmd); phydev 446 drivers/net/ethernet/cadence/macb_main.c struct phy_device *phydev = dev->phydev; phydev 452 drivers/net/ethernet/cadence/macb_main.c if (phydev->link) { phydev 453 drivers/net/ethernet/cadence/macb_main.c if ((bp->speed != phydev->speed) || phydev 454 drivers/net/ethernet/cadence/macb_main.c (bp->duplex != phydev->duplex)) { phydev 462 drivers/net/ethernet/cadence/macb_main.c if (phydev->duplex) phydev 464 drivers/net/ethernet/cadence/macb_main.c if (phydev->speed == SPEED_100) phydev 466 drivers/net/ethernet/cadence/macb_main.c if (phydev->speed == SPEED_1000 && phydev 472 drivers/net/ethernet/cadence/macb_main.c bp->speed = phydev->speed; phydev 473 drivers/net/ethernet/cadence/macb_main.c bp->duplex = phydev->duplex; phydev 478 drivers/net/ethernet/cadence/macb_main.c if (phydev->link != bp->link) { phydev 479 drivers/net/ethernet/cadence/macb_main.c if (!phydev->link) { phydev 483 drivers/net/ethernet/cadence/macb_main.c bp->link = phydev->link; phydev 491 drivers/net/ethernet/cadence/macb_main.c if (phydev->link) { phydev 495 drivers/net/ethernet/cadence/macb_main.c macb_set_tx_clk(bp->tx_clk, phydev->speed, dev); phydev 499 drivers/net/ethernet/cadence/macb_main.c phydev->speed, phydev 500 drivers/net/ethernet/cadence/macb_main.c phydev->duplex == DUPLEX_FULL ? phydev 513 drivers/net/ethernet/cadence/macb_main.c struct phy_device *phydev; phydev 531 drivers/net/ethernet/cadence/macb_main.c phydev = mdiobus_scan(bp->mii_bus, i); phydev 532 drivers/net/ethernet/cadence/macb_main.c if (IS_ERR(phydev) && phydev 533 drivers/net/ethernet/cadence/macb_main.c PTR_ERR(phydev) != -ENODEV) { phydev 534 drivers/net/ethernet/cadence/macb_main.c ret = PTR_ERR(phydev); phydev 546 drivers/net/ethernet/cadence/macb_main.c phydev = of_phy_connect(dev, bp->phy_node, phydev 549 drivers/net/ethernet/cadence/macb_main.c if (!phydev) phydev 552 drivers/net/ethernet/cadence/macb_main.c phydev = phy_find_first(bp->mii_bus); phydev 553 drivers/net/ethernet/cadence/macb_main.c if (!phydev) { phydev 559 drivers/net/ethernet/cadence/macb_main.c ret = phy_connect_direct(dev, phydev, &macb_handle_link_change, phydev 569 drivers/net/ethernet/cadence/macb_main.c phy_set_max_speed(phydev, SPEED_1000); phydev 571 drivers/net/ethernet/cadence/macb_main.c phy_set_max_speed(phydev, SPEED_100); phydev 574 drivers/net/ethernet/cadence/macb_main.c phy_remove_link_mode(phydev, phydev 2427 drivers/net/ethernet/cadence/macb_main.c if (!dev->phydev) { phydev 2449 drivers/net/ethernet/cadence/macb_main.c phy_start(dev->phydev); phydev 2476 drivers/net/ethernet/cadence/macb_main.c if (dev->phydev) phydev 2477 drivers/net/ethernet/cadence/macb_main.c phy_stop(dev->phydev); phydev 3197 drivers/net/ethernet/cadence/macb_main.c struct phy_device *phydev = dev->phydev; phydev 3203 drivers/net/ethernet/cadence/macb_main.c if (!phydev) phydev 3207 drivers/net/ethernet/cadence/macb_main.c return phy_mii_ioctl(phydev, rq, cmd); phydev 3215 drivers/net/ethernet/cadence/macb_main.c return phy_mii_ioctl(phydev, rq, cmd); phydev 3723 drivers/net/ethernet/cadence/macb_main.c phy_start(dev->phydev); phydev 4190 drivers/net/ethernet/cadence/macb_main.c struct phy_device *phydev; phydev 4333 drivers/net/ethernet/cadence/macb_main.c phydev = dev->phydev; phydev 4346 drivers/net/ethernet/cadence/macb_main.c phy_attached_info(phydev); phydev 4358 drivers/net/ethernet/cadence/macb_main.c phy_disconnect(dev->phydev); phydev 4391 drivers/net/ethernet/cadence/macb_main.c if (dev->phydev) phydev 4392 drivers/net/ethernet/cadence/macb_main.c phy_disconnect(dev->phydev); phydev 4396 drivers/net/ethernet/cadence/macb_main.c dev->phydev = NULL; phydev 4440 drivers/net/ethernet/cadence/macb_main.c phy_stop(netdev->phydev); phydev 4441 drivers/net/ethernet/cadence/macb_main.c phy_suspend(netdev->phydev); phydev 4489 drivers/net/ethernet/cadence/macb_main.c phy_resume(netdev->phydev); phydev 4490 drivers/net/ethernet/cadence/macb_main.c phy_init_hw(netdev->phydev); phydev 4491 drivers/net/ethernet/cadence/macb_main.c phy_start(netdev->phydev); phydev 793 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (netdev->phydev) phydev 794 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c return phy_mii_ioctl(netdev->phydev, rq, cmd); phydev 837 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c struct phy_device *phydev = ndev->phydev; phydev 842 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (!phydev->link) phydev 845 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c prtx_cfg.s.duplex = phydev->duplex; phydev 847 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c switch (phydev->speed) { phydev 873 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c prtx_cfg.s.burst = phydev->duplex; phydev 896 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (phydev->speed == 10) phydev 898 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c else if (phydev->speed == 100) phydev 908 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c struct phy_device *phydev = netdev->phydev; phydev 912 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (!phydev) phydev 918 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (!phydev->link && p->last_link) phydev 921 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (phydev->link && phydev 922 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c (p->last_duplex != phydev->duplex || phydev 923 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c p->last_link != phydev->link || phydev 924 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c p->last_speed != phydev->speed)) { phydev 931 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c p->last_link = phydev->link; phydev 932 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c p->last_speed = phydev->speed; phydev 933 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c p->last_duplex = phydev->duplex; phydev 940 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c phydev->speed, phydev->duplex == DUPLEX_FULL ? "Full" : "Half"); phydev 949 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c struct phy_device *phydev = NULL; phydev 957 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c phydev = of_phy_connect(netdev, p->phy_np, phydev 961 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (!phydev) phydev 1081 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (OCTEON_IS_MODEL(OCTEON_CN6XXX) && netdev->phydev) { phydev 1085 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c netdev->phydev->supported) | phydev 1087 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c netdev->phydev->supported)) != 0; phydev 1209 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (netdev->phydev) phydev 1218 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (netdev->phydev) { phydev 1220 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c phy_start_aneg(netdev->phydev); phydev 1248 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (netdev->phydev) phydev 1249 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c phy_disconnect(netdev->phydev); phydev 1355 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c if (dev->phydev) phydev 1356 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c return phy_start_aneg(dev->phydev); phydev 58 drivers/net/ethernet/cavium/thunder/thunder_bgx.c struct phy_device *phydev; phydev 594 drivers/net/ethernet/cavium/thunder/thunder_bgx.c struct phy_device *phydev; phydev 600 drivers/net/ethernet/cavium/thunder/thunder_bgx.c phydev = lmac->phydev; phydev 602 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if (!phydev->link && lmac->last_link) phydev 605 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if (phydev->link && phydev 606 drivers/net/ethernet/cavium/thunder/thunder_bgx.c (lmac->last_duplex != phydev->duplex || phydev 607 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->last_link != phydev->link || phydev 608 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->last_speed != phydev->speed)) { phydev 612 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->last_link = phydev->link; phydev 613 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->last_speed = phydev->speed; phydev 614 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->last_duplex = phydev->duplex; phydev 716 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if (lmac->phydev) { phydev 736 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if ((lmac->lmac_type == BGX_MODE_SGMII) && lmac->phydev) { phydev 1105 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if (!lmac->phydev) { phydev 1120 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->phydev->dev_flags = 0; phydev 1122 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if (phy_connect_direct(&lmac->netdev, lmac->phydev, phydev 1127 drivers/net/ethernet/cavium/thunder/thunder_bgx.c phy_start(lmac->phydev); phydev 1187 drivers/net/ethernet/cavium/thunder/thunder_bgx.c (lmac->lmac_type != BGX_MODE_10G_KR) && lmac->phydev) phydev 1188 drivers/net/ethernet/cavium/thunder/thunder_bgx.c phy_disconnect(lmac->phydev); phydev 1190 drivers/net/ethernet/cavium/thunder/thunder_bgx.c lmac->phydev = NULL; phydev 1504 drivers/net/ethernet/cavium/thunder/thunder_bgx.c bgx->lmac[lmac].phydev = pd; phydev 1520 drivers/net/ethernet/cavium/thunder/thunder_bgx.c if (bgx->lmac[lmac].phydev) { phydev 1521 drivers/net/ethernet/cavium/thunder/thunder_bgx.c put_device(&bgx->lmac[lmac].phydev->mdio.dev); phydev 1522 drivers/net/ethernet/cavium/thunder/thunder_bgx.c bgx->lmac[lmac].phydev = NULL; phydev 294 drivers/net/ethernet/cortina/gemini.c struct phy_device *phydev = netdev->phydev; phydev 301 drivers/net/ethernet/cortina/gemini.c status.bits.link = phydev->link; phydev 302 drivers/net/ethernet/cortina/gemini.c status.bits.duplex = phydev->duplex; phydev 304 drivers/net/ethernet/cortina/gemini.c switch (phydev->speed) { phydev 307 drivers/net/ethernet/cortina/gemini.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII) phydev 310 drivers/net/ethernet/cortina/gemini.c phydev_name(phydev)); phydev 314 drivers/net/ethernet/cortina/gemini.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII) phydev 317 drivers/net/ethernet/cortina/gemini.c phydev_name(phydev)); phydev 321 drivers/net/ethernet/cortina/gemini.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII) phydev 324 drivers/net/ethernet/cortina/gemini.c phydev_name(phydev)); phydev 328 drivers/net/ethernet/cortina/gemini.c phydev->speed, phydev_name(phydev)); phydev 331 drivers/net/ethernet/cortina/gemini.c if (phydev->duplex == DUPLEX_FULL) { phydev 332 drivers/net/ethernet/cortina/gemini.c u16 lcladv = phy_read(phydev, MII_ADVERTISE); phydev 333 drivers/net/ethernet/cortina/gemini.c u16 rmtadv = phy_read(phydev, MII_LPA); phydev 348 drivers/net/ethernet/cortina/gemini.c phy_print_status(phydev); phydev 350 drivers/net/ethernet/cortina/gemini.c phydev->pause phydev 351 drivers/net/ethernet/cortina/gemini.c ? (phydev->asym_pause ? "tx" : "both") phydev 352 drivers/net/ethernet/cortina/gemini.c : (phydev->asym_pause ? "rx" : "none") phydev 373 drivers/net/ethernet/cortina/gemini.c netdev->phydev = phy; phydev 398 drivers/net/ethernet/cortina/gemini.c netdev->phydev = NULL; phydev 545 drivers/net/ethernet/cortina/gemini.c if (netdev->phydev) phydev 546 drivers/net/ethernet/cortina/gemini.c phy_disconnect(netdev->phydev); phydev 1771 drivers/net/ethernet/cortina/gemini.c if (!netdev->phydev) { phydev 1788 drivers/net/ethernet/cortina/gemini.c phy_start(netdev->phydev); phydev 1828 drivers/net/ethernet/cortina/gemini.c phy_stop(netdev->phydev); phydev 1847 drivers/net/ethernet/cortina/gemini.c phy_stop(netdev->phydev); phydev 2086 drivers/net/ethernet/cortina/gemini.c if (!netdev->phydev) phydev 2088 drivers/net/ethernet/cortina/gemini.c phy_ethtool_ksettings_get(netdev->phydev, cmd); phydev 2096 drivers/net/ethernet/cortina/gemini.c if (!netdev->phydev) phydev 2098 drivers/net/ethernet/cortina/gemini.c return phy_ethtool_ksettings_set(netdev->phydev, cmd); phydev 2103 drivers/net/ethernet/cortina/gemini.c if (!netdev->phydev) phydev 2105 drivers/net/ethernet/cortina/gemini.c return phy_start_aneg(netdev->phydev); phydev 173 drivers/net/ethernet/dnet.c struct phy_device *phydev = dev->phydev; phydev 184 drivers/net/ethernet/dnet.c if (phydev->link) { phydev 185 drivers/net/ethernet/dnet.c if (bp->duplex != phydev->duplex) { phydev 186 drivers/net/ethernet/dnet.c if (phydev->duplex) phydev 193 drivers/net/ethernet/dnet.c bp->duplex = phydev->duplex; phydev 197 drivers/net/ethernet/dnet.c if (bp->speed != phydev->speed) { phydev 199 drivers/net/ethernet/dnet.c switch (phydev->speed) { phydev 211 drivers/net/ethernet/dnet.c phydev->speed); phydev 214 drivers/net/ethernet/dnet.c bp->speed = phydev->speed; phydev 218 drivers/net/ethernet/dnet.c if (phydev->link != bp->link) { phydev 219 drivers/net/ethernet/dnet.c if (phydev->link) { phydev 229 drivers/net/ethernet/dnet.c bp->link = phydev->link; phydev 242 drivers/net/ethernet/dnet.c if (phydev->link) phydev 244 drivers/net/ethernet/dnet.c dev->name, phydev->speed, phydev 245 drivers/net/ethernet/dnet.c DUPLEX_FULL == phydev->duplex ? "Full" : "Half"); phydev 254 drivers/net/ethernet/dnet.c struct phy_device *phydev = NULL; phydev 257 drivers/net/ethernet/dnet.c phydev = phy_find_first(bp->mii_bus); phydev 259 drivers/net/ethernet/dnet.c if (!phydev) { phydev 268 drivers/net/ethernet/dnet.c phydev = phy_connect(dev, phydev_name(phydev), phydev 272 drivers/net/ethernet/dnet.c phydev = phy_connect(dev, phydev_name(phydev), phydev 277 drivers/net/ethernet/dnet.c if (IS_ERR(phydev)) { phydev 279 drivers/net/ethernet/dnet.c return PTR_ERR(phydev); phydev 284 drivers/net/ethernet/dnet.c phy_set_max_speed(phydev, SPEED_1000); phydev 286 drivers/net/ethernet/dnet.c phy_set_max_speed(phydev, SPEED_100); phydev 288 drivers/net/ethernet/dnet.c phy_support_asym_pause(phydev); phydev 334 drivers/net/ethernet/dnet.c static int dnet_phy_marvell_fixup(struct phy_device *phydev) phydev 336 drivers/net/ethernet/dnet.c return phy_write(phydev, 0x18, 0x4148); phydev 626 drivers/net/ethernet/dnet.c if (!dev->phydev) phydev 632 drivers/net/ethernet/dnet.c phy_start_aneg(dev->phydev); phydev 635 drivers/net/ethernet/dnet.c phy_start(dev->phydev); phydev 649 drivers/net/ethernet/dnet.c if (dev->phydev) phydev 650 drivers/net/ethernet/dnet.c phy_stop(dev->phydev); phydev 730 drivers/net/ethernet/dnet.c struct phy_device *phydev = dev->phydev; phydev 735 drivers/net/ethernet/dnet.c if (!phydev) phydev 738 drivers/net/ethernet/dnet.c return phy_mii_ioctl(phydev, rq, cmd); phydev 772 drivers/net/ethernet/dnet.c struct phy_device *phydev; phydev 848 drivers/net/ethernet/dnet.c phydev = dev->phydev; phydev 849 drivers/net/ethernet/dnet.c phy_attached_info(phydev); phydev 872 drivers/net/ethernet/dnet.c if (dev->phydev) phydev 873 drivers/net/ethernet/dnet.c phy_disconnect(dev->phydev); phydev 668 drivers/net/ethernet/ethoc.c struct phy_device *phydev = dev->phydev; phydev 672 drivers/net/ethernet/ethoc.c if (priv->old_link != phydev->link) { phydev 674 drivers/net/ethernet/ethoc.c priv->old_link = phydev->link; phydev 677 drivers/net/ethernet/ethoc.c if (priv->old_duplex != phydev->duplex) { phydev 679 drivers/net/ethernet/ethoc.c priv->old_duplex = phydev->duplex; phydev 686 drivers/net/ethernet/ethoc.c if (phydev->duplex == DUPLEX_FULL) phydev 692 drivers/net/ethernet/ethoc.c phy_print_status(phydev); phydev 752 drivers/net/ethernet/ethoc.c phy_start(dev->phydev); phydev 768 drivers/net/ethernet/ethoc.c if (dev->phydev) phydev 769 drivers/net/ethernet/ethoc.c phy_stop(dev->phydev); phydev 797 drivers/net/ethernet/ethoc.c phy = dev->phydev; phydev 1262 drivers/net/ethernet/ethoc.c phy_disconnect(netdev->phydev); phydev 996 drivers/net/ethernet/faraday/ftgmac100.c struct phy_device *phydev = netdev->phydev; phydev 1001 drivers/net/ethernet/faraday/ftgmac100.c if (!phydev->link) phydev 1004 drivers/net/ethernet/faraday/ftgmac100.c new_speed = phydev->speed; phydev 1008 drivers/net/ethernet/faraday/ftgmac100.c rx_pause = tx_pause = phydev->pause; phydev 1009 drivers/net/ethernet/faraday/ftgmac100.c if (phydev->asym_pause) phydev 1017 drivers/net/ethernet/faraday/ftgmac100.c if (phydev->speed == priv->cur_speed && phydev 1018 drivers/net/ethernet/faraday/ftgmac100.c phydev->duplex == priv->cur_duplex && phydev 1027 drivers/net/ethernet/faraday/ftgmac100.c phy_print_status(phydev); phydev 1030 drivers/net/ethernet/faraday/ftgmac100.c priv->cur_duplex = phydev->duplex; phydev 1048 drivers/net/ethernet/faraday/ftgmac100.c struct phy_device *phydev; phydev 1050 drivers/net/ethernet/faraday/ftgmac100.c phydev = phy_find_first(priv->mii_bus); phydev 1051 drivers/net/ethernet/faraday/ftgmac100.c if (!phydev) { phydev 1056 drivers/net/ethernet/faraday/ftgmac100.c phydev = phy_connect(netdev, phydev_name(phydev), phydev 1059 drivers/net/ethernet/faraday/ftgmac100.c if (IS_ERR(phydev)) { phydev 1061 drivers/net/ethernet/faraday/ftgmac100.c return PTR_ERR(phydev); phydev 1067 drivers/net/ethernet/faraday/ftgmac100.c phy_support_asym_pause(phydev); phydev 1070 drivers/net/ethernet/faraday/ftgmac100.c phy_attached_info(phydev); phydev 1201 drivers/net/ethernet/faraday/ftgmac100.c struct phy_device *phydev = netdev->phydev; phydev 1207 drivers/net/ethernet/faraday/ftgmac100.c if (phydev) phydev 1208 drivers/net/ethernet/faraday/ftgmac100.c phy_set_asym_pause(phydev, pause->rx_pause, pause->tx_pause); phydev 1211 drivers/net/ethernet/faraday/ftgmac100.c if (!(phydev && priv->aneg_pause)) phydev 1390 drivers/net/ethernet/faraday/ftgmac100.c if (netdev->phydev) phydev 1391 drivers/net/ethernet/faraday/ftgmac100.c mutex_lock(&netdev->phydev->lock); phydev 1423 drivers/net/ethernet/faraday/ftgmac100.c if (netdev->phydev) phydev 1424 drivers/net/ethernet/faraday/ftgmac100.c mutex_unlock(&netdev->phydev->lock); phydev 1476 drivers/net/ethernet/faraday/ftgmac100.c if (netdev->phydev) { phydev 1478 drivers/net/ethernet/faraday/ftgmac100.c phy_start(netdev->phydev); phydev 1523 drivers/net/ethernet/faraday/ftgmac100.c if (netdev->phydev) phydev 1524 drivers/net/ethernet/faraday/ftgmac100.c phy_stop(netdev->phydev); phydev 1539 drivers/net/ethernet/faraday/ftgmac100.c if (!netdev->phydev) phydev 1542 drivers/net/ethernet/faraday/ftgmac100.c return phy_mii_ioctl(netdev->phydev, ifr, cmd); phydev 1703 drivers/net/ethernet/faraday/ftgmac100.c if (!netdev->phydev) phydev 1706 drivers/net/ethernet/faraday/ftgmac100.c phy_disconnect(netdev->phydev); phydev 304 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c if (net_dev->phydev) phydev 305 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c phy_disconnect(net_dev->phydev); phydev 306 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c net_dev->phydev = NULL; phydev 2519 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c net_dev->phydev = phy_dev; phydev 2621 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c if (net_dev->phydev) phydev 2622 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c return phy_mii_ioctl(net_dev->phydev, rq, cmd); phydev 81 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (!net_dev->phydev) { phydev 86 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c phy_ethtool_ksettings_get(net_dev->phydev, cmd); phydev 96 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (!net_dev->phydev) { phydev 101 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c err = phy_ethtool_ksettings_set(net_dev->phydev, cmd); phydev 143 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (!net_dev->phydev) { phydev 149 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (net_dev->phydev->autoneg) { phydev 150 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c err = phy_start_aneg(net_dev->phydev); phydev 168 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (!net_dev->phydev) { phydev 182 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c struct phy_device *phydev; phydev 190 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c phydev = net_dev->phydev; phydev 191 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (!phydev) { phydev 196 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c if (!phy_validate_pause(phydev, epause)) phydev 211 drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c phy_set_asym_pause(phydev, epause->rx_pause, epause->tx_pause); phydev 1317 drivers/net/ethernet/freescale/enetc/enetc.c struct phy_device *phydev = ndev->phydev; phydev 1319 drivers/net/ethernet/freescale/enetc/enetc.c phy_print_status(phydev); phydev 1325 drivers/net/ethernet/freescale/enetc/enetc.c struct phy_device *phydev; phydev 1330 drivers/net/ethernet/freescale/enetc/enetc.c phydev = of_phy_connect(ndev, priv->phy_node, &adjust_link, phydev 1332 drivers/net/ethernet/freescale/enetc/enetc.c if (!phydev) { phydev 1337 drivers/net/ethernet/freescale/enetc/enetc.c phy_attached_info(phydev); phydev 1378 drivers/net/ethernet/freescale/enetc/enetc.c if (ndev->phydev) phydev 1379 drivers/net/ethernet/freescale/enetc/enetc.c phy_start(ndev->phydev); phydev 1392 drivers/net/ethernet/freescale/enetc/enetc.c if (ndev->phydev) phydev 1393 drivers/net/ethernet/freescale/enetc/enetc.c phy_disconnect(ndev->phydev); phydev 1407 drivers/net/ethernet/freescale/enetc/enetc.c if (ndev->phydev) { phydev 1408 drivers/net/ethernet/freescale/enetc/enetc.c phy_stop(ndev->phydev); phydev 1409 drivers/net/ethernet/freescale/enetc/enetc.c phy_disconnect(ndev->phydev); phydev 1037 drivers/net/ethernet/freescale/fec_main.c if (ndev->phydev) { phydev 1038 drivers/net/ethernet/freescale/fec_main.c if (ndev->phydev->speed == SPEED_1000) phydev 1040 drivers/net/ethernet/freescale/fec_main.c else if (ndev->phydev->speed == SPEED_100) phydev 1061 drivers/net/ethernet/freescale/fec_main.c if (ndev->phydev && ndev->phydev->speed == SPEED_10) phydev 1075 drivers/net/ethernet/freescale/fec_main.c ndev->phydev && ndev->phydev->pause)) { phydev 1770 drivers/net/ethernet/freescale/fec_main.c struct phy_device *phy_dev = ndev->phydev; phydev 1974 drivers/net/ethernet/freescale/fec_main.c phy_reset_after_clk_enable(ndev->phydev); phydev 2329 drivers/net/ethernet/freescale/fec_main.c if (!ndev->phydev) phydev 2344 drivers/net/ethernet/freescale/fec_main.c phy_set_sym_pause(ndev->phydev, pause->rx_pause, pause->tx_pause, phydev 2350 drivers/net/ethernet/freescale/fec_main.c phy_start_aneg(ndev->phydev); phydev 2724 drivers/net/ethernet/freescale/fec_main.c struct phy_device *phydev = ndev->phydev; phydev 2729 drivers/net/ethernet/freescale/fec_main.c if (!phydev) phydev 2739 drivers/net/ethernet/freescale/fec_main.c return phy_mii_ioctl(phydev, rq, cmd); phydev 2969 drivers/net/ethernet/freescale/fec_main.c if (ndev->phydev && ndev->phydev->drv) phydev 2994 drivers/net/ethernet/freescale/fec_main.c phy_reset_after_clk_enable(ndev->phydev); phydev 3000 drivers/net/ethernet/freescale/fec_main.c phy_start(ndev->phydev); phydev 3024 drivers/net/ethernet/freescale/fec_main.c phy_stop(ndev->phydev); phydev 3032 drivers/net/ethernet/freescale/fec_main.c phy_disconnect(ndev->phydev); phydev 3775 drivers/net/ethernet/freescale/fec_main.c phy_stop(ndev->phydev); phydev 3834 drivers/net/ethernet/freescale/fec_main.c phy_start(ndev->phydev); phydev 167 drivers/net/ethernet/freescale/fec_mpc52xx.c struct phy_device *phydev = dev->phydev; phydev 170 drivers/net/ethernet/freescale/fec_mpc52xx.c if (phydev->link != PHY_DOWN) { phydev 171 drivers/net/ethernet/freescale/fec_mpc52xx.c if (phydev->duplex != priv->duplex) { phydev 177 drivers/net/ethernet/freescale/fec_mpc52xx.c priv->duplex = phydev->duplex; phydev 184 drivers/net/ethernet/freescale/fec_mpc52xx.c if (phydev->duplex == DUPLEX_FULL) phydev 193 drivers/net/ethernet/freescale/fec_mpc52xx.c if (phydev->speed != priv->speed) { phydev 195 drivers/net/ethernet/freescale/fec_mpc52xx.c priv->speed = phydev->speed; phydev 200 drivers/net/ethernet/freescale/fec_mpc52xx.c priv->link = phydev->link; phydev 211 drivers/net/ethernet/freescale/fec_mpc52xx.c phy_print_status(phydev); phydev 217 drivers/net/ethernet/freescale/fec_mpc52xx.c struct phy_device *phydev = NULL; phydev 221 drivers/net/ethernet/freescale/fec_mpc52xx.c phydev = of_phy_connect(priv->ndev, priv->phy_node, phydev 223 drivers/net/ethernet/freescale/fec_mpc52xx.c if (!phydev) { phydev 227 drivers/net/ethernet/freescale/fec_mpc52xx.c phy_start(phydev); phydev 271 drivers/net/ethernet/freescale/fec_mpc52xx.c if (phydev) { phydev 272 drivers/net/ethernet/freescale/fec_mpc52xx.c phy_stop(phydev); phydev 273 drivers/net/ethernet/freescale/fec_mpc52xx.c phy_disconnect(phydev); phydev 282 drivers/net/ethernet/freescale/fec_mpc52xx.c struct phy_device *phydev = dev->phydev; phydev 294 drivers/net/ethernet/freescale/fec_mpc52xx.c if (phydev) { phydev 296 drivers/net/ethernet/freescale/fec_mpc52xx.c phy_stop(phydev); phydev 297 drivers/net/ethernet/freescale/fec_mpc52xx.c phy_disconnect(phydev); phydev 790 drivers/net/ethernet/freescale/fec_mpc52xx.c struct phy_device *phydev = dev->phydev; phydev 792 drivers/net/ethernet/freescale/fec_mpc52xx.c if (!phydev) phydev 795 drivers/net/ethernet/freescale/fec_mpc52xx.c return phy_mii_ioctl(phydev, rq, cmd); phydev 630 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phy_stop(dev->phydev); phydev 635 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phy_start(dev->phydev); phydev 657 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct phy_device *phydev = dev->phydev; phydev 660 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (phydev->link) { phydev 662 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (phydev->duplex != fep->oldduplex) { phydev 664 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldduplex = phydev->duplex; phydev 667 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (phydev->speed != fep->oldspeed) { phydev 669 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldspeed = phydev->speed; phydev 687 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phy_print_status(phydev); phydev 709 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct phy_device *phydev; phydev 719 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phydev = of_phy_connect(dev, fep->fpi->phy_node, &fs_adjust_link, 0, phydev 721 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (!phydev) { phydev 756 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phy_start(dev->phydev); phydev 772 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phy_stop(dev->phydev); phydev 781 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phy_disconnect(dev->phydev); phydev 890 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 369 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (dev->phydev->speed == 100) phydev 395 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (dev->phydev->duplex) phydev 237 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct mii_bus *mii = dev->phydev->mdio.bus; phydev 316 drivers/net/ethernet/freescale/fs_enet/mac-fec.c if (dev->phydev->duplex) { phydev 346 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec_info *feci = dev->phydev->mdio.bus->priv; phydev 345 drivers/net/ethernet/freescale/fs_enet/mac-scc.c if (dev->phydev->duplex) phydev 1193 drivers/net/ethernet/freescale/gianfar.c phy_stop(dev->phydev); phydev 1464 drivers/net/ethernet/freescale/gianfar.c phy_start(ndev->phydev); phydev 1476 drivers/net/ethernet/freescale/gianfar.c struct phy_device *phydev = ndev->phydev; phydev 1479 drivers/net/ethernet/freescale/gianfar.c if (!phydev->duplex) phydev 1492 drivers/net/ethernet/freescale/gianfar.c if (phydev->pause) phydev 1494 drivers/net/ethernet/freescale/gianfar.c if (phydev->asym_pause) phydev 1497 drivers/net/ethernet/freescale/gianfar.c lcl_adv = linkmode_adv_to_lcl_adv_t(phydev->advertising); phydev 1512 drivers/net/ethernet/freescale/gianfar.c struct phy_device *phydev = ndev->phydev; phydev 1519 drivers/net/ethernet/freescale/gianfar.c if (phydev->link) { phydev 1525 drivers/net/ethernet/freescale/gianfar.c if (phydev->duplex != priv->oldduplex) { phydev 1526 drivers/net/ethernet/freescale/gianfar.c if (!(phydev->duplex)) phydev 1531 drivers/net/ethernet/freescale/gianfar.c priv->oldduplex = phydev->duplex; phydev 1534 drivers/net/ethernet/freescale/gianfar.c if (phydev->speed != priv->oldspeed) { phydev 1535 drivers/net/ethernet/freescale/gianfar.c switch (phydev->speed) { phydev 1550 drivers/net/ethernet/freescale/gianfar.c if (phydev->speed == SPEED_100) phydev 1558 drivers/net/ethernet/freescale/gianfar.c phydev->speed); phydev 1562 drivers/net/ethernet/freescale/gianfar.c priv->oldspeed = phydev->speed; phydev 1598 drivers/net/ethernet/freescale/gianfar.c phy_print_status(phydev); phydev 1610 drivers/net/ethernet/freescale/gianfar.c struct phy_device *phydev = dev->phydev; phydev 1612 drivers/net/ethernet/freescale/gianfar.c if (unlikely(phydev->link != priv->oldlink || phydev 1613 drivers/net/ethernet/freescale/gianfar.c (phydev->link && (phydev->duplex != priv->oldduplex || phydev 1614 drivers/net/ethernet/freescale/gianfar.c phydev->speed != priv->oldspeed)))) phydev 1675 drivers/net/ethernet/freescale/gianfar.c struct phy_device *phydev; phydev 1690 drivers/net/ethernet/freescale/gianfar.c phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0, phydev 1692 drivers/net/ethernet/freescale/gianfar.c if (!phydev) { phydev 1701 drivers/net/ethernet/freescale/gianfar.c linkmode_and(phydev->supported, phydev->supported, mask); phydev 1702 drivers/net/ethernet/freescale/gianfar.c linkmode_copy(phydev->advertising, phydev->supported); phydev 1705 drivers/net/ethernet/freescale/gianfar.c phy_support_asym_pause(phydev); phydev 1709 drivers/net/ethernet/freescale/gianfar.c phy_ethtool_set_eee(phydev, &edata); phydev 2166 drivers/net/ethernet/freescale/gianfar.c struct phy_device *phydev = dev->phydev; phydev 2176 drivers/net/ethernet/freescale/gianfar.c if (!phydev) phydev 2179 drivers/net/ethernet/freescale/gianfar.c return phy_mii_ioctl(phydev, rq, cmd); phydev 3042 drivers/net/ethernet/freescale/gianfar.c phy_disconnect(dev->phydev); phydev 3640 drivers/net/ethernet/freescale/gianfar.c phy_stop(ndev->phydev); phydev 3669 drivers/net/ethernet/freescale/gianfar.c phy_start(ndev->phydev); phydev 3703 drivers/net/ethernet/freescale/gianfar.c if (ndev->phydev) phydev 3704 drivers/net/ethernet/freescale/gianfar.c phy_start(ndev->phydev); phydev 198 drivers/net/ethernet/freescale/gianfar_ethtool.c struct phy_device *phydev = ndev->phydev; phydev 202 drivers/net/ethernet/freescale/gianfar_ethtool.c switch (phydev->speed) { phydev 225 drivers/net/ethernet/freescale/gianfar_ethtool.c struct phy_device *phydev = ndev->phydev; phydev 229 drivers/net/ethernet/freescale/gianfar_ethtool.c switch (phydev->speed) { phydev 263 drivers/net/ethernet/freescale/gianfar_ethtool.c if (!dev->phydev) phydev 324 drivers/net/ethernet/freescale/gianfar_ethtool.c if (!dev->phydev) phydev 488 drivers/net/ethernet/freescale/gianfar_ethtool.c struct phy_device *phydev = dev->phydev; phydev 491 drivers/net/ethernet/freescale/gianfar_ethtool.c if (!phydev) phydev 494 drivers/net/ethernet/freescale/gianfar_ethtool.c if (!phy_validate_pause(phydev, epause)) phydev 498 drivers/net/ethernet/freescale/gianfar_ethtool.c phy_set_asym_pause(phydev, epause->rx_pause, epause->tx_pause); phydev 1584 drivers/net/ethernet/freescale/ucc_geth.c struct phy_device *phydev = ugeth->phydev; phydev 1590 drivers/net/ethernet/freescale/ucc_geth.c if (phydev->link) { phydev 1595 drivers/net/ethernet/freescale/ucc_geth.c if (phydev->duplex != ugeth->oldduplex) { phydev 1597 drivers/net/ethernet/freescale/ucc_geth.c if (!(phydev->duplex)) phydev 1601 drivers/net/ethernet/freescale/ucc_geth.c ugeth->oldduplex = phydev->duplex; phydev 1604 drivers/net/ethernet/freescale/ucc_geth.c if (phydev->speed != ugeth->oldspeed) { phydev 1606 drivers/net/ethernet/freescale/ucc_geth.c switch (phydev->speed) { phydev 1624 drivers/net/ethernet/freescale/ucc_geth.c if (phydev->speed == SPEED_10) phydev 1634 drivers/net/ethernet/freescale/ucc_geth.c dev->name, phydev->speed); phydev 1637 drivers/net/ethernet/freescale/ucc_geth.c ugeth->oldspeed = phydev->speed; phydev 1670 drivers/net/ethernet/freescale/ucc_geth.c phy_print_status(phydev); phydev 1727 drivers/net/ethernet/freescale/ucc_geth.c struct phy_device *phydev; phydev 1733 drivers/net/ethernet/freescale/ucc_geth.c phydev = of_phy_connect(dev, ug_info->phy_node, &adjust_link, 0, phydev 1735 drivers/net/ethernet/freescale/ucc_geth.c if (!phydev) { phydev 1743 drivers/net/ethernet/freescale/ucc_geth.c phy_set_max_speed(phydev, priv->max_speed); phydev 1745 drivers/net/ethernet/freescale/ucc_geth.c priv->phydev = phydev; phydev 2042 drivers/net/ethernet/freescale/ucc_geth.c struct phy_device *phydev = ugeth->phydev; phydev 2051 drivers/net/ethernet/freescale/ucc_geth.c phy_stop(phydev); phydev 3476 drivers/net/ethernet/freescale/ucc_geth.c phy_start(ugeth->phydev); phydev 3482 drivers/net/ethernet/freescale/ucc_geth.c qe_alive_during_sleep() || ugeth->phydev->irq); phydev 3503 drivers/net/ethernet/freescale/ucc_geth.c phy_disconnect(ugeth->phydev); phydev 3504 drivers/net/ethernet/freescale/ucc_geth.c ugeth->phydev = NULL; phydev 3538 drivers/net/ethernet/freescale/ucc_geth.c phy_start(ugeth->phydev); phydev 3581 drivers/net/ethernet/freescale/ucc_geth.c phy_stop(ugeth->phydev); phydev 3621 drivers/net/ethernet/freescale/ucc_geth.c phy_stop(ugeth->phydev); phydev 3622 drivers/net/ethernet/freescale/ucc_geth.c phy_start(ugeth->phydev); phydev 3668 drivers/net/ethernet/freescale/ucc_geth.c if (!ugeth->phydev) phydev 3671 drivers/net/ethernet/freescale/ucc_geth.c return phy_mii_ioctl(ugeth->phydev, rq, cmd); phydev 1214 drivers/net/ethernet/freescale/ucc_geth.h struct phy_device *phydev; phydev 107 drivers/net/ethernet/freescale/ucc_geth_ethtool.c struct phy_device *phydev = ugeth->phydev; phydev 109 drivers/net/ethernet/freescale/ucc_geth_ethtool.c if (!phydev) phydev 112 drivers/net/ethernet/freescale/ucc_geth_ethtool.c phy_ethtool_ksettings_get(phydev, cmd); phydev 122 drivers/net/ethernet/freescale/ucc_geth_ethtool.c struct phy_device *phydev = ugeth->phydev; phydev 124 drivers/net/ethernet/freescale/ucc_geth_ethtool.c if (!phydev) phydev 127 drivers/net/ethernet/freescale/ucc_geth_ethtool.c return phy_ethtool_ksettings_set(phydev, cmd); phydev 136 drivers/net/ethernet/freescale/ucc_geth_ethtool.c pause->autoneg = ugeth->phydev->autoneg; phydev 154 drivers/net/ethernet/freescale/ucc_geth_ethtool.c if (ugeth->phydev->autoneg) { phydev 347 drivers/net/ethernet/freescale/ucc_geth_ethtool.c struct phy_device *phydev = ugeth->phydev; phydev 349 drivers/net/ethernet/freescale/ucc_geth_ethtool.c if (phydev && phydev->irq) phydev 360 drivers/net/ethernet/freescale/ucc_geth_ethtool.c struct phy_device *phydev = ugeth->phydev; phydev 364 drivers/net/ethernet/freescale/ucc_geth_ethtool.c else if (wol->wolopts & WAKE_PHY && (!phydev || !phydev->irq)) phydev 192 drivers/net/ethernet/hisilicon/hisi_femac.c struct phy_device *phy = dev->phydev; phydev 473 drivers/net/ethernet/hisilicon/hisi_femac.c if (dev->phydev) phydev 474 drivers/net/ethernet/hisilicon/hisi_femac.c phy_start(dev->phydev); phydev 488 drivers/net/ethernet/hisilicon/hisi_femac.c if (dev->phydev) phydev 489 drivers/net/ethernet/hisilicon/hisi_femac.c phy_stop(dev->phydev); phydev 684 drivers/net/ethernet/hisilicon/hisi_femac.c if (!dev->phydev) phydev 687 drivers/net/ethernet/hisilicon/hisi_femac.c return phy_mii_ioctl(dev->phydev, ifreq, cmd); phydev 750 drivers/net/ethernet/hisilicon/hisi_femac.c if (priv->ndev->phydev->interface == PHY_INTERFACE_MODE_RMII) phydev 918 drivers/net/ethernet/hisilicon/hisi_femac.c phy_disconnect(ndev->phydev); phydev 456 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c struct phy_device *phy = dev->phydev; phydev 876 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c if (dev->phydev) { phydev 877 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c phy_stop(dev->phydev); phydev 878 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c phy_disconnect(dev->phydev); phydev 1096 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (ndev->phydev) { phydev 1098 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (ndev->phydev->link == 0) phydev 1101 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (h->dev->ops->need_adjust_link(h, ndev->phydev->speed, phydev 1102 drivers/net/ethernet/hisilicon/hns/hns_enet.c ndev->phydev->duplex)) { phydev 1109 drivers/net/ethernet/hisilicon/hns/hns_enet.c h->dev->ops->adjust_link(h, ndev->phydev->speed, phydev 1110 drivers/net/ethernet/hisilicon/hns/hns_enet.c ndev->phydev->duplex); phydev 1352 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (ndev->phydev) phydev 1353 drivers/net/ethernet/hisilicon/hns/hns_enet.c phy_start(ndev->phydev); phydev 1388 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (ndev->phydev) phydev 1389 drivers/net/ethernet/hisilicon/hns/hns_enet.c phy_stop(ndev->phydev); phydev 1503 drivers/net/ethernet/hisilicon/hns/hns_enet.c struct phy_device *phy_dev = netdev->phydev; phydev 2413 drivers/net/ethernet/hisilicon/hns/hns_enet.c if (ndev->phydev) phydev 2414 drivers/net/ethernet/hisilicon/hns/hns_enet.c phy_disconnect(ndev->phydev); phydev 47 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if (net_dev->phydev) { phydev 48 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if (!genphy_read_status(net_dev->phydev)) phydev 49 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c link_stat = net_dev->phydev->link; phydev 66 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c struct phy_device *phy_dev = net_dev->phydev; phydev 148 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if (net_dev->phydev) phydev 149 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c phy_ethtool_ksettings_get(net_dev->phydev, cmd); phydev 224 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if (!net_dev->phydev && cmd->base.autoneg == AUTONEG_ENABLE) phydev 229 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if (net_dev->phydev) phydev 230 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c return phy_ethtool_ksettings_set(net_dev->phydev, cmd); phydev 288 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c struct phy_device *phy_dev = ndev->phydev; phydev 910 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if ((netdev->phydev) && (!netdev->phydev->is_c45)) phydev 996 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c if ((!netdev->phydev) || (netdev->phydev->is_c45)) phydev 1017 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c struct phy_device *phy_dev = netdev->phydev; phydev 1041 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c struct phy_device *phy_dev = netdev->phydev; phydev 1160 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c struct phy_device *phy = netdev->phydev; phydev 689 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c if (!netdev->phydev) phydev 692 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c phy_ethtool_ksettings_get(netdev->phydev, cmd); phydev 771 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c netdev->phydev ? "phy" : "mac", phydev 775 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c if (netdev->phydev) phydev 776 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c return phy_ethtool_ksettings_set(netdev->phydev, cmd); phydev 1041 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c struct phy_device *phy = netdev->phydev; phydev 749 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (hdev->hw.mac.phydev) { phydev 2491 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 2493 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev) phydev 2494 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c return phydev->autoneg; phydev 2695 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (hdev->hw.mac.phydev) { phydev 2696 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (hdev->hw.mac.phydev->state == PHY_RUNNING) phydev 2698 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c hdev->hw.mac.phydev->link; phydev 6302 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 6307 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ret = phy_read_status(phydev); phydev 6314 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev->link == link_ret) phydev 6476 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev) phydev 6480 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (!phydev->suspended) { phydev 6481 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ret = phy_suspend(phydev); phydev 6486 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ret = phy_resume(phydev); phydev 6490 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c return phy_loopback(phydev, true); phydev 6494 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev) phydev 6498 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ret = phy_loopback(phydev, false); phydev 6502 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c return phy_suspend(phydev); phydev 6507 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 6510 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (!phydev) phydev 6514 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ret = hclge_enable_phy_loopback(hdev, phydev); phydev 6516 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c ret = hclge_disable_phy_loopback(hdev, phydev); phydev 7553 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (!hdev->hw.mac.phydev) phydev 7556 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c return phy_mii_ioctl(hdev->hw.mac.phydev, ifr, cmd); phydev 8608 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 8610 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (!phydev) phydev 8613 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c phy_set_asym_pause(phydev, rx_en, tx_en); phydev 8633 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 8639 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (!phydev->link || !phydev->autoneg) phydev 8642 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c local_advertising = linkmode_adv_to_lcl_adv_t(phydev->advertising); phydev 8644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev->pause) phydev 8647 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev->asym_pause) phydev 8655 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev->duplex == HCLGE_MAC_HALF) { phydev 8668 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 8670 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c *auto_neg = phydev ? hclge_get_autoneg(handle) : 0; phydev 8713 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 8716 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev) { phydev 8738 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (phydev) phydev 8739 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c return phy_start_aneg(phydev); phydev 8776 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 8780 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (!phydev) { phydev 8786 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c phy_write(phydev, HCLGE_PHY_PAGE_REG, HCLGE_PHY_PAGE_MDIX); phydev 8788 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c retval = phy_read(phydev, HCLGE_PHY_CSC_REG); phydev 8792 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c retval = phy_read(phydev, HCLGE_PHY_CSS_REG); phydev 8796 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c phy_write(phydev, HCLGE_PHY_PAGE_REG, HCLGE_PHY_PAGE_COPPER); phydev 9352 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (hdev->hw.mac.phydev) phydev 9498 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c if (mac->phydev) phydev 267 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h struct phy_device *phydev; phydev 128 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c struct phy_device *phydev; phydev 162 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phydev = mdiobus_get_phy(mdio_bus, mac->phy_addr); phydev 163 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c if (!phydev) { phydev 169 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c mac->phydev = phydev; phydev 184 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c if (netdev->phydev->link == 0) phydev 187 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c speed = netdev->phydev->speed; phydev 188 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c duplex = netdev->phydev->duplex; phydev 204 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 208 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c if (!phydev) phydev 211 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c linkmode_clear_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported); phydev 213 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phydev->dev_flags |= MARVELL_PHY_LED0_LINK_LED1_ACTIVE; phydev 215 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c ret = phy_connect_direct(netdev, phydev, phydev 224 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c linkmode_and(phydev->supported, phydev->supported, mask); phydev 225 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c linkmode_copy(phydev->advertising, phydev->supported); phydev 232 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phydev->advertising); phydev 234 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phy_attached_info(phydev); phydev 243 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 245 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c if (!phydev) phydev 248 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phy_disconnect(phydev); phydev 253 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c struct phy_device *phydev = hdev->hw.mac.phydev; phydev 255 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c if (!phydev) phydev 258 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phy_start(phydev); phydev 264 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c struct phy_device *phydev = netdev->phydev; phydev 266 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c if (!phydev) phydev 269 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c phy_stop(phydev); phydev 343 drivers/net/ethernet/lantiq_etop.c struct phy_device *phydev; phydev 345 drivers/net/ethernet/lantiq_etop.c phydev = phy_find_first(priv->mii_bus); phydev 347 drivers/net/ethernet/lantiq_etop.c if (!phydev) { phydev 352 drivers/net/ethernet/lantiq_etop.c phydev = phy_connect(dev, phydev_name(phydev), phydev 355 drivers/net/ethernet/lantiq_etop.c if (IS_ERR(phydev)) { phydev 357 drivers/net/ethernet/lantiq_etop.c return PTR_ERR(phydev); phydev 360 drivers/net/ethernet/lantiq_etop.c phy_set_max_speed(phydev, SPEED_100); phydev 362 drivers/net/ethernet/lantiq_etop.c phy_attached_info(phydev); phydev 410 drivers/net/ethernet/lantiq_etop.c phy_disconnect(dev->phydev); phydev 430 drivers/net/ethernet/lantiq_etop.c phy_start(dev->phydev); phydev 442 drivers/net/ethernet/lantiq_etop.c phy_stop(dev->phydev); phydev 516 drivers/net/ethernet/lantiq_etop.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 1223 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev->autoneg == AUTONEG_ENABLE) { phydev 1231 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev->speed == SPEED_1000) { phydev 1240 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev->speed == SPEED_100) phydev 1245 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev->duplex == DUPLEX_FULL) phydev 1491 drivers/net/ethernet/marvell/mv643xx_eth.c phy_ethtool_ksettings_get(dev->phydev, cmd); phydev 1548 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev) phydev 1549 drivers/net/ethernet/marvell/mv643xx_eth.c phy_ethtool_get_wol(dev->phydev, wol); phydev 1557 drivers/net/ethernet/marvell/mv643xx_eth.c if (!dev->phydev) phydev 1560 drivers/net/ethernet/marvell/mv643xx_eth.c err = phy_ethtool_set_wol(dev->phydev, wol); phydev 1575 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev) phydev 1589 drivers/net/ethernet/marvell/mv643xx_eth.c if (!dev->phydev) phydev 1601 drivers/net/ethernet/marvell/mv643xx_eth.c ret = phy_ethtool_ksettings_set(dev->phydev, &c); phydev 2321 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev) { phydev 2325 drivers/net/ethernet/marvell/mv643xx_eth.c phy_init_hw(dev->phydev); phydev 2328 drivers/net/ethernet/marvell/mv643xx_eth.c phy_start(dev->phydev); phydev 2340 drivers/net/ethernet/marvell/mv643xx_eth.c if (!dev->phydev) phydev 2524 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev) phydev 2525 drivers/net/ethernet/marvell/mv643xx_eth.c phy_stop(dev->phydev); phydev 2545 drivers/net/ethernet/marvell/mv643xx_eth.c if (!dev->phydev) phydev 2548 drivers/net/ethernet/marvell/mv643xx_eth.c ret = phy_mii_ioctl(dev->phydev, ifr, cmd); phydev 2978 drivers/net/ethernet/marvell/mv643xx_eth.c struct phy_device *phydev; phydev 2993 drivers/net/ethernet/marvell/mv643xx_eth.c phydev = ERR_PTR(-ENODEV); phydev 3000 drivers/net/ethernet/marvell/mv643xx_eth.c phydev = phy_connect(mp->dev, phy_id, mv643xx_eth_adjust_link, phydev 3002 drivers/net/ethernet/marvell/mv643xx_eth.c if (!IS_ERR(phydev)) { phydev 3008 drivers/net/ethernet/marvell/mv643xx_eth.c return phydev; phydev 3014 drivers/net/ethernet/marvell/mv643xx_eth.c struct phy_device *phy = dev->phydev; phydev 3044 drivers/net/ethernet/marvell/mv643xx_eth.c if (!dev->phydev) { phydev 3083 drivers/net/ethernet/marvell/mv643xx_eth.c struct phy_device *phydev = NULL; phydev 3140 drivers/net/ethernet/marvell/mv643xx_eth.c phydev = of_phy_connect(mp->dev, pd->phy_node, phydev 3143 drivers/net/ethernet/marvell/mv643xx_eth.c if (!phydev) phydev 3146 drivers/net/ethernet/marvell/mv643xx_eth.c phy_addr_set(mp, phydev->mdio.addr); phydev 3148 drivers/net/ethernet/marvell/mv643xx_eth.c phydev = phy_scan(mp, pd->phy_addr); phydev 3150 drivers/net/ethernet/marvell/mv643xx_eth.c if (IS_ERR(phydev)) phydev 3151 drivers/net/ethernet/marvell/mv643xx_eth.c err = PTR_ERR(phydev); phydev 3239 drivers/net/ethernet/marvell/mv643xx_eth.c if (dev->phydev) phydev 3240 drivers/net/ethernet/marvell/mv643xx_eth.c phy_disconnect(dev->phydev); phydev 633 drivers/net/ethernet/marvell/pxa168_eth.c phy_start(dev->phydev); phydev 689 drivers/net/ethernet/marvell/pxa168_eth.c phy_stop(dev->phydev); phydev 932 drivers/net/ethernet/marvell/pxa168_eth.c struct phy_device *phy = dev->phydev; phydev 965 drivers/net/ethernet/marvell/pxa168_eth.c if (dev->phydev) phydev 1350 drivers/net/ethernet/marvell/pxa168_eth.c if (dev->phydev) phydev 1351 drivers/net/ethernet/marvell/pxa168_eth.c return phy_mii_ioctl(dev->phydev, ifr, cmd); phydev 1549 drivers/net/ethernet/marvell/pxa168_eth.c if (dev->phydev) phydev 1550 drivers/net/ethernet/marvell/pxa168_eth.c phy_disconnect(dev->phydev); phydev 696 drivers/net/ethernet/microchip/lan743x_ethtool.c struct phy_device *phydev = netdev->phydev; phydev 700 drivers/net/ethernet/microchip/lan743x_ethtool.c if (!phydev) phydev 702 drivers/net/ethernet/microchip/lan743x_ethtool.c if (!phydev->drv) { phydev 708 drivers/net/ethernet/microchip/lan743x_ethtool.c ret = phy_ethtool_get_eee(phydev, eee); phydev 734 drivers/net/ethernet/microchip/lan743x_ethtool.c struct phy_device *phydev = NULL; phydev 743 drivers/net/ethernet/microchip/lan743x_ethtool.c phydev = netdev->phydev; phydev 744 drivers/net/ethernet/microchip/lan743x_ethtool.c if (!phydev) phydev 746 drivers/net/ethernet/microchip/lan743x_ethtool.c if (!phydev->drv) { phydev 753 drivers/net/ethernet/microchip/lan743x_ethtool.c ret = phy_init_eee(phydev, 0); phydev 772 drivers/net/ethernet/microchip/lan743x_ethtool.c return phy_ethtool_set_eee(phydev, eee); phydev 783 drivers/net/ethernet/microchip/lan743x_ethtool.c phy_ethtool_get_wol(netdev->phydev, wol); phydev 812 drivers/net/ethernet/microchip/lan743x_ethtool.c phy_ethtool_set_wol(netdev->phydev, wol); phydev 948 drivers/net/ethernet/microchip/lan743x_main.c struct phy_device *phydev = netdev->phydev; phydev 950 drivers/net/ethernet/microchip/lan743x_main.c phy_print_status(phydev); phydev 951 drivers/net/ethernet/microchip/lan743x_main.c if (phydev->state == PHY_RUNNING) { phydev 959 drivers/net/ethernet/microchip/lan743x_main.c linkmode_adv_to_mii_adv_t(phydev->advertising); phydev 961 drivers/net/ethernet/microchip/lan743x_main.c linkmode_adv_to_mii_adv_t(phydev->lp_advertising); phydev 975 drivers/net/ethernet/microchip/lan743x_main.c phy_stop(netdev->phydev); phydev 976 drivers/net/ethernet/microchip/lan743x_main.c phy_disconnect(netdev->phydev); phydev 977 drivers/net/ethernet/microchip/lan743x_main.c netdev->phydev = NULL; phydev 983 drivers/net/ethernet/microchip/lan743x_main.c struct phy_device *phydev; phydev 988 drivers/net/ethernet/microchip/lan743x_main.c phydev = phy_find_first(adapter->mdiobus); phydev 989 drivers/net/ethernet/microchip/lan743x_main.c if (!phydev) phydev 992 drivers/net/ethernet/microchip/lan743x_main.c ret = phy_connect_direct(netdev, phydev, phydev 999 drivers/net/ethernet/microchip/lan743x_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); phydev 1002 drivers/net/ethernet/microchip/lan743x_main.c phy_support_asym_pause(phydev); phydev 1004 drivers/net/ethernet/microchip/lan743x_main.c phy->fc_autoneg = phydev->autoneg; phydev 1006 drivers/net/ethernet/microchip/lan743x_main.c phy_start(phydev); phydev 1007 drivers/net/ethernet/microchip/lan743x_main.c phy_start_aneg(phydev); phydev 2554 drivers/net/ethernet/microchip/lan743x_main.c return phy_mii_ioctl(netdev->phydev, ifr, cmd); phydev 372 drivers/net/ethernet/mscc/ocelot.c switch (dev->phydev->speed) { phydev 389 drivers/net/ethernet/mscc/ocelot.c dev->phydev->speed); phydev 393 drivers/net/ethernet/mscc/ocelot.c phy_print_status(dev->phydev); phydev 395 drivers/net/ethernet/mscc/ocelot.c if (!dev->phydev->link) phydev 516 drivers/net/ethernet/mscc/ocelot.c dev->phydev = port->phy; phydev 529 drivers/net/ethernet/mscc/ocelot.c dev->phydev = NULL; phydev 428 drivers/net/ethernet/ni/nixge.c struct phy_device *phydev = ndev->phydev; phydev 430 drivers/net/ethernet/ni/nixge.c if (phydev->link != priv->link || phydev->speed != priv->speed || phydev 431 drivers/net/ethernet/ni/nixge.c phydev->duplex != priv->duplex) { phydev 432 drivers/net/ethernet/ni/nixge.c priv->link = phydev->link; phydev 433 drivers/net/ethernet/ni/nixge.c priv->speed = phydev->speed; phydev 434 drivers/net/ethernet/ni/nixge.c priv->duplex = phydev->duplex; phydev 435 drivers/net/ethernet/ni/nixge.c phy_print_status(phydev); phydev 917 drivers/net/ethernet/ni/nixge.c if (ndev->phydev) { phydev 918 drivers/net/ethernet/ni/nixge.c phy_stop(ndev->phydev); phydev 919 drivers/net/ethernet/ni/nixge.c phy_disconnect(ndev->phydev); phydev 717 drivers/net/ethernet/nxp/lpc_eth.c struct phy_device *phydev = ndev->phydev; phydev 724 drivers/net/ethernet/nxp/lpc_eth.c if (phydev->link) { phydev 725 drivers/net/ethernet/nxp/lpc_eth.c if ((pldat->speed != phydev->speed) || phydev 726 drivers/net/ethernet/nxp/lpc_eth.c (pldat->duplex != phydev->duplex)) { phydev 727 drivers/net/ethernet/nxp/lpc_eth.c pldat->speed = phydev->speed; phydev 728 drivers/net/ethernet/nxp/lpc_eth.c pldat->duplex = phydev->duplex; phydev 733 drivers/net/ethernet/nxp/lpc_eth.c if (phydev->link != pldat->link) { phydev 734 drivers/net/ethernet/nxp/lpc_eth.c if (!phydev->link) { phydev 738 drivers/net/ethernet/nxp/lpc_eth.c pldat->link = phydev->link; phydev 752 drivers/net/ethernet/nxp/lpc_eth.c struct phy_device *phydev = phy_find_first(pldat->mii_bus); phydev 754 drivers/net/ethernet/nxp/lpc_eth.c if (!phydev) { phydev 764 drivers/net/ethernet/nxp/lpc_eth.c phydev = phy_connect(ndev, phydev_name(phydev), phydev 768 drivers/net/ethernet/nxp/lpc_eth.c if (IS_ERR(phydev)) { phydev 770 drivers/net/ethernet/nxp/lpc_eth.c return PTR_ERR(phydev); phydev 773 drivers/net/ethernet/nxp/lpc_eth.c phy_set_max_speed(phydev, SPEED_100); phydev 779 drivers/net/ethernet/nxp/lpc_eth.c phy_attached_info(phydev); phydev 1009 drivers/net/ethernet/nxp/lpc_eth.c if (ndev->phydev) phydev 1010 drivers/net/ethernet/nxp/lpc_eth.c phy_stop(ndev->phydev); phydev 1146 drivers/net/ethernet/nxp/lpc_eth.c struct phy_device *phydev = ndev->phydev; phydev 1151 drivers/net/ethernet/nxp/lpc_eth.c if (!phydev) phydev 1154 drivers/net/ethernet/nxp/lpc_eth.c return phy_mii_ioctl(phydev, req, cmd); phydev 1170 drivers/net/ethernet/nxp/lpc_eth.c phy_resume(ndev->phydev); phydev 1177 drivers/net/ethernet/nxp/lpc_eth.c phy_start(ndev->phydev); phydev 981 drivers/net/ethernet/pasemi/pasemi_mac.c if (!dev->phydev->link) { phydev 1002 drivers/net/ethernet/pasemi/pasemi_mac.c if (!dev->phydev->duplex) phydev 1005 drivers/net/ethernet/pasemi/pasemi_mac.c switch (dev->phydev->speed) { phydev 1019 drivers/net/ethernet/pasemi/pasemi_mac.c printk("Unsupported speed %d\n", dev->phydev->speed); phydev 1023 drivers/net/ethernet/pasemi/pasemi_mac.c msg = mac->link != dev->phydev->link || flags != new_flags; phydev 1025 drivers/net/ethernet/pasemi/pasemi_mac.c mac->duplex = dev->phydev->duplex; phydev 1026 drivers/net/ethernet/pasemi/pasemi_mac.c mac->speed = dev->phydev->speed; phydev 1027 drivers/net/ethernet/pasemi/pasemi_mac.c mac->link = dev->phydev->link; phydev 1041 drivers/net/ethernet/pasemi/pasemi_mac.c struct phy_device *phydev; phydev 1050 drivers/net/ethernet/pasemi/pasemi_mac.c phydev = of_phy_connect(dev, phy_dn, &pasemi_adjust_link, 0, phydev 1054 drivers/net/ethernet/pasemi/pasemi_mac.c if (!phydev) { phydev 1188 drivers/net/ethernet/pasemi/pasemi_mac.c if (dev->phydev) phydev 1189 drivers/net/ethernet/pasemi/pasemi_mac.c phy_start(dev->phydev); phydev 1282 drivers/net/ethernet/pasemi/pasemi_mac.c if (dev->phydev) { phydev 1283 drivers/net/ethernet/pasemi/pasemi_mac.c phy_stop(dev->phydev); phydev 1284 drivers/net/ethernet/pasemi/pasemi_mac.c phy_disconnect(dev->phydev); phydev 127 drivers/net/ethernet/qualcomm/emac/emac-ethtool.c struct phy_device *phydev = netdev->phydev; phydev 129 drivers/net/ethernet/qualcomm/emac/emac-ethtool.c if (!phydev) phydev 132 drivers/net/ethernet/qualcomm/emac/emac-ethtool.c return genphy_restart_aneg(phydev); phydev 483 drivers/net/ethernet/qualcomm/emac/emac-mac.c struct phy_device *phydev = adpt->phydev; phydev 506 drivers/net/ethernet/qualcomm/emac/emac-mac.c adpt->rx_flow_control = phydev->pause; phydev 507 drivers/net/ethernet/qualcomm/emac/emac-mac.c adpt->tx_flow_control = phydev->pause != phydev->asym_pause; phydev 514 drivers/net/ethernet/qualcomm/emac/emac-mac.c if (phydev->speed == SPEED_1000) { phydev 522 drivers/net/ethernet/qualcomm/emac/emac-mac.c if (phydev->duplex == DUPLEX_FULL) phydev 917 drivers/net/ethernet/qualcomm/emac/emac-mac.c struct phy_device *phydev = netdev->phydev; phydev 919 drivers/net/ethernet/qualcomm/emac/emac-mac.c if (phydev->link) { phydev 927 drivers/net/ethernet/qualcomm/emac/emac-mac.c phy_print_status(phydev); phydev 940 drivers/net/ethernet/qualcomm/emac/emac-mac.c adpt->phydev->irq = PHY_POLL; phydev 941 drivers/net/ethernet/qualcomm/emac/emac-mac.c ret = phy_connect_direct(netdev, adpt->phydev, emac_adjust_link, phydev 948 drivers/net/ethernet/qualcomm/emac/emac-mac.c phy_attached_print(adpt->phydev, NULL); phydev 954 drivers/net/ethernet/qualcomm/emac/emac-mac.c phy_start(adpt->phydev); phydev 970 drivers/net/ethernet/qualcomm/emac/emac-mac.c phy_stop(adpt->phydev); phydev 980 drivers/net/ethernet/qualcomm/emac/emac-mac.c phy_disconnect(adpt->phydev); phydev 124 drivers/net/ethernet/qualcomm/emac/emac-phy.c adpt->phydev = phy_find_first(mii_bus); phydev 126 drivers/net/ethernet/qualcomm/emac/emac-phy.c adpt->phydev = mdiobus_get_phy(mii_bus, phy_addr); phydev 133 drivers/net/ethernet/qualcomm/emac/emac-phy.c if (adpt->phydev) phydev 134 drivers/net/ethernet/qualcomm/emac/emac-phy.c get_device(&adpt->phydev->mdio.dev); phydev 145 drivers/net/ethernet/qualcomm/emac/emac-phy.c adpt->phydev = of_phy_find_device(phy_np); phydev 149 drivers/net/ethernet/qualcomm/emac/emac-phy.c if (!adpt->phydev) { phydev 298 drivers/net/ethernet/qualcomm/emac/emac.c if (!netdev->phydev) phydev 301 drivers/net/ethernet/qualcomm/emac/emac.c return phy_mii_ioctl(netdev->phydev, ifr, cmd); phydev 715 drivers/net/ethernet/qualcomm/emac/emac.c put_device(&adpt->phydev->mdio.dev); phydev 735 drivers/net/ethernet/qualcomm/emac/emac.c put_device(&adpt->phydev->mdio.dev); phydev 328 drivers/net/ethernet/qualcomm/emac/emac.h struct phy_device *phydev; phydev 468 drivers/net/ethernet/rdc/r6040.c phy_stop(dev->phydev); phydev 503 drivers/net/ethernet/rdc/r6040.c if (!dev->phydev) phydev 506 drivers/net/ethernet/rdc/r6040.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 722 drivers/net/ethernet/rdc/r6040.c phy_start(dev->phydev); phydev 970 drivers/net/ethernet/rdc/r6040.c struct phy_device *phydev = dev->phydev; phydev 974 drivers/net/ethernet/rdc/r6040.c BUG_ON(!phydev); phydev 976 drivers/net/ethernet/rdc/r6040.c if (lp->old_link != phydev->link) { phydev 978 drivers/net/ethernet/rdc/r6040.c lp->old_link = phydev->link; phydev 982 drivers/net/ethernet/rdc/r6040.c if (phydev->link && (lp->old_duplex != phydev->duplex)) { phydev 983 drivers/net/ethernet/rdc/r6040.c lp->mcr0 |= (phydev->duplex == DUPLEX_FULL ? MCR0_FD : 0); phydev 987 drivers/net/ethernet/rdc/r6040.c lp->old_duplex = phydev->duplex; phydev 991 drivers/net/ethernet/rdc/r6040.c phy_print_status(phydev); phydev 997 drivers/net/ethernet/rdc/r6040.c struct phy_device *phydev = NULL; phydev 999 drivers/net/ethernet/rdc/r6040.c phydev = phy_find_first(lp->mii_bus); phydev 1000 drivers/net/ethernet/rdc/r6040.c if (!phydev) { phydev 1005 drivers/net/ethernet/rdc/r6040.c phydev = phy_connect(dev, phydev_name(phydev), &r6040_adjust_link, phydev 1008 drivers/net/ethernet/rdc/r6040.c if (IS_ERR(phydev)) { phydev 1010 drivers/net/ethernet/rdc/r6040.c return PTR_ERR(phydev); phydev 1013 drivers/net/ethernet/rdc/r6040.c phy_set_max_speed(phydev, SPEED_100); phydev 1018 drivers/net/ethernet/rdc/r6040.c phy_attached_info(phydev); phydev 651 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev; phydev 1407 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 1414 drivers/net/ethernet/realtek/r8169_main.c if (phydev->speed == SPEED_1000) { phydev 1417 drivers/net/ethernet/realtek/r8169_main.c } else if (phydev->speed == SPEED_100) { phydev 1427 drivers/net/ethernet/realtek/r8169_main.c if (phydev->speed == SPEED_1000) { phydev 1435 drivers/net/ethernet/realtek/r8169_main.c if (phydev->speed == SPEED_10) { phydev 1891 drivers/net/ethernet/realtek/r8169_main.c if (tp->phydev->speed == ci->speed) phydev 2048 drivers/net/ethernet/realtek/r8169_main.c ret = phy_ethtool_get_eee(tp->phydev, data); phydev 2072 drivers/net/ethernet/realtek/r8169_main.c if (dev->phydev->autoneg == AUTONEG_DISABLE || phydev 2073 drivers/net/ethernet/realtek/r8169_main.c dev->phydev->duplex != DUPLEX_FULL) { phydev 2078 drivers/net/ethernet/realtek/r8169_main.c ret = phy_ethtool_set_eee(tp->phydev, data); phydev 2081 drivers/net/ethernet/realtek/r8169_main.c tp->eee_adv = phy_read_mmd(dev->phydev, MDIO_MMD_AN, phydev 2112 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 2119 drivers/net/ethernet/realtek/r8169_main.c adv = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); phydev 2122 drivers/net/ethernet/realtek/r8169_main.c phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv); phydev 2302 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 2304 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0007); phydev 2305 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1e, 0x0020); phydev 2306 drivers/net/ethernet/realtek/r8169_main.c phy_set_bits(phydev, 0x15, BIT(8)); phydev 2308 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0005); phydev 2309 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x05, 0x8b85); phydev 2310 drivers/net/ethernet/realtek/r8169_main.c phy_set_bits(phydev, 0x06, BIT(13)); phydev 2312 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0000); phydev 2317 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a43, 0x11, 0, BIT(4)); phydev 2322 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 2326 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa4a, 0x11, 0x0000, 0x0200); phydev 2327 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa42, 0x14, 0x0000, 0x0080); phydev 2332 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 2336 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa6d, 0x12, 0x0001, 0x0000); phydev 2337 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa6d, 0x14, 0x0010, 0x0000); phydev 3236 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a43, 0x10, BIT(2), 0); phydev 3241 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 3243 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0x0bcc, 0x14, BIT(8), 0); phydev 3244 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0x0a44, 0x11, 0, BIT(7) | BIT(6)); phydev 3245 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0a43); phydev 3246 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8084); phydev 3247 drivers/net/ethernet/realtek/r8169_main.c phy_clear_bits(phydev, 0x14, BIT(14) | BIT(13)); phydev 3248 drivers/net/ethernet/realtek/r8169_main.c phy_set_bits(phydev, 0x10, BIT(12) | BIT(1) | BIT(0)); phydev 3250 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0000); phydev 3259 drivers/net/ethernet/realtek/r8169_main.c ret = phy_read_paged(tp->phydev, 0x0a46, 0x10); phydev 3261 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0bcc, 0x12, BIT(15), 0); phydev 3263 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0bcc, 0x12, 0, BIT(15)); phydev 3265 drivers/net/ethernet/realtek/r8169_main.c ret = phy_read_paged(tp->phydev, 0x0a46, 0x13); phydev 3267 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c41, 0x15, 0, BIT(1)); phydev 3269 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c41, 0x15, BIT(1), 0); phydev 3272 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(3) | BIT(2)); phydev 3277 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a4b, 0x11, 0, BIT(2)); phydev 3284 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c42, 0x11, BIT(13), BIT(14)); phydev 3381 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(11)); phydev 3384 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0bca, 0x17, BIT(12) | BIT(13), BIT(14)); phydev 3404 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, BIT(7), 0); phydev 3434 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(11)); phydev 3470 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, BIT(7), 0); phydev 3480 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(3) | BIT(2)); phydev 3485 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a4b, 0x11, 0, BIT(2)); phydev 3494 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c42, 0x11, BIT(13), BIT(14)); phydev 3512 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c42, 0x11, BIT(13), BIT(14)); phydev 3662 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 3664 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad4, 0x10, 0x03ff, 0x0084); phydev 3665 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad4, 0x17, 0x0000, 0x0010); phydev 3666 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad1, 0x13, 0x03ff, 0x0006); phydev 3667 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad3, 0x11, 0x003f, 0x0006); phydev 3668 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac0, 0x14, 0x0000, 0x1100); phydev 3669 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac8, 0x15, 0xf000, 0x7000); phydev 3670 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad1, 0x14, 0x0000, 0x0400); phydev 3671 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad1, 0x15, 0x0000, 0x03ff); phydev 3672 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad1, 0x16, 0x0000, 0x03ff); phydev 3674 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0a43); phydev 3675 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80ea); phydev 3676 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0xc400); phydev 3677 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80eb); phydev 3678 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0x0700, 0x0300); phydev 3679 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80f8); phydev 3680 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0x1c00); phydev 3681 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80f1); phydev 3682 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0x3000); phydev 3683 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80fe); phydev 3684 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0xa500); phydev 3685 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8102); phydev 3686 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0x5000); phydev 3687 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8105); phydev 3688 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0x3300); phydev 3689 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8100); phydev 3690 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0x7000); phydev 3691 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8104); phydev 3692 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0xf000); phydev 3693 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8106); phydev 3694 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0x6500); phydev 3695 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80dc); phydev 3696 drivers/net/ethernet/realtek/r8169_main.c phy_modify(phydev, 0x14, 0xff00, 0xed00); phydev 3697 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80df); phydev 3698 drivers/net/ethernet/realtek/r8169_main.c phy_set_bits(phydev, 0x14, BIT(8)); phydev 3699 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80e1); phydev 3700 drivers/net/ethernet/realtek/r8169_main.c phy_clear_bits(phydev, 0x14, BIT(8)); phydev 3701 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0000); phydev 3703 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xbf0, 0x13, 0x003f, 0x0038); phydev 3704 drivers/net/ethernet/realtek/r8169_main.c phy_write_paged(phydev, 0xa43, 0x13, 0x819f); phydev 3705 drivers/net/ethernet/realtek/r8169_main.c phy_write_paged(phydev, 0xa43, 0x14, 0xd0b6); phydev 3707 drivers/net/ethernet/realtek/r8169_main.c phy_write_paged(phydev, 0xbc3, 0x12, 0x5555); phydev 3708 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xbf0, 0x15, 0x0e00, 0x0a00); phydev 3709 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa5c, 0x10, 0x0400, 0x0000); phydev 3710 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa44, 0x11, 0x0000, 0x0800); phydev 3718 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 3721 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad4, 0x17, 0x0000, 0x0010); phydev 3722 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad1, 0x13, 0x03ff, 0x03ff); phydev 3723 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad3, 0x11, 0x003f, 0x0006); phydev 3724 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac0, 0x14, 0x1100, 0x0000); phydev 3725 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xacc, 0x10, 0x0003, 0x0002); phydev 3726 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad4, 0x10, 0x00e7, 0x0044); phydev 3727 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac1, 0x12, 0x0080, 0x0000); phydev 3728 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac8, 0x10, 0x0300, 0x0000); phydev 3729 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac5, 0x17, 0x0007, 0x0002); phydev 3730 drivers/net/ethernet/realtek/r8169_main.c phy_write_paged(phydev, 0xad4, 0x16, 0x00a8); phydev 3731 drivers/net/ethernet/realtek/r8169_main.c phy_write_paged(phydev, 0xac5, 0x16, 0x01ff); phydev 3732 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xac8, 0x15, 0x00f0, 0x0030); phydev 3734 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0b87); phydev 3735 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x16, 0x80a2); phydev 3736 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x17, 0x0153); phydev 3737 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x16, 0x809c); phydev 3738 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x17, 0x0153); phydev 3739 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0000); phydev 3741 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0a43); phydev 3742 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x81B3); phydev 3743 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0043); phydev 3744 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00A7); phydev 3745 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00D6); phydev 3746 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00EC); phydev 3747 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00F6); phydev 3748 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00FB); phydev 3749 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00FD); phydev 3750 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00FF); phydev 3751 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x00BB); phydev 3752 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0058); phydev 3753 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0029); phydev 3754 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0013); phydev 3755 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0009); phydev 3756 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0004); phydev 3757 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0002); phydev 3759 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x0000); phydev 3761 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x8257); phydev 3762 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x020F); phydev 3764 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x80EA); phydev 3765 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x14, 0x7843); phydev 3766 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0000); phydev 3770 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xd06, 0x14, 0x0000, 0x2000); phydev 3772 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0a43); phydev 3773 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x13, 0x81a2); phydev 3774 drivers/net/ethernet/realtek/r8169_main.c phy_set_bits(phydev, 0x14, BIT(8)); phydev 3775 drivers/net/ethernet/realtek/r8169_main.c phy_write(phydev, 0x1f, 0x0000); phydev 3777 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xb54, 0x16, 0xff00, 0xdb00); phydev 3778 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa45, 0x12, 0x0001, 0x0000); phydev 3779 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa5d, 0x12, 0x0000, 0x0020); phydev 3780 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xad4, 0x17, 0x0010, 0x0000); phydev 3781 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa86, 0x15, 0x0001, 0x0000); phydev 3782 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(phydev, 0xa44, 0x11, 0x0000, 0x0800); phydev 3871 drivers/net/ethernet/realtek/r8169_main.c phy_speed_up(tp->phydev); phydev 3873 drivers/net/ethernet/realtek/r8169_main.c genphy_soft_reset(tp->phydev); phydev 3923 drivers/net/ethernet/realtek/r8169_main.c return phy_mii_ioctl(tp->phydev, ifr, cmd); phydev 3955 drivers/net/ethernet/realtek/r8169_main.c phy_speed_down(tp->phydev, false); phydev 4017 drivers/net/ethernet/realtek/r8169_main.c phy_resume(tp->phydev); phydev 6254 drivers/net/ethernet/realtek/r8169_main.c phy_mac_interrupt(tp->phydev); phydev 6343 drivers/net/ethernet/realtek/r8169_main.c phy_print_status(tp->phydev); phydev 6348 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; phydev 6355 drivers/net/ethernet/realtek/r8169_main.c ret = phy_connect_direct(tp->dev, phydev, r8169_phylink_handler, phydev 6361 drivers/net/ethernet/realtek/r8169_main.c phy_set_max_speed(phydev, SPEED_100); phydev 6363 drivers/net/ethernet/realtek/r8169_main.c phy_support_asym_pause(phydev); phydev 6365 drivers/net/ethernet/realtek/r8169_main.c phy_attached_info(phydev); phydev 6374 drivers/net/ethernet/realtek/r8169_main.c phy_stop(tp->phydev); phydev 6416 drivers/net/ethernet/realtek/r8169_main.c phy_disconnect(tp->phydev); phydev 6493 drivers/net/ethernet/realtek/r8169_main.c phy_start(tp->phydev); phydev 6582 drivers/net/ethernet/realtek/r8169_main.c phy_stop(tp->phydev); phydev 6617 drivers/net/ethernet/realtek/r8169_main.c phy_start(tp->phydev); phydev 6763 drivers/net/ethernet/realtek/r8169_main.c mdiobus_unregister(tp->phydev->mdio.bus); phydev 6904 drivers/net/ethernet/realtek/r8169_main.c tp->phydev = mdiobus_get_phy(new_bus, 0); phydev 6905 drivers/net/ethernet/realtek/r8169_main.c if (!tp->phydev) { phydev 6908 drivers/net/ethernet/realtek/r8169_main.c } else if (!tp->phydev->drv) { phydev 6918 drivers/net/ethernet/realtek/r8169_main.c phy_suspend(tp->phydev); phydev 7263 drivers/net/ethernet/realtek/r8169_main.c mdiobus_unregister(tp->phydev->mdio.bus); phydev 968 drivers/net/ethernet/renesas/ravb_main.c struct phy_device *phydev = ndev->phydev; phydev 978 drivers/net/ethernet/renesas/ravb_main.c if (phydev->link) { phydev 979 drivers/net/ethernet/renesas/ravb_main.c if (phydev->speed != priv->speed) { phydev 981 drivers/net/ethernet/renesas/ravb_main.c priv->speed = phydev->speed; phydev 987 drivers/net/ethernet/renesas/ravb_main.c priv->link = phydev->link; phydev 996 drivers/net/ethernet/renesas/ravb_main.c if (priv->no_avb_link && phydev->link) phydev 1002 drivers/net/ethernet/renesas/ravb_main.c phy_print_status(phydev); phydev 1015 drivers/net/ethernet/renesas/ravb_main.c struct phy_device *phydev; phydev 1035 drivers/net/ethernet/renesas/ravb_main.c phydev = of_phy_connect(ndev, pn, ravb_adjust_link, 0, phydev 1038 drivers/net/ethernet/renesas/ravb_main.c if (!phydev) { phydev 1048 drivers/net/ethernet/renesas/ravb_main.c err = phy_set_max_speed(phydev, SPEED_100); phydev 1058 drivers/net/ethernet/renesas/ravb_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT); phydev 1059 drivers/net/ethernet/renesas/ravb_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT); phydev 1060 drivers/net/ethernet/renesas/ravb_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_Pause_BIT); phydev 1061 drivers/net/ethernet/renesas/ravb_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_Asym_Pause_BIT); phydev 1064 drivers/net/ethernet/renesas/ravb_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); phydev 1065 drivers/net/ethernet/renesas/ravb_main.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT); phydev 1067 drivers/net/ethernet/renesas/ravb_main.c phy_attached_info(phydev); phydev 1072 drivers/net/ethernet/renesas/ravb_main.c phy_disconnect(phydev); phydev 1089 drivers/net/ethernet/renesas/ravb_main.c phy_start(ndev->phydev); phydev 1688 drivers/net/ethernet/renesas/ravb_main.c if (ndev->phydev) { phydev 1689 drivers/net/ethernet/renesas/ravb_main.c phy_stop(ndev->phydev); phydev 1690 drivers/net/ethernet/renesas/ravb_main.c phy_disconnect(ndev->phydev); phydev 1781 drivers/net/ethernet/renesas/ravb_main.c struct phy_device *phydev = ndev->phydev; phydev 1786 drivers/net/ethernet/renesas/ravb_main.c if (!phydev) phydev 1796 drivers/net/ethernet/renesas/ravb_main.c return phy_mii_ioctl(phydev, req, cmd); phydev 1977 drivers/net/ethernet/renesas/sh_eth.c struct phy_device *phydev = ndev->phydev; phydev 1987 drivers/net/ethernet/renesas/sh_eth.c if (phydev->link) { phydev 1988 drivers/net/ethernet/renesas/sh_eth.c if (phydev->duplex != mdp->duplex) { phydev 1990 drivers/net/ethernet/renesas/sh_eth.c mdp->duplex = phydev->duplex; phydev 1995 drivers/net/ethernet/renesas/sh_eth.c if (phydev->speed != mdp->speed) { phydev 1997 drivers/net/ethernet/renesas/sh_eth.c mdp->speed = phydev->speed; phydev 2004 drivers/net/ethernet/renesas/sh_eth.c mdp->link = phydev->link; phydev 2014 drivers/net/ethernet/renesas/sh_eth.c if ((mdp->cd->no_psr || mdp->no_ether_link) && phydev->link) phydev 2020 drivers/net/ethernet/renesas/sh_eth.c phy_print_status(phydev); phydev 2028 drivers/net/ethernet/renesas/sh_eth.c struct phy_device *phydev; phydev 2039 drivers/net/ethernet/renesas/sh_eth.c phydev = of_phy_connect(ndev, pn, phydev 2044 drivers/net/ethernet/renesas/sh_eth.c if (!phydev) phydev 2045 drivers/net/ethernet/renesas/sh_eth.c phydev = ERR_PTR(-ENOENT); phydev 2052 drivers/net/ethernet/renesas/sh_eth.c phydev = phy_connect(ndev, phy_id, sh_eth_adjust_link, phydev 2056 drivers/net/ethernet/renesas/sh_eth.c if (IS_ERR(phydev)) { phydev 2058 drivers/net/ethernet/renesas/sh_eth.c return PTR_ERR(phydev); phydev 2063 drivers/net/ethernet/renesas/sh_eth.c int err = phy_set_max_speed(phydev, SPEED_100); phydev 2066 drivers/net/ethernet/renesas/sh_eth.c phy_disconnect(phydev); phydev 2071 drivers/net/ethernet/renesas/sh_eth.c phy_attached_info(phydev); phydev 2085 drivers/net/ethernet/renesas/sh_eth.c phy_start(ndev->phydev); phydev 2633 drivers/net/ethernet/renesas/sh_eth.c if (ndev->phydev) { phydev 2634 drivers/net/ethernet/renesas/sh_eth.c phy_stop(ndev->phydev); phydev 2635 drivers/net/ethernet/renesas/sh_eth.c phy_disconnect(ndev->phydev); phydev 2653 drivers/net/ethernet/renesas/sh_eth.c struct phy_device *phydev = ndev->phydev; phydev 2658 drivers/net/ethernet/renesas/sh_eth.c if (!phydev) phydev 2661 drivers/net/ethernet/renesas/sh_eth.c return phy_mii_ioctl(phydev, rq, cmd); phydev 147 drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c return phy_ethtool_get_eee(dev->phydev, edata); phydev 172 drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c return phy_ethtool_set_eee(dev->phydev, edata); phydev 234 drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c int val = phy_get_eee_err(dev->phydev); phydev 130 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (phy_init_eee(ndev->phydev, 1)) phydev 159 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c priv->hw->mac->set_eee_pls(priv->ioaddr, ndev->phydev->link); phydev 205 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c struct phy_device *phydev = dev->phydev; phydev 209 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (!phydev) phydev 216 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (phydev->link) { phydev 217 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (phydev->speed != priv->speed) { phydev 219 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c switch (phydev->speed) { phydev 232 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phydev->speed); phydev 235 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c priv->speed = phydev->speed; phydev 250 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_print_status(phydev); phydev 268 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c struct phy_device *phydev; phydev 288 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phydev = phy_connect(ndev, phy_id_fmt, &sxgbe_adjust_link, phy_iface); phydev 290 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (IS_ERR(phydev)) { phydev 292 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c return PTR_ERR(phydev); phydev 298 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_set_max_speed(phydev, SPEED_1000); phydev 300 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (phydev->phy_id == 0) { phydev 301 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_disconnect(phydev); phydev 306 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c __func__, phydev->phy_id, phydev->link); phydev 1163 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (dev->phydev) phydev 1164 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_start(dev->phydev); phydev 1184 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (dev->phydev) phydev 1185 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_disconnect(dev->phydev); phydev 1206 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (dev->phydev) { phydev 1207 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_stop(dev->phydev); phydev 1208 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c phy_disconnect(dev->phydev); phydev 1942 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c if (!dev->phydev) phydev 1944 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c ret = phy_mii_ioctl(dev->phydev, rq, cmd); phydev 838 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = dev->phydev; phydev 909 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = ndev->phydev; phydev 950 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = dev->phydev; phydev 1015 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phydev = NULL; phydev 1019 drivers/net/ethernet/smsc/smsc911x.c phydev = phy_find_first(pdata->mii_bus); phydev 1020 drivers/net/ethernet/smsc/smsc911x.c if (!phydev) { phydev 1026 drivers/net/ethernet/smsc/smsc911x.c phydev->mdio.addr, phydev->phy_id); phydev 1028 drivers/net/ethernet/smsc/smsc911x.c ret = phy_connect_direct(dev, phydev, &smsc911x_phy_adjust_link, phydev 1036 drivers/net/ethernet/smsc/smsc911x.c phy_attached_info(phydev); phydev 1038 drivers/net/ethernet/smsc/smsc911x.c phy_set_max_speed(phydev, SPEED_100); phydev 1041 drivers/net/ethernet/smsc/smsc911x.c phy_support_asym_pause(phydev); phydev 1049 drivers/net/ethernet/smsc/smsc911x.c phy_disconnect(phydev); phydev 1337 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = ndev->phydev; phydev 1375 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = ndev->phydev; phydev 1408 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = ndev->phydev; phydev 1594 drivers/net/ethernet/smsc/smsc911x.c if (!dev->phydev) { phydev 1699 drivers/net/ethernet/smsc/smsc911x.c phy_start(dev->phydev); phydev 1736 drivers/net/ethernet/smsc/smsc911x.c phy_disconnect(dev->phydev); phydev 1737 drivers/net/ethernet/smsc/smsc911x.c dev->phydev = NULL; phydev 1764 drivers/net/ethernet/smsc/smsc911x.c if (dev->phydev) { phydev 1765 drivers/net/ethernet/smsc/smsc911x.c phy_stop(dev->phydev); phydev 1766 drivers/net/ethernet/smsc/smsc911x.c phy_disconnect(dev->phydev); phydev 1767 drivers/net/ethernet/smsc/smsc911x.c dev->phydev = NULL; phydev 1949 drivers/net/ethernet/smsc/smsc911x.c if (!netif_running(dev) || !dev->phydev) phydev 1952 drivers/net/ethernet/smsc/smsc911x.c return phy_mii_ioctl(dev->phydev, ifr, cmd); phydev 1987 drivers/net/ethernet/smsc/smsc911x.c struct phy_device *phy_dev = dev->phydev; phydev 216 drivers/net/ethernet/smsc/smsc9420.c if (!netif_running(dev) || !dev->phydev) phydev 219 drivers/net/ethernet/smsc/smsc9420.c return phy_mii_ioctl(dev->phydev, ifr, cmd); phydev 256 drivers/net/ethernet/smsc/smsc9420.c struct phy_device *phy_dev = dev->phydev; phydev 690 drivers/net/ethernet/smsc/smsc9420.c BUG_ON(!dev->phydev); phydev 711 drivers/net/ethernet/smsc/smsc9420.c phy_stop(dev->phydev); phydev 713 drivers/net/ethernet/smsc/smsc9420.c phy_disconnect(dev->phydev); phydev 1047 drivers/net/ethernet/smsc/smsc9420.c struct phy_device *phy_dev = dev->phydev; phydev 1076 drivers/net/ethernet/smsc/smsc9420.c struct phy_device *phy_dev = dev->phydev; phydev 1107 drivers/net/ethernet/smsc/smsc9420.c struct phy_device *phydev = NULL; phydev 1109 drivers/net/ethernet/smsc/smsc9420.c BUG_ON(dev->phydev); phydev 1112 drivers/net/ethernet/smsc/smsc9420.c phydev = mdiobus_get_phy(pd->mii_bus, 1); phydev 1113 drivers/net/ethernet/smsc/smsc9420.c if (!phydev) { phydev 1118 drivers/net/ethernet/smsc/smsc9420.c phydev = phy_connect(dev, phydev_name(phydev), phydev 1121 drivers/net/ethernet/smsc/smsc9420.c if (IS_ERR(phydev)) { phydev 1123 drivers/net/ethernet/smsc/smsc9420.c return PTR_ERR(phydev); phydev 1126 drivers/net/ethernet/smsc/smsc9420.c phy_set_max_speed(phydev, SPEED_100); phydev 1129 drivers/net/ethernet/smsc/smsc9420.c phy_support_asym_pause(phydev); phydev 1131 drivers/net/ethernet/smsc/smsc9420.c phy_attached_info(phydev); phydev 1393 drivers/net/ethernet/smsc/smsc9420.c phy_start(dev->phydev); phydev 299 drivers/net/ethernet/socionext/netsec.c struct phy_device *phydev; phydev 441 drivers/net/ethernet/socionext/netsec.c struct phy_device *phydev = priv->ndev->phydev; phydev 444 drivers/net/ethernet/socionext/netsec.c value = phydev->duplex ? NETSEC_GMAC_MCR_REG_FULL_DUPLEX_COMMON : phydev 447 drivers/net/ethernet/socionext/netsec.c if (phydev->speed != SPEED_1000) phydev 451 drivers/net/ethernet/socionext/netsec.c phydev->speed == SPEED_100) phydev 1471 drivers/net/ethernet/socionext/netsec.c struct phy_device *phydev = priv->ndev->phydev; phydev 1475 drivers/net/ethernet/socionext/netsec.c if (phydev->speed != SPEED_1000) phydev 1558 drivers/net/ethernet/socionext/netsec.c if (ndev->phydev->link) phydev 1563 drivers/net/ethernet/socionext/netsec.c phy_print_status(ndev->phydev); phydev 1622 drivers/net/ethernet/socionext/netsec.c ret = phy_connect_direct(priv->ndev, priv->phydev, phydev 1632 drivers/net/ethernet/socionext/netsec.c phy_start(ndev->phydev); phydev 1669 drivers/net/ethernet/socionext/netsec.c phy_stop(ndev->phydev); phydev 1670 drivers/net/ethernet/socionext/netsec.c phy_disconnect(ndev->phydev); phydev 1736 drivers/net/ethernet/socionext/netsec.c return phy_mii_ioctl(ndev->phydev, ifr, cmd); phydev 1875 drivers/net/ethernet/socionext/netsec.c struct phy_device *phydev = priv->phydev; phydev 1877 drivers/net/ethernet/socionext/netsec.c if (!dev_of_node(priv->dev) && phydev) { phydev 1878 drivers/net/ethernet/socionext/netsec.c phy_device_remove(phydev); phydev 1879 drivers/net/ethernet/socionext/netsec.c phy_device_free(phydev); phydev 1931 drivers/net/ethernet/socionext/netsec.c priv->phydev = get_phy_device(bus, phy_addr, false); phydev 1932 drivers/net/ethernet/socionext/netsec.c if (IS_ERR(priv->phydev)) { phydev 1933 drivers/net/ethernet/socionext/netsec.c ret = PTR_ERR(priv->phydev); phydev 1935 drivers/net/ethernet/socionext/netsec.c priv->phydev = NULL; phydev 1939 drivers/net/ethernet/socionext/netsec.c ret = phy_device_register(priv->phydev); phydev 260 drivers/net/ethernet/socionext/sni_ave.c struct phy_device *phydev; phydev 423 drivers/net/ethernet/socionext/sni_ave.c if (ndev->phydev) phydev 424 drivers/net/ethernet/socionext/sni_ave.c phy_ethtool_get_wol(ndev->phydev, wol); phydev 430 drivers/net/ethernet/socionext/sni_ave.c if (!ndev->phydev || phydev 434 drivers/net/ethernet/socionext/sni_ave.c return phy_ethtool_set_wol(ndev->phydev, wol); phydev 463 drivers/net/ethernet/socionext/sni_ave.c struct phy_device *phydev = ndev->phydev; phydev 465 drivers/net/ethernet/socionext/sni_ave.c if (!phydev) phydev 472 drivers/net/ethernet/socionext/sni_ave.c phy_set_asym_pause(phydev, pause->rx_pause, pause->tx_pause); phydev 1090 drivers/net/ethernet/socionext/sni_ave.c struct phy_device *phydev = ndev->phydev; phydev 1099 drivers/net/ethernet/socionext/sni_ave.c if (phy_interface_is_rgmii(phydev) && phydev->speed == SPEED_1000) phydev 1101 drivers/net/ethernet/socionext/sni_ave.c else if (phydev->speed == SPEED_100) phydev 1107 drivers/net/ethernet/socionext/sni_ave.c if (!phy_interface_is_rgmii(phydev)) { phydev 1109 drivers/net/ethernet/socionext/sni_ave.c if (phydev->speed == SPEED_10) phydev 1121 drivers/net/ethernet/socionext/sni_ave.c if (phydev->duplex) { phydev 1124 drivers/net/ethernet/socionext/sni_ave.c if (phydev->pause) phydev 1126 drivers/net/ethernet/socionext/sni_ave.c if (phydev->asym_pause) phydev 1129 drivers/net/ethernet/socionext/sni_ave.c lcl_adv = linkmode_adv_to_lcl_adv_t(phydev->advertising); phydev 1153 drivers/net/ethernet/socionext/sni_ave.c phy_print_status(phydev); phydev 1171 drivers/net/ethernet/socionext/sni_ave.c struct phy_device *phydev; phydev 1211 drivers/net/ethernet/socionext/sni_ave.c phydev = of_phy_get_and_connect(ndev, np, ave_phy_adjust_link); phydev 1212 drivers/net/ethernet/socionext/sni_ave.c if (!phydev) { phydev 1218 drivers/net/ethernet/socionext/sni_ave.c priv->phydev = phydev; phydev 1227 drivers/net/ethernet/socionext/sni_ave.c if (!phy_interface_is_rgmii(phydev)) phydev 1228 drivers/net/ethernet/socionext/sni_ave.c phy_set_max_speed(phydev, SPEED_100); phydev 1230 drivers/net/ethernet/socionext/sni_ave.c phy_support_asym_pause(phydev); phydev 1232 drivers/net/ethernet/socionext/sni_ave.c phy_attached_info(phydev); phydev 1253 drivers/net/ethernet/socionext/sni_ave.c phy_disconnect(priv->phydev); phydev 1338 drivers/net/ethernet/socionext/sni_ave.c phy_start(ndev->phydev); phydev 1339 drivers/net/ethernet/socionext/sni_ave.c phy_start_aneg(ndev->phydev); phydev 1361 drivers/net/ethernet/socionext/sni_ave.c phy_stop(ndev->phydev); phydev 1457 drivers/net/ethernet/socionext/sni_ave.c return phy_mii_ioctl(ndev->phydev, ifr, cmd); phydev 1779 drivers/net/ethernet/socionext/sni_ave.c if (ndev->phydev) { phydev 1780 drivers/net/ethernet/socionext/sni_ave.c ret = phy_resume(ndev->phydev); phydev 69 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c struct phy_device *phy_dev = ndev->phydev; phydev 481 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c if (ndev->phydev) phydev 482 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c phy_resume(ndev->phydev); phydev 1025 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c struct phy_device *phydev; phydev 1027 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c phydev = mdiobus_get_phy(priv->mii, addr); phydev 1028 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c if (!phydev) { phydev 1033 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c ret = phylink_connect_phy(priv->phylink, phydev); phydev 371 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c struct phy_device *phydev = mdiobus_get_phy(new_bus, addr); phydev 373 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c if (!phydev) phydev 383 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c phydev->irq = mdio_bus_data->probed_phy_irq; phydev 394 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c phy_attached_info(phydev); phydev 378 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!priv->dev->phydev) phydev 381 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ret = phy_loopback(priv->dev->phydev, true); phydev 388 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c phy_loopback(priv->dev->phydev, false); phydev 734 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct phy_device *phydev = priv->dev->phydev; phydev 740 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!phydev || (!phydev->pause && !phydev->asym_pause)) phydev 1874 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (dev->phydev) phydev 1875 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ret = phy_loopback(dev->phydev, true); phydev 1907 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (dev->phydev) phydev 1908 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ret = phy_loopback(dev->phydev, false); phydev 823 drivers/net/ethernet/ti/cpmac.c if (!dev->phydev) phydev 826 drivers/net/ethernet/ti/cpmac.c return phy_mii_ioctl(dev->phydev, ifr, cmd); phydev 880 drivers/net/ethernet/ti/cpmac.c if (dev->phydev->link) { phydev 882 drivers/net/ethernet/ti/cpmac.c if (dev->phydev->duplex != priv->oldduplex) { phydev 884 drivers/net/ethernet/ti/cpmac.c priv->oldduplex = dev->phydev->duplex; phydev 887 drivers/net/ethernet/ti/cpmac.c if (dev->phydev->speed != priv->oldspeed) { phydev 889 drivers/net/ethernet/ti/cpmac.c priv->oldspeed = dev->phydev->speed; phydev 904 drivers/net/ethernet/ti/cpmac.c phy_print_status(dev->phydev); phydev 982 drivers/net/ethernet/ti/cpmac.c phy_start(dev->phydev); phydev 1020 drivers/net/ethernet/ti/cpmac.c phy_stop(dev->phydev); phydev 1072 drivers/net/ethernet/ti/cpmac.c struct phy_device *phydev = NULL; phydev 1130 drivers/net/ethernet/ti/cpmac.c phydev = phy_connect(dev, priv->phy_name, cpmac_adjust_link, phydev 1133 drivers/net/ethernet/ti/cpmac.c if (IS_ERR(phydev)) { phydev 1137 drivers/net/ethernet/ti/cpmac.c rc = PTR_ERR(phydev); phydev 511 drivers/net/ethernet/ti/davinci_emac.c if (ndev->phydev) phydev 512 drivers/net/ethernet/ti/davinci_emac.c new_duplex = ndev->phydev->duplex; phydev 1312 drivers/net/ethernet/ti/davinci_emac.c struct phy_device *phydev = ndev->phydev; phydev 1318 drivers/net/ethernet/ti/davinci_emac.c if (phydev->link) { phydev 1320 drivers/net/ethernet/ti/davinci_emac.c if (phydev->duplex != priv->duplex) { phydev 1322 drivers/net/ethernet/ti/davinci_emac.c priv->duplex = phydev->duplex; phydev 1324 drivers/net/ethernet/ti/davinci_emac.c if (phydev->speed != priv->speed) { phydev 1326 drivers/net/ethernet/ti/davinci_emac.c priv->speed = phydev->speed; phydev 1341 drivers/net/ethernet/ti/davinci_emac.c phy_print_status(ndev->phydev); phydev 1368 drivers/net/ethernet/ti/davinci_emac.c if (ndev->phydev) phydev 1369 drivers/net/ethernet/ti/davinci_emac.c return phy_mii_ioctl(ndev->phydev, ifrq, cmd); phydev 1402 drivers/net/ethernet/ti/davinci_emac.c struct phy_device *phydev = NULL; phydev 1470 drivers/net/ethernet/ti/davinci_emac.c phydev = of_phy_connect(ndev, priv->phy_node, phydev 1472 drivers/net/ethernet/ti/davinci_emac.c if (!phydev) { phydev 1481 drivers/net/ethernet/ti/davinci_emac.c if (!phydev && !priv->phy_id) { phydev 1497 drivers/net/ethernet/ti/davinci_emac.c if (!phydev && priv->phy_id && *priv->phy_id) { phydev 1498 drivers/net/ethernet/ti/davinci_emac.c phydev = phy_connect(ndev, priv->phy_id, phydev 1502 drivers/net/ethernet/ti/davinci_emac.c if (IS_ERR(phydev)) { phydev 1505 drivers/net/ethernet/ti/davinci_emac.c ret = PTR_ERR(phydev); phydev 1513 drivers/net/ethernet/ti/davinci_emac.c phy_attached_info(phydev); phydev 1516 drivers/net/ethernet/ti/davinci_emac.c if (!phydev) { phydev 1528 drivers/net/ethernet/ti/davinci_emac.c if (phydev) phydev 1529 drivers/net/ethernet/ti/davinci_emac.c phy_start(phydev); phydev 1580 drivers/net/ethernet/ti/davinci_emac.c if (ndev->phydev) phydev 1581 drivers/net/ethernet/ti/davinci_emac.c phy_disconnect(ndev->phydev); phydev 1937 drivers/net/ethernet/ti/netcp_ethss.c struct phy_device *phy = ndev->phydev; phydev 1960 drivers/net/ethernet/ti/netcp_ethss.c struct phy_device *phy = ndev->phydev; phydev 2557 drivers/net/ethernet/ti/netcp_ethss.c struct phy_device *phydev = p_info->skb->dev->phydev; phydev 2568 drivers/net/ethernet/ti/netcp_ethss.c if (phydev && HAS_PHY_TXTSTAMP(phydev)) { phydev 2584 drivers/net/ethernet/ti/netcp_ethss.c struct phy_device *phydev = p_info->skb->dev->phydev; phydev 2590 drivers/net/ethernet/ti/netcp_ethss.c if (phydev && HAS_PHY_RXTSTAMP(phydev)) { phydev 542 drivers/net/ethernet/toshiba/tc35815.c struct phy_device *phydev = dev->phydev; phydev 547 drivers/net/ethernet/toshiba/tc35815.c if (phydev->link && phydev 548 drivers/net/ethernet/toshiba/tc35815.c (lp->speed != phydev->speed || lp->duplex != phydev->duplex)) { phydev 556 drivers/net/ethernet/toshiba/tc35815.c if (phydev->duplex == DUPLEX_FULL) phydev 573 drivers/net/ethernet/toshiba/tc35815.c if (phydev->duplex == DUPLEX_HALF && phydev 578 drivers/net/ethernet/toshiba/tc35815.c lp->speed = phydev->speed; phydev 579 drivers/net/ethernet/toshiba/tc35815.c lp->duplex = phydev->duplex; phydev 583 drivers/net/ethernet/toshiba/tc35815.c if (phydev->link != lp->link) { phydev 584 drivers/net/ethernet/toshiba/tc35815.c if (phydev->link) { phydev 592 drivers/net/ethernet/toshiba/tc35815.c lp->link = phydev->link; phydev 599 drivers/net/ethernet/toshiba/tc35815.c phy_print_status(phydev); phydev 602 drivers/net/ethernet/toshiba/tc35815.c phy_read(phydev, MII_BMCR), phydev 603 drivers/net/ethernet/toshiba/tc35815.c phy_read(phydev, MII_BMSR), phydev 604 drivers/net/ethernet/toshiba/tc35815.c phy_read(phydev, MII_LPA)); phydev 612 drivers/net/ethernet/toshiba/tc35815.c struct phy_device *phydev; phydev 614 drivers/net/ethernet/toshiba/tc35815.c phydev = phy_find_first(lp->mii_bus); phydev 615 drivers/net/ethernet/toshiba/tc35815.c if (!phydev) { phydev 621 drivers/net/ethernet/toshiba/tc35815.c phydev = phy_connect(dev, phydev_name(phydev), phydev 624 drivers/net/ethernet/toshiba/tc35815.c if (IS_ERR(phydev)) { phydev 626 drivers/net/ethernet/toshiba/tc35815.c return PTR_ERR(phydev); phydev 629 drivers/net/ethernet/toshiba/tc35815.c phy_attached_info(phydev); phydev 632 drivers/net/ethernet/toshiba/tc35815.c phy_set_max_speed(phydev, SPEED_100); phydev 647 drivers/net/ethernet/toshiba/tc35815.c linkmode_andnot(phydev->supported, phydev->supported, mask); phydev 648 drivers/net/ethernet/toshiba/tc35815.c linkmode_copy(phydev->advertising, phydev->supported); phydev 859 drivers/net/ethernet/toshiba/tc35815.c phy_disconnect(dev->phydev); phydev 1149 drivers/net/ethernet/toshiba/tc35815.c if (dev->phydev) { phydev 1150 drivers/net/ethernet/toshiba/tc35815.c ret = phy_init_hw(dev->phydev); phydev 1242 drivers/net/ethernet/toshiba/tc35815.c phy_start(dev->phydev); phydev 1826 drivers/net/ethernet/toshiba/tc35815.c if (dev->phydev) phydev 1827 drivers/net/ethernet/toshiba/tc35815.c phy_stop(dev->phydev); phydev 2016 drivers/net/ethernet/toshiba/tc35815.c if (!dev->phydev) phydev 2018 drivers/net/ethernet/toshiba/tc35815.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 2103 drivers/net/ethernet/toshiba/tc35815.c if (!dev->phydev || !lp->link || lp->duplex == DUPLEX_FULL) phydev 2119 drivers/net/ethernet/toshiba/tc35815.c if (dev->phydev) phydev 2120 drivers/net/ethernet/toshiba/tc35815.c phy_stop(dev->phydev); phydev 2138 drivers/net/ethernet/toshiba/tc35815.c if (dev->phydev) phydev 2139 drivers/net/ethernet/toshiba/tc35815.c phy_start(dev->phydev); phydev 707 drivers/net/ethernet/xilinx/ll_temac_main.c struct phy_device *phy = ndev->phydev; phydev 1131 drivers/net/ethernet/xilinx/ll_temac_main.c struct phy_device *phydev = NULL; phydev 1137 drivers/net/ethernet/xilinx/ll_temac_main.c phydev = of_phy_connect(lp->ndev, lp->phy_node, phydev 1139 drivers/net/ethernet/xilinx/ll_temac_main.c if (!phydev) { phydev 1143 drivers/net/ethernet/xilinx/ll_temac_main.c phy_start(phydev); phydev 1145 drivers/net/ethernet/xilinx/ll_temac_main.c phydev = phy_connect(lp->ndev, lp->phy_name, temac_adjust_link, phydev 1147 drivers/net/ethernet/xilinx/ll_temac_main.c if (IS_ERR(phydev)) { phydev 1149 drivers/net/ethernet/xilinx/ll_temac_main.c return PTR_ERR(phydev); phydev 1151 drivers/net/ethernet/xilinx/ll_temac_main.c phy_start(phydev); phydev 1168 drivers/net/ethernet/xilinx/ll_temac_main.c if (phydev) phydev 1169 drivers/net/ethernet/xilinx/ll_temac_main.c phy_disconnect(phydev); phydev 1177 drivers/net/ethernet/xilinx/ll_temac_main.c struct phy_device *phydev = ndev->phydev; phydev 1186 drivers/net/ethernet/xilinx/ll_temac_main.c if (phydev) phydev 1187 drivers/net/ethernet/xilinx/ll_temac_main.c phy_disconnect(phydev); phydev 1216 drivers/net/ethernet/xilinx/ll_temac_main.c if (!ndev->phydev) phydev 1219 drivers/net/ethernet/xilinx/ll_temac_main.c return phy_mii_ioctl(ndev->phydev, rq, cmd); phydev 839 drivers/net/ethernet/xilinx/xilinx_emaclite.c struct phy_device *phydev; phydev 840 drivers/net/ethernet/xilinx/xilinx_emaclite.c phydev = of_phy_find_device(lp->phy_node); phydev 841 drivers/net/ethernet/xilinx/xilinx_emaclite.c if (!phydev) phydev 845 drivers/net/ethernet/xilinx/xilinx_emaclite.c put_device(&phydev->mdio.dev); phydev 1250 drivers/net/ethernet/xilinx/xilinx_emaclite.c if (!dev->phydev || !netif_running(dev)) phydev 1257 drivers/net/ethernet/xilinx/xilinx_emaclite.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 550 drivers/net/ethernet/xscale/ixp4xx_eth.c struct phy_device *phydev = dev->phydev; phydev 552 drivers/net/ethernet/xscale/ixp4xx_eth.c if (!phydev->link) { phydev 560 drivers/net/ethernet/xscale/ixp4xx_eth.c if (port->speed == phydev->speed && port->duplex == phydev->duplex) phydev 563 drivers/net/ethernet/xscale/ixp4xx_eth.c port->speed = phydev->speed; phydev 564 drivers/net/ethernet/xscale/ixp4xx_eth.c port->duplex = phydev->duplex; phydev 973 drivers/net/ethernet/xscale/ixp4xx_eth.c return phy_mii_ioctl(dev->phydev, req, cmd); phydev 1226 drivers/net/ethernet/xscale/ixp4xx_eth.c phy_start(dev->phydev); phydev 1347 drivers/net/ethernet/xscale/ixp4xx_eth.c phy_stop(dev->phydev); phydev 1371 drivers/net/ethernet/xscale/ixp4xx_eth.c struct phy_device *phydev = NULL; phydev 1462 drivers/net/ethernet/xscale/ixp4xx_eth.c phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, phydev 1464 drivers/net/ethernet/xscale/ixp4xx_eth.c if (IS_ERR(phydev)) { phydev 1465 drivers/net/ethernet/xscale/ixp4xx_eth.c err = PTR_ERR(phydev); phydev 1469 drivers/net/ethernet/xscale/ixp4xx_eth.c phydev->irq = PHY_POLL; phydev 1480 drivers/net/ethernet/xscale/ixp4xx_eth.c phy_disconnect(phydev); phydev 1492 drivers/net/ethernet/xscale/ixp4xx_eth.c struct phy_device *phydev = dev->phydev; phydev 1496 drivers/net/ethernet/xscale/ixp4xx_eth.c phy_disconnect(phydev); phydev 1040 drivers/net/macvlan.c struct phy_device *phydev = real_dev->phydev; phydev 1042 drivers/net/macvlan.c if (phydev && phydev->drv && phydev->drv->ts_info) { phydev 1043 drivers/net/macvlan.c return phydev->drv->ts_info(phydev, info); phydev 195 drivers/net/phy/adin.c static u32 adin_get_reg_value(struct phy_device *phydev, phydev 200 drivers/net/phy/adin.c struct device *dev = &phydev->mdio.dev; phydev 209 drivers/net/phy/adin.c phydev_warn(phydev, phydev 218 drivers/net/phy/adin.c static int adin_config_rgmii_mode(struct phy_device *phydev) phydev 223 drivers/net/phy/adin.c if (!phy_interface_is_rgmii(phydev)) phydev 224 drivers/net/phy/adin.c return phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, phydev 228 drivers/net/phy/adin.c reg = phy_read_mmd(phydev, MDIO_MMD_VEND1, ADIN1300_GE_RGMII_CFG_REG); phydev 234 drivers/net/phy/adin.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 235 drivers/net/phy/adin.c phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { phydev 238 drivers/net/phy/adin.c val = adin_get_reg_value(phydev, "adi,rx-internal-delay-ps", phydev 247 drivers/net/phy/adin.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 248 drivers/net/phy/adin.c phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { phydev 251 drivers/net/phy/adin.c val = adin_get_reg_value(phydev, "adi,tx-internal-delay-ps", phydev 260 drivers/net/phy/adin.c return phy_write_mmd(phydev, MDIO_MMD_VEND1, phydev 264 drivers/net/phy/adin.c static int adin_config_rmii_mode(struct phy_device *phydev) phydev 269 drivers/net/phy/adin.c if (phydev->interface != PHY_INTERFACE_MODE_RMII) phydev 270 drivers/net/phy/adin.c return phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, phydev 274 drivers/net/phy/adin.c reg = phy_read_mmd(phydev, MDIO_MMD_VEND1, ADIN1300_GE_RMII_CFG_REG); phydev 280 drivers/net/phy/adin.c val = adin_get_reg_value(phydev, "adi,fifo-depth-bits", phydev 287 drivers/net/phy/adin.c return phy_write_mmd(phydev, MDIO_MMD_VEND1, phydev 291 drivers/net/phy/adin.c static int adin_get_downshift(struct phy_device *phydev, u8 *data) phydev 295 drivers/net/phy/adin.c val = phy_read(phydev, ADIN1300_PHY_CTRL2); phydev 299 drivers/net/phy/adin.c cnt = phy_read(phydev, ADIN1300_PHY_CTRL3); phydev 311 drivers/net/phy/adin.c static int adin_set_downshift(struct phy_device *phydev, u8 cnt) phydev 317 drivers/net/phy/adin.c return phy_clear_bits(phydev, ADIN1300_PHY_CTRL2, phydev 326 drivers/net/phy/adin.c rc = phy_modify(phydev, ADIN1300_PHY_CTRL3, phydev 332 drivers/net/phy/adin.c return phy_set_bits(phydev, ADIN1300_PHY_CTRL2, phydev 336 drivers/net/phy/adin.c static int adin_get_edpd(struct phy_device *phydev, u16 *tx_interval) phydev 340 drivers/net/phy/adin.c val = phy_read(phydev, ADIN1300_PHY_CTRL_STATUS2); phydev 357 drivers/net/phy/adin.c static int adin_set_edpd(struct phy_device *phydev, u16 tx_interval) phydev 362 drivers/net/phy/adin.c return phy_clear_bits(phydev, ADIN1300_PHY_CTRL_STATUS2, phydev 379 drivers/net/phy/adin.c return phy_modify(phydev, ADIN1300_PHY_CTRL_STATUS2, phydev 384 drivers/net/phy/adin.c static int adin_get_tunable(struct phy_device *phydev, phydev 389 drivers/net/phy/adin.c return adin_get_downshift(phydev, data); phydev 391 drivers/net/phy/adin.c return adin_get_edpd(phydev, data); phydev 397 drivers/net/phy/adin.c static int adin_set_tunable(struct phy_device *phydev, phydev 402 drivers/net/phy/adin.c return adin_set_downshift(phydev, *(const u8 *)data); phydev 404 drivers/net/phy/adin.c return adin_set_edpd(phydev, *(const u16 *)data); phydev 410 drivers/net/phy/adin.c static int adin_config_init(struct phy_device *phydev) phydev 414 drivers/net/phy/adin.c phydev->mdix_ctrl = ETH_TP_MDI_AUTO; phydev 416 drivers/net/phy/adin.c rc = adin_config_rgmii_mode(phydev); phydev 420 drivers/net/phy/adin.c rc = adin_config_rmii_mode(phydev); phydev 424 drivers/net/phy/adin.c rc = adin_set_downshift(phydev, 4); phydev 428 drivers/net/phy/adin.c rc = adin_set_edpd(phydev, ETHTOOL_PHY_EDPD_DFLT_TX_MSECS); phydev 432 drivers/net/phy/adin.c phydev_dbg(phydev, "PHY is using mode '%s'\n", phydev 433 drivers/net/phy/adin.c phy_modes(phydev->interface)); phydev 438 drivers/net/phy/adin.c static int adin_phy_ack_intr(struct phy_device *phydev) phydev 441 drivers/net/phy/adin.c int rc = phy_read(phydev, ADIN1300_INT_STATUS_REG); phydev 446 drivers/net/phy/adin.c static int adin_phy_config_intr(struct phy_device *phydev) phydev 448 drivers/net/phy/adin.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 449 drivers/net/phy/adin.c return phy_set_bits(phydev, ADIN1300_INT_MASK_REG, phydev 452 drivers/net/phy/adin.c return phy_clear_bits(phydev, ADIN1300_INT_MASK_REG, phydev 456 drivers/net/phy/adin.c static int adin_cl45_to_adin_reg(struct phy_device *phydev, int devad, phydev 471 drivers/net/phy/adin.c phydev_err(phydev, phydev 478 drivers/net/phy/adin.c static int adin_read_mmd(struct phy_device *phydev, int devad, u16 regnum) phydev 480 drivers/net/phy/adin.c struct mii_bus *bus = phydev->mdio.bus; phydev 481 drivers/net/phy/adin.c int phy_addr = phydev->mdio.addr; phydev 485 drivers/net/phy/adin.c adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); phydev 497 drivers/net/phy/adin.c static int adin_write_mmd(struct phy_device *phydev, int devad, u16 regnum, phydev 500 drivers/net/phy/adin.c struct mii_bus *bus = phydev->mdio.bus; phydev 501 drivers/net/phy/adin.c int phy_addr = phydev->mdio.addr; phydev 505 drivers/net/phy/adin.c adin_regnum = adin_cl45_to_adin_reg(phydev, devad, regnum); phydev 517 drivers/net/phy/adin.c static int adin_config_mdix(struct phy_device *phydev) phydev 524 drivers/net/phy/adin.c switch (phydev->mdix_ctrl) { phydev 537 drivers/net/phy/adin.c reg = phy_read(phydev, ADIN1300_PHY_CTRL1); phydev 551 drivers/net/phy/adin.c return phy_write(phydev, ADIN1300_PHY_CTRL1, reg); phydev 554 drivers/net/phy/adin.c static int adin_config_aneg(struct phy_device *phydev) phydev 558 drivers/net/phy/adin.c ret = adin_config_mdix(phydev); phydev 562 drivers/net/phy/adin.c return genphy_config_aneg(phydev); phydev 565 drivers/net/phy/adin.c static int adin_mdix_update(struct phy_device *phydev) phydev 571 drivers/net/phy/adin.c reg = phy_read(phydev, ADIN1300_PHY_CTRL1); phydev 581 drivers/net/phy/adin.c phydev->mdix = ETH_TP_MDI_X; phydev 583 drivers/net/phy/adin.c phydev->mdix = ETH_TP_MDI; phydev 592 drivers/net/phy/adin.c reg = phy_read(phydev, ADIN1300_PHY_STATUS1); phydev 599 drivers/net/phy/adin.c phydev->mdix = ETH_TP_MDI_X; phydev 601 drivers/net/phy/adin.c phydev->mdix = ETH_TP_MDI; phydev 606 drivers/net/phy/adin.c static int adin_read_status(struct phy_device *phydev) phydev 610 drivers/net/phy/adin.c ret = adin_mdix_update(phydev); phydev 614 drivers/net/phy/adin.c return genphy_read_status(phydev); phydev 617 drivers/net/phy/adin.c static int adin_soft_reset(struct phy_device *phydev) phydev 622 drivers/net/phy/adin.c rc = phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, phydev 631 drivers/net/phy/adin.c rc = phy_read_mmd(phydev, MDIO_MMD_VEND1, phydev 637 drivers/net/phy/adin.c static int adin_get_sset_count(struct phy_device *phydev) phydev 642 drivers/net/phy/adin.c static void adin_get_strings(struct phy_device *phydev, u8 *data) phydev 652 drivers/net/phy/adin.c static int adin_read_mmd_stat_regs(struct phy_device *phydev, phydev 658 drivers/net/phy/adin.c ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, stat->reg1); phydev 667 drivers/net/phy/adin.c ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, stat->reg2); phydev 677 drivers/net/phy/adin.c static u64 adin_get_stat(struct phy_device *phydev, int i) phydev 680 drivers/net/phy/adin.c struct adin_priv *priv = phydev->priv; phydev 685 drivers/net/phy/adin.c ret = adin_read_mmd_stat_regs(phydev, stat, &val); phydev 689 drivers/net/phy/adin.c ret = phy_read(phydev, stat->reg1); phydev 700 drivers/net/phy/adin.c static void adin_get_stats(struct phy_device *phydev, phydev 706 drivers/net/phy/adin.c rc = phy_read(phydev, ADIN1300_RX_ERR_CNT); phydev 711 drivers/net/phy/adin.c data[i] = adin_get_stat(phydev, i); phydev 714 drivers/net/phy/adin.c static int adin_probe(struct phy_device *phydev) phydev 716 drivers/net/phy/adin.c struct device *dev = &phydev->mdio.dev; phydev 723 drivers/net/phy/adin.c phydev->priv = priv; phydev 27 drivers/net/phy/amd.c static int am79c_ack_interrupt(struct phy_device *phydev) phydev 31 drivers/net/phy/amd.c err = phy_read(phydev, MII_BMSR); phydev 35 drivers/net/phy/amd.c err = phy_read(phydev, MII_AM79C_IR); phydev 42 drivers/net/phy/amd.c static int am79c_config_init(struct phy_device *phydev) phydev 47 drivers/net/phy/amd.c static int am79c_config_intr(struct phy_device *phydev) phydev 51 drivers/net/phy/amd.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 52 drivers/net/phy/amd.c err = phy_write(phydev, MII_AM79C_IR, MII_AM79C_IR_IMASK_INIT); phydev 54 drivers/net/phy/amd.c err = phy_write(phydev, MII_AM79C_IR, 0); phydev 13 drivers/net/phy/aquantia.h int aqr_hwmon_probe(struct phy_device *phydev); phydev 15 drivers/net/phy/aquantia.h static inline int aqr_hwmon_probe(struct phy_device *phydev) { return 0; } phydev 56 drivers/net/phy/aquantia_hwmon.c static int aqr_hwmon_get(struct phy_device *phydev, int reg, long *value) phydev 58 drivers/net/phy/aquantia_hwmon.c int temp = phy_read_mmd(phydev, MDIO_MMD_VEND1, reg); phydev 69 drivers/net/phy/aquantia_hwmon.c static int aqr_hwmon_set(struct phy_device *phydev, int reg, long value) phydev 79 drivers/net/phy/aquantia_hwmon.c return phy_write_mmd(phydev, MDIO_MMD_VEND1, reg, (u16)temp); phydev 82 drivers/net/phy/aquantia_hwmon.c static int aqr_hwmon_test_bit(struct phy_device *phydev, int reg, int bit) phydev 84 drivers/net/phy/aquantia_hwmon.c int val = phy_read_mmd(phydev, MDIO_MMD_VEND1, reg); phydev 92 drivers/net/phy/aquantia_hwmon.c static int aqr_hwmon_status1(struct phy_device *phydev, int bit, long *value) phydev 94 drivers/net/phy/aquantia_hwmon.c int val = aqr_hwmon_test_bit(phydev, VEND1_GENERAL_STAT1, bit); phydev 107 drivers/net/phy/aquantia_hwmon.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 115 drivers/net/phy/aquantia_hwmon.c reg = aqr_hwmon_test_bit(phydev, VEND1_THERMAL_STAT2, phydev 122 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_get(phydev, VEND1_THERMAL_STAT1, value); phydev 125 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_LOW_TEMP_FAIL, phydev 128 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_LOW_TEMP_WARN, phydev 131 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_WARN, phydev 134 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_get(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_FAIL, phydev 137 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_status1(phydev, phydev 141 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_status1(phydev, phydev 145 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_status1(phydev, phydev 149 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_status1(phydev, phydev 160 drivers/net/phy/aquantia_hwmon.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 167 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_LOW_TEMP_FAIL, phydev 170 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_LOW_TEMP_WARN, phydev 173 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_WARN, phydev 176 drivers/net/phy/aquantia_hwmon.c return aqr_hwmon_set(phydev, VEND1_THERMAL_PROV_HIGH_TEMP_FAIL, phydev 224 drivers/net/phy/aquantia_hwmon.c int aqr_hwmon_probe(struct phy_device *phydev) phydev 226 drivers/net/phy/aquantia_hwmon.c struct device *dev = &phydev->mdio.dev; phydev 245 drivers/net/phy/aquantia_hwmon.c phydev, &aqr_hwmon_chip_info, NULL); phydev 149 drivers/net/phy/aquantia_main.c static int aqr107_get_sset_count(struct phy_device *phydev) phydev 154 drivers/net/phy/aquantia_main.c static void aqr107_get_strings(struct phy_device *phydev, u8 *data) phydev 163 drivers/net/phy/aquantia_main.c static u64 aqr107_get_stat(struct phy_device *phydev, int index) phydev 171 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_C22EXT, stat->reg); phydev 177 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_C22EXT, stat->reg + 1); phydev 187 drivers/net/phy/aquantia_main.c static void aqr107_get_stats(struct phy_device *phydev, phydev 190 drivers/net/phy/aquantia_main.c struct aqr107_priv *priv = phydev->priv; phydev 195 drivers/net/phy/aquantia_main.c val = aqr107_get_stat(phydev, i); phydev 197 drivers/net/phy/aquantia_main.c phydev_err(phydev, "Reading HW Statistics failed for %s\n", phydev 206 drivers/net/phy/aquantia_main.c static int aqr_config_aneg(struct phy_device *phydev) phydev 212 drivers/net/phy/aquantia_main.c if (phydev->autoneg == AUTONEG_DISABLE) phydev 213 drivers/net/phy/aquantia_main.c return genphy_c45_pma_setup_forced(phydev); phydev 215 drivers/net/phy/aquantia_main.c ret = genphy_c45_an_config_aneg(phydev); phydev 226 drivers/net/phy/aquantia_main.c phydev->advertising)) phydev 230 drivers/net/phy/aquantia_main.c phydev->advertising)) phydev 233 drivers/net/phy/aquantia_main.c ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_VEND_PROV, phydev 241 drivers/net/phy/aquantia_main.c return genphy_c45_check_and_restart_aneg(phydev, changed); phydev 244 drivers/net/phy/aquantia_main.c static int aqr_config_intr(struct phy_device *phydev) phydev 246 drivers/net/phy/aquantia_main.c bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED; phydev 249 drivers/net/phy/aquantia_main.c err = phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_INT_MASK2, phydev 254 drivers/net/phy/aquantia_main.c err = phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_INT_STD_MASK, phydev 259 drivers/net/phy/aquantia_main.c return phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_INT_VEND_MASK, phydev 264 drivers/net/phy/aquantia_main.c static int aqr_ack_interrupt(struct phy_device *phydev) phydev 268 drivers/net/phy/aquantia_main.c reg = phy_read_mmd(phydev, MDIO_MMD_AN, phydev 273 drivers/net/phy/aquantia_main.c static int aqr_read_status(struct phy_device *phydev) phydev 277 drivers/net/phy/aquantia_main.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 278 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_RX_LP_STAT1); phydev 283 drivers/net/phy/aquantia_main.c phydev->lp_advertising, phydev 286 drivers/net/phy/aquantia_main.c phydev->lp_advertising, phydev 290 drivers/net/phy/aquantia_main.c return genphy_c45_read_status(phydev); phydev 293 drivers/net/phy/aquantia_main.c static int aqr107_read_downshift_event(struct phy_device *phydev) phydev 297 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_INT_STATUS1); phydev 304 drivers/net/phy/aquantia_main.c static int aqr107_read_rate(struct phy_device *phydev) phydev 308 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_STATUS1); phydev 314 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_10; phydev 317 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_100; phydev 320 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_1000; phydev 323 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_2500; phydev 326 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_5000; phydev 329 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_10000; phydev 332 drivers/net/phy/aquantia_main.c phydev->speed = SPEED_UNKNOWN; phydev 337 drivers/net/phy/aquantia_main.c phydev->duplex = DUPLEX_FULL; phydev 339 drivers/net/phy/aquantia_main.c phydev->duplex = DUPLEX_HALF; phydev 344 drivers/net/phy/aquantia_main.c static int aqr107_read_status(struct phy_device *phydev) phydev 348 drivers/net/phy/aquantia_main.c ret = aqr_read_status(phydev); phydev 352 drivers/net/phy/aquantia_main.c if (!phydev->link || phydev->autoneg == AUTONEG_DISABLE) phydev 355 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_PHYXS, MDIO_PHYXS_VEND_IF_STATUS); phydev 362 drivers/net/phy/aquantia_main.c phydev->interface = PHY_INTERFACE_MODE_10GKR; phydev 365 drivers/net/phy/aquantia_main.c phydev->interface = PHY_INTERFACE_MODE_USXGMII; phydev 368 drivers/net/phy/aquantia_main.c phydev->interface = PHY_INTERFACE_MODE_SGMII; phydev 371 drivers/net/phy/aquantia_main.c phydev->interface = PHY_INTERFACE_MODE_2500BASEX; phydev 374 drivers/net/phy/aquantia_main.c phydev->interface = PHY_INTERFACE_MODE_NA; phydev 378 drivers/net/phy/aquantia_main.c val = aqr107_read_downshift_event(phydev); phydev 382 drivers/net/phy/aquantia_main.c phydev_warn(phydev, "Downshift occurred! Cabling may be defective.\n"); phydev 385 drivers/net/phy/aquantia_main.c return aqr107_read_rate(phydev); phydev 388 drivers/net/phy/aquantia_main.c static int aqr107_get_downshift(struct phy_device *phydev, u8 *data) phydev 392 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_VEND_PROV); phydev 404 drivers/net/phy/aquantia_main.c static int aqr107_set_downshift(struct phy_device *phydev, u8 cnt) phydev 416 drivers/net/phy/aquantia_main.c return phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_VEND_PROV, phydev 421 drivers/net/phy/aquantia_main.c static int aqr107_get_tunable(struct phy_device *phydev, phydev 426 drivers/net/phy/aquantia_main.c return aqr107_get_downshift(phydev, data); phydev 432 drivers/net/phy/aquantia_main.c static int aqr107_set_tunable(struct phy_device *phydev, phydev 437 drivers/net/phy/aquantia_main.c return aqr107_set_downshift(phydev, *(const u8 *)data); phydev 450 drivers/net/phy/aquantia_main.c static int aqr107_wait_reset_complete(struct phy_device *phydev) phydev 455 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_FW_ID); phydev 464 drivers/net/phy/aquantia_main.c static void aqr107_chip_info(struct phy_device *phydev) phydev 469 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_FW_ID); phydev 476 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_RSVD_STAT1); phydev 483 drivers/net/phy/aquantia_main.c phydev_dbg(phydev, "FW %u.%u, Build %u, Provisioning %u\n", phydev 487 drivers/net/phy/aquantia_main.c static int aqr107_config_init(struct phy_device *phydev) phydev 492 drivers/net/phy/aquantia_main.c if (phydev->interface != PHY_INTERFACE_MODE_SGMII && phydev 493 drivers/net/phy/aquantia_main.c phydev->interface != PHY_INTERFACE_MODE_2500BASEX && phydev 494 drivers/net/phy/aquantia_main.c phydev->interface != PHY_INTERFACE_MODE_XGMII && phydev 495 drivers/net/phy/aquantia_main.c phydev->interface != PHY_INTERFACE_MODE_USXGMII && phydev 496 drivers/net/phy/aquantia_main.c phydev->interface != PHY_INTERFACE_MODE_10GKR) phydev 499 drivers/net/phy/aquantia_main.c WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII, phydev 502 drivers/net/phy/aquantia_main.c ret = aqr107_wait_reset_complete(phydev); phydev 504 drivers/net/phy/aquantia_main.c aqr107_chip_info(phydev); phydev 507 drivers/net/phy/aquantia_main.c aqr107_read_downshift_event(phydev); phydev 509 drivers/net/phy/aquantia_main.c return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); phydev 512 drivers/net/phy/aquantia_main.c static int aqcs109_config_init(struct phy_device *phydev) phydev 517 drivers/net/phy/aquantia_main.c if (phydev->interface != PHY_INTERFACE_MODE_SGMII && phydev 518 drivers/net/phy/aquantia_main.c phydev->interface != PHY_INTERFACE_MODE_2500BASEX) phydev 521 drivers/net/phy/aquantia_main.c ret = aqr107_wait_reset_complete(phydev); phydev 523 drivers/net/phy/aquantia_main.c aqr107_chip_info(phydev); phydev 529 drivers/net/phy/aquantia_main.c ret = phy_set_max_speed(phydev, SPEED_2500); phydev 534 drivers/net/phy/aquantia_main.c aqr107_read_downshift_event(phydev); phydev 536 drivers/net/phy/aquantia_main.c return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); phydev 539 drivers/net/phy/aquantia_main.c static void aqr107_link_change_notify(struct phy_device *phydev) phydev 545 drivers/net/phy/aquantia_main.c if (phydev->state != PHY_RUNNING || phydev->autoneg == AUTONEG_DISABLE) phydev 548 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_RX_LP_STAT1); phydev 556 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_RX_LP_STAT4); phydev 563 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_RX_VEND_STAT3); phydev 569 drivers/net/phy/aquantia_main.c phydev_dbg(phydev, "Link partner is Aquantia PHY, FW %u.%u%s%s%s\n", phydev 575 drivers/net/phy/aquantia_main.c val = phy_read_mmd(phydev, MDIO_MMD_VEND1, VEND1_GLOBAL_RSVD_STAT9); phydev 581 drivers/net/phy/aquantia_main.c phydev_info(phydev, "Aquantia 1000Base-T2 mode active\n"); phydev 584 drivers/net/phy/aquantia_main.c static int aqr107_suspend(struct phy_device *phydev) phydev 586 drivers/net/phy/aquantia_main.c return phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1, phydev 590 drivers/net/phy/aquantia_main.c static int aqr107_resume(struct phy_device *phydev) phydev 592 drivers/net/phy/aquantia_main.c return phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1, phydev 596 drivers/net/phy/aquantia_main.c static int aqr107_probe(struct phy_device *phydev) phydev 598 drivers/net/phy/aquantia_main.c phydev->priv = devm_kzalloc(&phydev->mdio.dev, phydev 600 drivers/net/phy/aquantia_main.c if (!phydev->priv) phydev 603 drivers/net/phy/aquantia_main.c return aqr_hwmon_probe(phydev); phydev 87 drivers/net/phy/at803x.c static int at803x_debug_reg_read(struct phy_device *phydev, u16 reg) phydev 91 drivers/net/phy/at803x.c ret = phy_write(phydev, AT803X_DEBUG_ADDR, reg); phydev 95 drivers/net/phy/at803x.c return phy_read(phydev, AT803X_DEBUG_DATA); phydev 98 drivers/net/phy/at803x.c static int at803x_debug_reg_mask(struct phy_device *phydev, u16 reg, phydev 104 drivers/net/phy/at803x.c ret = at803x_debug_reg_read(phydev, reg); phydev 112 drivers/net/phy/at803x.c return phy_write(phydev, AT803X_DEBUG_DATA, val); phydev 115 drivers/net/phy/at803x.c static int at803x_enable_rx_delay(struct phy_device *phydev) phydev 117 drivers/net/phy/at803x.c return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0, phydev 121 drivers/net/phy/at803x.c static int at803x_enable_tx_delay(struct phy_device *phydev) phydev 123 drivers/net/phy/at803x.c return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, 0, phydev 127 drivers/net/phy/at803x.c static int at803x_disable_rx_delay(struct phy_device *phydev) phydev 129 drivers/net/phy/at803x.c return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, phydev 133 drivers/net/phy/at803x.c static int at803x_disable_tx_delay(struct phy_device *phydev) phydev 135 drivers/net/phy/at803x.c return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, phydev 140 drivers/net/phy/at803x.c static void at803x_context_save(struct phy_device *phydev, phydev 143 drivers/net/phy/at803x.c context->bmcr = phy_read(phydev, MII_BMCR); phydev 144 drivers/net/phy/at803x.c context->advertise = phy_read(phydev, MII_ADVERTISE); phydev 145 drivers/net/phy/at803x.c context->control1000 = phy_read(phydev, MII_CTRL1000); phydev 146 drivers/net/phy/at803x.c context->int_enable = phy_read(phydev, AT803X_INTR_ENABLE); phydev 147 drivers/net/phy/at803x.c context->smart_speed = phy_read(phydev, AT803X_SMART_SPEED); phydev 148 drivers/net/phy/at803x.c context->led_control = phy_read(phydev, AT803X_LED_CONTROL); phydev 152 drivers/net/phy/at803x.c static void at803x_context_restore(struct phy_device *phydev, phydev 155 drivers/net/phy/at803x.c phy_write(phydev, MII_BMCR, context->bmcr); phydev 156 drivers/net/phy/at803x.c phy_write(phydev, MII_ADVERTISE, context->advertise); phydev 157 drivers/net/phy/at803x.c phy_write(phydev, MII_CTRL1000, context->control1000); phydev 158 drivers/net/phy/at803x.c phy_write(phydev, AT803X_INTR_ENABLE, context->int_enable); phydev 159 drivers/net/phy/at803x.c phy_write(phydev, AT803X_SMART_SPEED, context->smart_speed); phydev 160 drivers/net/phy/at803x.c phy_write(phydev, AT803X_LED_CONTROL, context->led_control); phydev 163 drivers/net/phy/at803x.c static int at803x_set_wol(struct phy_device *phydev, phydev 166 drivers/net/phy/at803x.c struct net_device *ndev = phydev->attached_dev; phydev 186 drivers/net/phy/at803x.c phy_write_mmd(phydev, AT803X_DEVICE_ADDR, offsets[i], phydev 189 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_ENABLE); phydev 191 drivers/net/phy/at803x.c ret = phy_write(phydev, AT803X_INTR_ENABLE, value); phydev 194 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_STATUS); phydev 196 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_ENABLE); phydev 198 drivers/net/phy/at803x.c ret = phy_write(phydev, AT803X_INTR_ENABLE, value); phydev 201 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_STATUS); phydev 207 drivers/net/phy/at803x.c static void at803x_get_wol(struct phy_device *phydev, phydev 215 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_ENABLE); phydev 220 drivers/net/phy/at803x.c static int at803x_suspend(struct phy_device *phydev) phydev 225 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_ENABLE); phydev 233 drivers/net/phy/at803x.c phy_modify(phydev, MII_BMCR, 0, value); phydev 238 drivers/net/phy/at803x.c static int at803x_resume(struct phy_device *phydev) phydev 240 drivers/net/phy/at803x.c return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0); phydev 243 drivers/net/phy/at803x.c static int at803x_probe(struct phy_device *phydev) phydev 245 drivers/net/phy/at803x.c struct device *dev = &phydev->mdio.dev; phydev 252 drivers/net/phy/at803x.c phydev->priv = priv; phydev 257 drivers/net/phy/at803x.c static int at803x_config_init(struct phy_device *phydev) phydev 266 drivers/net/phy/at803x.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 267 drivers/net/phy/at803x.c phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) phydev 268 drivers/net/phy/at803x.c ret = at803x_enable_rx_delay(phydev); phydev 270 drivers/net/phy/at803x.c ret = at803x_disable_rx_delay(phydev); phydev 274 drivers/net/phy/at803x.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 275 drivers/net/phy/at803x.c phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) phydev 276 drivers/net/phy/at803x.c ret = at803x_enable_tx_delay(phydev); phydev 278 drivers/net/phy/at803x.c ret = at803x_disable_tx_delay(phydev); phydev 283 drivers/net/phy/at803x.c static int at803x_ack_interrupt(struct phy_device *phydev) phydev 287 drivers/net/phy/at803x.c err = phy_read(phydev, AT803X_INTR_STATUS); phydev 292 drivers/net/phy/at803x.c static int at803x_config_intr(struct phy_device *phydev) phydev 297 drivers/net/phy/at803x.c value = phy_read(phydev, AT803X_INTR_ENABLE); phydev 299 drivers/net/phy/at803x.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 306 drivers/net/phy/at803x.c err = phy_write(phydev, AT803X_INTR_ENABLE, value); phydev 309 drivers/net/phy/at803x.c err = phy_write(phydev, AT803X_INTR_ENABLE, 0); phydev 314 drivers/net/phy/at803x.c static void at803x_link_change_notify(struct phy_device *phydev) phydev 323 drivers/net/phy/at803x.c if (phydev->state == PHY_NOLINK && phydev->mdio.reset_gpio) { phydev 326 drivers/net/phy/at803x.c at803x_context_save(phydev, &context); phydev 328 drivers/net/phy/at803x.c phy_device_reset(phydev, 1); phydev 330 drivers/net/phy/at803x.c phy_device_reset(phydev, 0); phydev 333 drivers/net/phy/at803x.c at803x_context_restore(phydev, &context); phydev 335 drivers/net/phy/at803x.c phydev_dbg(phydev, "%s(): phy was reset\n", __func__); phydev 339 drivers/net/phy/at803x.c static int at803x_aneg_done(struct phy_device *phydev) phydev 343 drivers/net/phy/at803x.c int aneg_done = genphy_aneg_done(phydev); phydev 351 drivers/net/phy/at803x.c ccr = phy_read(phydev, AT803X_REG_CHIP_CONFIG); phydev 356 drivers/net/phy/at803x.c phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr & ~AT803X_BT_BX_REG_SEL); phydev 359 drivers/net/phy/at803x.c if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) { phydev 360 drivers/net/phy/at803x.c phydev_warn(phydev, "803x_aneg_done: SGMII link is not ok\n"); phydev 364 drivers/net/phy/at803x.c phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr | AT803X_BT_BX_REG_SEL); phydev 369 drivers/net/phy/at803x.c static int at803x_read_status(struct phy_device *phydev) phydev 371 drivers/net/phy/at803x.c int ss, err, old_link = phydev->link; phydev 374 drivers/net/phy/at803x.c err = genphy_update_link(phydev); phydev 379 drivers/net/phy/at803x.c if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link) phydev 382 drivers/net/phy/at803x.c phydev->speed = SPEED_UNKNOWN; phydev 383 drivers/net/phy/at803x.c phydev->duplex = DUPLEX_UNKNOWN; phydev 384 drivers/net/phy/at803x.c phydev->pause = 0; phydev 385 drivers/net/phy/at803x.c phydev->asym_pause = 0; phydev 387 drivers/net/phy/at803x.c err = genphy_read_lpa(phydev); phydev 395 drivers/net/phy/at803x.c ss = phy_read(phydev, AT803X_SPECIFIC_STATUS); phydev 402 drivers/net/phy/at803x.c phydev->speed = SPEED_10; phydev 405 drivers/net/phy/at803x.c phydev->speed = SPEED_100; phydev 408 drivers/net/phy/at803x.c phydev->speed = SPEED_1000; phydev 412 drivers/net/phy/at803x.c phydev->duplex = DUPLEX_FULL; phydev 414 drivers/net/phy/at803x.c phydev->duplex = DUPLEX_HALF; phydev 416 drivers/net/phy/at803x.c phydev->mdix = ETH_TP_MDI_X; phydev 418 drivers/net/phy/at803x.c phydev->mdix = ETH_TP_MDI; phydev 421 drivers/net/phy/at803x.c if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete) phydev 422 drivers/net/phy/at803x.c phy_resolve_aneg_pause(phydev); phydev 30 drivers/net/phy/ax88796b.c static int asix_soft_reset(struct phy_device *phydev) phydev 35 drivers/net/phy/ax88796b.c ret = phy_write(phydev, MII_BMCR, 0); phydev 39 drivers/net/phy/ax88796b.c return genphy_soft_reset(phydev); phydev 20 drivers/net/phy/bcm-cygnus.c static int bcm_cygnus_afe_config(struct phy_device *phydev) phydev 25 drivers/net/phy/bcm-cygnus.c rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, 0x0c30); phydev 30 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_misc(phydev, 0x39, 0x01, 0xA7C8); phydev 35 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_misc(phydev, 0x3A, 0x00, 0x0803); phydev 40 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_misc(phydev, 0x3A, 0x01, 0xA740); phydev 45 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_misc(phydev, 0x3A, 0x03, 0x8400); phydev 50 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_misc(phydev, 0x3B, 0x00, 0x0004); phydev 55 drivers/net/phy/bcm-cygnus.c rc = phy_write(phydev, MII_BRCM_CORE_BASE1E, 0x02); phydev 60 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_exp_sel(phydev, MII_BRCM_CORE_EXPB1, 0x10); phydev 65 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_exp_sel(phydev, MII_BRCM_CORE_EXPB0, 0x10); phydev 70 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_write_exp_sel(phydev, MII_BRCM_CORE_EXPB0, 0x00); phydev 75 drivers/net/phy/bcm-cygnus.c static int bcm_cygnus_config_init(struct phy_device *phydev) phydev 79 drivers/net/phy/bcm-cygnus.c reg = phy_read(phydev, MII_BCM54XX_ECR); phydev 85 drivers/net/phy/bcm-cygnus.c rc = phy_write(phydev, MII_BCM54XX_ECR, reg); phydev 93 drivers/net/phy/bcm-cygnus.c rc = phy_write(phydev, MII_BCM54XX_IMR, reg); phydev 98 drivers/net/phy/bcm-cygnus.c rc = bcm_cygnus_afe_config(phydev); phydev 103 drivers/net/phy/bcm-cygnus.c rc = bcm_phy_set_eee(phydev, true); phydev 108 drivers/net/phy/bcm-cygnus.c return bcm_phy_enable_apd(phydev, false); phydev 111 drivers/net/phy/bcm-cygnus.c static int bcm_cygnus_resume(struct phy_device *phydev) phydev 115 drivers/net/phy/bcm-cygnus.c genphy_resume(phydev); phydev 120 drivers/net/phy/bcm-cygnus.c rc = bcm_cygnus_config_init(phydev); phydev 125 drivers/net/phy/bcm-cygnus.c return genphy_config_aneg(phydev); phydev 128 drivers/net/phy/bcm-cygnus.c static int bcm_omega_config_init(struct phy_device *phydev) phydev 133 drivers/net/phy/bcm-cygnus.c rev = phydev->phy_id & ~phydev->drv->phy_id_mask; phydev 136 drivers/net/phy/bcm-cygnus.c phydev_name(phydev), phydev->drv->name, rev); phydev 143 drivers/net/phy/bcm-cygnus.c phy_read(phydev, MII_BMSR); phydev 147 drivers/net/phy/bcm-cygnus.c ret = bcm_phy_28nm_a0b0_afe_config_init(phydev); phydev 156 drivers/net/phy/bcm-cygnus.c ret = bcm_phy_downshift_get(phydev, &count); phydev 161 drivers/net/phy/bcm-cygnus.c ret = bcm_phy_set_eee(phydev, count == DOWNSHIFT_DEV_DISABLE); phydev 165 drivers/net/phy/bcm-cygnus.c return bcm_phy_enable_apd(phydev, true); phydev 168 drivers/net/phy/bcm-cygnus.c static int bcm_omega_resume(struct phy_device *phydev) phydev 173 drivers/net/phy/bcm-cygnus.c ret = bcm_omega_config_init(phydev); phydev 182 drivers/net/phy/bcm-cygnus.c return genphy_config_aneg(phydev); phydev 185 drivers/net/phy/bcm-cygnus.c static int bcm_omega_get_tunable(struct phy_device *phydev, phydev 190 drivers/net/phy/bcm-cygnus.c return bcm_phy_downshift_get(phydev, (u8 *)data); phydev 196 drivers/net/phy/bcm-cygnus.c static int bcm_omega_set_tunable(struct phy_device *phydev, phydev 205 drivers/net/phy/bcm-cygnus.c ret = bcm_phy_downshift_set(phydev, count); phydev 218 drivers/net/phy/bcm-cygnus.c ret = bcm_phy_set_eee(phydev, count == DOWNSHIFT_DEV_DISABLE); phydev 222 drivers/net/phy/bcm-cygnus.c return genphy_restart_aneg(phydev); phydev 225 drivers/net/phy/bcm-cygnus.c static void bcm_omega_get_phy_stats(struct phy_device *phydev, phydev 228 drivers/net/phy/bcm-cygnus.c struct bcm_omega_phy_priv *priv = phydev->priv; phydev 230 drivers/net/phy/bcm-cygnus.c bcm_phy_get_stats(phydev, priv->stats, stats, data); phydev 233 drivers/net/phy/bcm-cygnus.c static int bcm_omega_probe(struct phy_device *phydev) phydev 237 drivers/net/phy/bcm-cygnus.c priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); phydev 241 drivers/net/phy/bcm-cygnus.c phydev->priv = priv; phydev 243 drivers/net/phy/bcm-cygnus.c priv->stats = devm_kcalloc(&phydev->mdio.dev, phydev 244 drivers/net/phy/bcm-cygnus.c bcm_phy_get_sset_count(phydev), sizeof(u64), phydev 17 drivers/net/phy/bcm-phy-lib.c int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val) phydev 21 drivers/net/phy/bcm-phy-lib.c rc = phy_write(phydev, MII_BCM54XX_EXP_SEL, reg); phydev 25 drivers/net/phy/bcm-phy-lib.c return phy_write(phydev, MII_BCM54XX_EXP_DATA, val); phydev 29 drivers/net/phy/bcm-phy-lib.c int bcm_phy_read_exp(struct phy_device *phydev, u16 reg) phydev 33 drivers/net/phy/bcm-phy-lib.c val = phy_write(phydev, MII_BCM54XX_EXP_SEL, reg); phydev 37 drivers/net/phy/bcm-phy-lib.c val = phy_read(phydev, MII_BCM54XX_EXP_DATA); phydev 40 drivers/net/phy/bcm-phy-lib.c phy_write(phydev, MII_BCM54XX_EXP_SEL, 0); phydev 46 drivers/net/phy/bcm-phy-lib.c int bcm54xx_auxctl_read(struct phy_device *phydev, u16 regnum) phydev 51 drivers/net/phy/bcm-phy-lib.c phy_write(phydev, MII_BCM54XX_AUX_CTL, MII_BCM54XX_AUXCTL_SHDWSEL_MASK | phydev 53 drivers/net/phy/bcm-phy-lib.c return phy_read(phydev, MII_BCM54XX_AUX_CTL); phydev 57 drivers/net/phy/bcm-phy-lib.c int bcm54xx_auxctl_write(struct phy_device *phydev, u16 regnum, u16 val) phydev 59 drivers/net/phy/bcm-phy-lib.c return phy_write(phydev, MII_BCM54XX_AUX_CTL, regnum | val); phydev 63 drivers/net/phy/bcm-phy-lib.c int bcm_phy_write_misc(struct phy_device *phydev, phydev 69 drivers/net/phy/bcm-phy-lib.c rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, phydev 74 drivers/net/phy/bcm-phy-lib.c tmp = phy_read(phydev, MII_BCM54XX_AUX_CTL); phydev 76 drivers/net/phy/bcm-phy-lib.c rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, tmp); phydev 81 drivers/net/phy/bcm-phy-lib.c rc = bcm_phy_write_exp(phydev, tmp, val); phydev 87 drivers/net/phy/bcm-phy-lib.c int bcm_phy_read_misc(struct phy_device *phydev, phydev 93 drivers/net/phy/bcm-phy-lib.c rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, phydev 98 drivers/net/phy/bcm-phy-lib.c tmp = phy_read(phydev, MII_BCM54XX_AUX_CTL); phydev 100 drivers/net/phy/bcm-phy-lib.c rc = phy_write(phydev, MII_BCM54XX_AUX_CTL, tmp); phydev 105 drivers/net/phy/bcm-phy-lib.c rc = bcm_phy_read_exp(phydev, tmp); phydev 111 drivers/net/phy/bcm-phy-lib.c int bcm_phy_ack_intr(struct phy_device *phydev) phydev 116 drivers/net/phy/bcm-phy-lib.c reg = phy_read(phydev, MII_BCM54XX_ISR); phydev 124 drivers/net/phy/bcm-phy-lib.c int bcm_phy_config_intr(struct phy_device *phydev) phydev 128 drivers/net/phy/bcm-phy-lib.c reg = phy_read(phydev, MII_BCM54XX_ECR); phydev 132 drivers/net/phy/bcm-phy-lib.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 137 drivers/net/phy/bcm-phy-lib.c return phy_write(phydev, MII_BCM54XX_ECR, reg); phydev 141 drivers/net/phy/bcm-phy-lib.c int bcm_phy_read_shadow(struct phy_device *phydev, u16 shadow) phydev 143 drivers/net/phy/bcm-phy-lib.c phy_write(phydev, MII_BCM54XX_SHD, MII_BCM54XX_SHD_VAL(shadow)); phydev 144 drivers/net/phy/bcm-phy-lib.c return MII_BCM54XX_SHD_DATA(phy_read(phydev, MII_BCM54XX_SHD)); phydev 148 drivers/net/phy/bcm-phy-lib.c int bcm_phy_write_shadow(struct phy_device *phydev, u16 shadow, phydev 151 drivers/net/phy/bcm-phy-lib.c return phy_write(phydev, MII_BCM54XX_SHD, phydev 158 drivers/net/phy/bcm-phy-lib.c int bcm_phy_enable_apd(struct phy_device *phydev, bool dll_pwr_down) phydev 163 drivers/net/phy/bcm-phy-lib.c val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3); phydev 168 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_shadow(phydev, BCM54XX_SHD_SCR3, val); phydev 171 drivers/net/phy/bcm-phy-lib.c val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_APD); phydev 178 drivers/net/phy/bcm-phy-lib.c if (phydev->autoneg == AUTONEG_ENABLE) phydev 187 drivers/net/phy/bcm-phy-lib.c return bcm_phy_write_shadow(phydev, BCM54XX_SHD_APD, val); phydev 191 drivers/net/phy/bcm-phy-lib.c int bcm_phy_set_eee(struct phy_device *phydev, bool enable) phydev 196 drivers/net/phy/bcm-phy-lib.c val = phy_read_mmd(phydev, MDIO_MMD_AN, BRCM_CL45VEN_EEE_CONTROL); phydev 205 drivers/net/phy/bcm-phy-lib.c phy_write_mmd(phydev, MDIO_MMD_AN, BRCM_CL45VEN_EEE_CONTROL, (u32)val); phydev 208 drivers/net/phy/bcm-phy-lib.c val = phy_read_mmd(phydev, MDIO_MMD_AN, BCM_CL45VEN_EEE_ADV); phydev 217 drivers/net/phy/bcm-phy-lib.c phy_write_mmd(phydev, MDIO_MMD_AN, BCM_CL45VEN_EEE_ADV, (u32)val); phydev 223 drivers/net/phy/bcm-phy-lib.c int bcm_phy_downshift_get(struct phy_device *phydev, u8 *count) phydev 227 drivers/net/phy/bcm-phy-lib.c val = bcm54xx_auxctl_read(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC); phydev 237 drivers/net/phy/bcm-phy-lib.c val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR2); phydev 255 drivers/net/phy/bcm-phy-lib.c int bcm_phy_downshift_set(struct phy_device *phydev, u8 count) phydev 266 drivers/net/phy/bcm-phy-lib.c val = bcm54xx_auxctl_read(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC); phydev 275 drivers/net/phy/bcm-phy-lib.c return bcm54xx_auxctl_write(phydev, phydev 280 drivers/net/phy/bcm-phy-lib.c ret = bcm54xx_auxctl_write(phydev, phydev 287 drivers/net/phy/bcm-phy-lib.c val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR2); phydev 305 drivers/net/phy/bcm-phy-lib.c return bcm_phy_write_shadow(phydev, BCM54XX_SHD_SCR2, val); phydev 325 drivers/net/phy/bcm-phy-lib.c int bcm_phy_get_sset_count(struct phy_device *phydev) phydev 331 drivers/net/phy/bcm-phy-lib.c void bcm_phy_get_strings(struct phy_device *phydev, u8 *data) phydev 344 drivers/net/phy/bcm-phy-lib.c static u64 bcm_phy_get_stat(struct phy_device *phydev, u64 *shadow, phydev 351 drivers/net/phy/bcm-phy-lib.c val = phy_read(phydev, stat.reg); phydev 364 drivers/net/phy/bcm-phy-lib.c void bcm_phy_get_stats(struct phy_device *phydev, u64 *shadow, phydev 370 drivers/net/phy/bcm-phy-lib.c data[i] = bcm_phy_get_stat(phydev, shadow, i); phydev 374 drivers/net/phy/bcm-phy-lib.c void bcm_phy_r_rc_cal_reset(struct phy_device *phydev) phydev 377 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_exp_sel(phydev, 0x00b0, 0x0010); phydev 380 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_exp_sel(phydev, 0x00b0, 0x0000); phydev 384 drivers/net/phy/bcm-phy-lib.c int bcm_phy_28nm_a0b0_afe_config_init(struct phy_device *phydev) phydev 389 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, PLL_PLLCTRL_1, 0x0048); phydev 392 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, PLL_PLLCTRL_2, 0x021b); phydev 397 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, PLL_PLLCTRL_4, 0x0e20); phydev 400 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, DSP_TAP10, 0x690b); phydev 403 drivers/net/phy/bcm-phy-lib.c phy_write(phydev, MII_BRCM_CORE_BASE1E, 0xd); phydev 405 drivers/net/phy/bcm-phy-lib.c bcm_phy_r_rc_cal_reset(phydev); phydev 408 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_0, 0xeb19); phydev 411 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_1, 0x9a3f); phydev 414 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, AFE_RX_LP_COUNTER, 0x7fc0); phydev 417 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, AFE_HPF_TRIM_OTHERS, 0x000b); phydev 420 drivers/net/phy/bcm-phy-lib.c bcm_phy_write_misc(phydev, AFE_TX_CONFIG, 0x0800); phydev 30 drivers/net/phy/bcm-phy-lib.h int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val); phydev 31 drivers/net/phy/bcm-phy-lib.h int bcm_phy_read_exp(struct phy_device *phydev, u16 reg); phydev 33 drivers/net/phy/bcm-phy-lib.h static inline int bcm_phy_write_exp_sel(struct phy_device *phydev, phydev 36 drivers/net/phy/bcm-phy-lib.h return bcm_phy_write_exp(phydev, reg | MII_BCM54XX_EXP_SEL_ER, val); phydev 39 drivers/net/phy/bcm-phy-lib.h int bcm54xx_auxctl_write(struct phy_device *phydev, u16 regnum, u16 val); phydev 40 drivers/net/phy/bcm-phy-lib.h int bcm54xx_auxctl_read(struct phy_device *phydev, u16 regnum); phydev 42 drivers/net/phy/bcm-phy-lib.h int bcm_phy_write_misc(struct phy_device *phydev, phydev 44 drivers/net/phy/bcm-phy-lib.h int bcm_phy_read_misc(struct phy_device *phydev, phydev 47 drivers/net/phy/bcm-phy-lib.h int bcm_phy_write_shadow(struct phy_device *phydev, u16 shadow, phydev 49 drivers/net/phy/bcm-phy-lib.h int bcm_phy_read_shadow(struct phy_device *phydev, u16 shadow); phydev 51 drivers/net/phy/bcm-phy-lib.h int bcm_phy_ack_intr(struct phy_device *phydev); phydev 52 drivers/net/phy/bcm-phy-lib.h int bcm_phy_config_intr(struct phy_device *phydev); phydev 54 drivers/net/phy/bcm-phy-lib.h int bcm_phy_enable_apd(struct phy_device *phydev, bool dll_pwr_down); phydev 56 drivers/net/phy/bcm-phy-lib.h int bcm_phy_set_eee(struct phy_device *phydev, bool enable); phydev 58 drivers/net/phy/bcm-phy-lib.h int bcm_phy_downshift_get(struct phy_device *phydev, u8 *count); phydev 60 drivers/net/phy/bcm-phy-lib.h int bcm_phy_downshift_set(struct phy_device *phydev, u8 count); phydev 62 drivers/net/phy/bcm-phy-lib.h int bcm_phy_get_sset_count(struct phy_device *phydev); phydev 63 drivers/net/phy/bcm-phy-lib.h void bcm_phy_get_strings(struct phy_device *phydev, u8 *data); phydev 64 drivers/net/phy/bcm-phy-lib.h void bcm_phy_get_stats(struct phy_device *phydev, u64 *shadow, phydev 66 drivers/net/phy/bcm-phy-lib.h void bcm_phy_r_rc_cal_reset(struct phy_device *phydev); phydev 67 drivers/net/phy/bcm-phy-lib.h int bcm_phy_28nm_a0b0_afe_config_init(struct phy_device *phydev); phydev 20 drivers/net/phy/bcm63xx.c static int bcm63xx_config_intr(struct phy_device *phydev) phydev 24 drivers/net/phy/bcm63xx.c reg = phy_read(phydev, MII_BCM63XX_IR); phydev 28 drivers/net/phy/bcm63xx.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 33 drivers/net/phy/bcm63xx.c err = phy_write(phydev, MII_BCM63XX_IR, reg); phydev 37 drivers/net/phy/bcm63xx.c static int bcm63xx_config_init(struct phy_device *phydev) phydev 42 drivers/net/phy/bcm63xx.c linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported); phydev 44 drivers/net/phy/bcm63xx.c reg = phy_read(phydev, MII_BCM63XX_IR); phydev 50 drivers/net/phy/bcm63xx.c err = phy_write(phydev, MII_BCM63XX_IR, reg); phydev 59 drivers/net/phy/bcm63xx.c return phy_write(phydev, MII_BCM63XX_IR, reg); phydev 44 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_d0_afe_config_init(struct phy_device *phydev) phydev 47 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_0, 0xeb15); phydev 50 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_1, 0x9b2f); phydev 53 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_2, 0x2003); phydev 56 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_RX_LP_COUNTER, 0x7fc0); phydev 59 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_TX_CONFIG, 0x431); phydev 62 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_VDCA_ICTRL_0, 0xa7da); phydev 65 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_VDAC_OTHERS_0, 0xa020); phydev 70 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_HPF_TRIM_OTHERS, 0x00e3); phydev 73 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BRCM_CORE_BASE1E, 0x0010); phydev 76 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, DSP_TAP10, 0x011b); phydev 79 drivers/net/phy/bcm7xxx.c bcm_phy_r_rc_cal_reset(phydev); phydev 84 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_e0_plus_afe_config_init(struct phy_device *phydev) phydev 87 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_1, 0x9b2f); phydev 90 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_TX_CONFIG, 0x431); phydev 93 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_VDCA_ICTRL_0, 0xa7da); phydev 98 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_HPF_TRIM_OTHERS, 0x00e3); phydev 101 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BRCM_CORE_BASE1E, 0x0010); phydev 104 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, DSP_TAP10, 0x011b); phydev 107 drivers/net/phy/bcm7xxx.c bcm_phy_r_rc_cal_reset(phydev); phydev 112 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_a0_patch_afe_config_init(struct phy_device *phydev) phydev 115 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_RXCONFIG_2, 0xd003); phydev 118 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, DSP_TAP10, 0x791b); phydev 121 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, AFE_HPF_TRIM_OTHERS, 0x10e3); phydev 124 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, 0x21, 0x2, 0x87f6); phydev 127 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, 0x22, 0x2, 0x017d); phydev 130 drivers/net/phy/bcm7xxx.c bcm_phy_write_misc(phydev, 0x26, 0x2, 0x0015); phydev 132 drivers/net/phy/bcm7xxx.c bcm_phy_r_rc_cal_reset(phydev); phydev 137 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_config_init(struct phy_device *phydev) phydev 139 drivers/net/phy/bcm7xxx.c u8 rev = PHY_BRCM_7XXX_REV(phydev->dev_flags); phydev 140 drivers/net/phy/bcm7xxx.c u8 patch = PHY_BRCM_7XXX_PATCH(phydev->dev_flags); phydev 148 drivers/net/phy/bcm7xxx.c rev = phydev->phy_id & ~phydev->drv->phy_id_mask; phydev 151 drivers/net/phy/bcm7xxx.c phydev_name(phydev), phydev->drv->name, rev, patch); phydev 158 drivers/net/phy/bcm7xxx.c phy_read(phydev, MII_BMSR); phydev 163 drivers/net/phy/bcm7xxx.c ret = bcm_phy_28nm_a0b0_afe_config_init(phydev); phydev 166 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_d0_afe_config_init(phydev); phydev 172 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_e0_plus_afe_config_init(phydev); phydev 175 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_a0_patch_afe_config_init(phydev); phydev 184 drivers/net/phy/bcm7xxx.c ret = bcm_phy_downshift_get(phydev, &count); phydev 189 drivers/net/phy/bcm7xxx.c ret = bcm_phy_set_eee(phydev, count == DOWNSHIFT_DEV_DISABLE); phydev 193 drivers/net/phy/bcm7xxx.c return bcm_phy_enable_apd(phydev, true); phydev 196 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_resume(struct phy_device *phydev) phydev 201 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_config_init(phydev); phydev 210 drivers/net/phy/bcm7xxx.c return genphy_config_aneg(phydev); phydev 232 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_ephy_01_afe_config_init(struct phy_device *phydev) phydev 237 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, phydev 243 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_BIAS_TRIM, 0x3BE0); phydev 248 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_ADDR_CTRL, phydev 252 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_SHD_2_CTRL_STAT, phydev 258 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_ADDR_CTRL, phydev 262 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_SHD_2_CTRL_STAT, phydev 269 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, 0, phydev 278 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_ephy_apd_enable(struct phy_device *phydev) phydev 283 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BRCM_FET_BRCMTEST, phydev 289 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BRCM_FET_SHDW_AUXSTAT2, phydev 295 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BRCM_FET_BRCMTEST, 0, phydev 303 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_ephy_eee_enable(struct phy_device *phydev) phydev 308 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, phydev 314 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_ADDR_CTRL, phydev 318 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_CTRL_STAT, phydev 324 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_ADDR_CTRL, phydev 328 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_CTRL_STAT, phydev 333 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_ADDR_CTRL, phydev 337 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_CTRL_STAT, phydev 343 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_ADDR_CTRL, phydev 347 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, MII_BCM7XXX_SHD_2_CTRL_STAT, phydev 354 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, 0, phydev 360 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BMCR, phydev 366 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_ephy_config_init(struct phy_device *phydev) phydev 368 drivers/net/phy/bcm7xxx.c u8 rev = phydev->phy_id & ~phydev->drv->phy_id_mask; phydev 372 drivers/net/phy/bcm7xxx.c phydev_name(phydev), phydev->drv->name, rev); phydev 379 drivers/net/phy/bcm7xxx.c phy_read(phydev, MII_BMSR); phydev 383 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_ephy_01_afe_config_init(phydev); phydev 388 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_ephy_eee_enable(phydev); phydev 392 drivers/net/phy/bcm7xxx.c return bcm7xxx_28nm_ephy_apd_enable(phydev); phydev 395 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_ephy_resume(struct phy_device *phydev) phydev 400 drivers/net/phy/bcm7xxx.c ret = bcm7xxx_28nm_ephy_config_init(phydev); phydev 404 drivers/net/phy/bcm7xxx.c return genphy_config_aneg(phydev); phydev 407 drivers/net/phy/bcm7xxx.c static int bcm7xxx_config_init(struct phy_device *phydev) phydev 412 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BCM7XXX_AUX_MODE, MII_BCM7XXX_64CLK_MDIO); phydev 413 drivers/net/phy/bcm7xxx.c phy_read(phydev, MII_BCM7XXX_AUX_MODE); phydev 416 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, phydev 422 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BCM7XXX_100TX_DISC, 0x0F00); phydev 426 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BCM7XXX_100TX_DISC, 0x0C00); phydev 428 drivers/net/phy/bcm7xxx.c phy_write(phydev, MII_BCM7XXX_100TX_FALSE_CAR, 0x7555); phydev 431 drivers/net/phy/bcm7xxx.c ret = phy_set_clr_bits(phydev, MII_BCM7XXX_TEST, 0, MII_BCM7XXX_SHD_MODE_2); phydev 441 drivers/net/phy/bcm7xxx.c static int bcm7xxx_suspend(struct phy_device *phydev) phydev 458 drivers/net/phy/bcm7xxx.c ret = phy_write(phydev, phydev 468 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_get_tunable(struct phy_device *phydev, phydev 474 drivers/net/phy/bcm7xxx.c return bcm_phy_downshift_get(phydev, (u8 *)data); phydev 480 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_set_tunable(struct phy_device *phydev, phydev 489 drivers/net/phy/bcm7xxx.c ret = bcm_phy_downshift_set(phydev, count); phydev 502 drivers/net/phy/bcm7xxx.c ret = bcm_phy_set_eee(phydev, count == DOWNSHIFT_DEV_DISABLE); phydev 506 drivers/net/phy/bcm7xxx.c return genphy_restart_aneg(phydev); phydev 509 drivers/net/phy/bcm7xxx.c static void bcm7xxx_28nm_get_phy_stats(struct phy_device *phydev, phydev 512 drivers/net/phy/bcm7xxx.c struct bcm7xxx_phy_priv *priv = phydev->priv; phydev 514 drivers/net/phy/bcm7xxx.c bcm_phy_get_stats(phydev, priv->stats, stats, data); phydev 517 drivers/net/phy/bcm7xxx.c static int bcm7xxx_28nm_probe(struct phy_device *phydev) phydev 521 drivers/net/phy/bcm7xxx.c priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); phydev 525 drivers/net/phy/bcm7xxx.c phydev->priv = priv; phydev 527 drivers/net/phy/bcm7xxx.c priv->stats = devm_kcalloc(&phydev->mdio.dev, phydev 528 drivers/net/phy/bcm7xxx.c bcm_phy_get_sset_count(phydev), sizeof(u64), phydev 34 drivers/net/phy/bcm87xx.c static int bcm87xx_of_reg_init(struct phy_device *phydev) phydev 40 drivers/net/phy/bcm87xx.c if (!phydev->mdio.dev.of_node) phydev 43 drivers/net/phy/bcm87xx.c paddr = of_get_property(phydev->mdio.dev.of_node, phydev 61 drivers/net/phy/bcm87xx.c val = phy_read(phydev, regnum); phydev 70 drivers/net/phy/bcm87xx.c ret = phy_write(phydev, regnum, val); phydev 78 drivers/net/phy/bcm87xx.c static int bcm87xx_of_reg_init(struct phy_device *phydev) phydev 84 drivers/net/phy/bcm87xx.c static int bcm87xx_get_features(struct phy_device *phydev) phydev 87 drivers/net/phy/bcm87xx.c phydev->supported); phydev 91 drivers/net/phy/bcm87xx.c static int bcm87xx_config_init(struct phy_device *phydev) phydev 93 drivers/net/phy/bcm87xx.c return bcm87xx_of_reg_init(phydev); phydev 96 drivers/net/phy/bcm87xx.c static int bcm87xx_config_aneg(struct phy_device *phydev) phydev 101 drivers/net/phy/bcm87xx.c static int bcm87xx_read_status(struct phy_device *phydev) phydev 107 drivers/net/phy/bcm87xx.c rx_signal_detect = phy_read(phydev, BCM87XX_PMD_RX_SIGNAL_DETECT); phydev 114 drivers/net/phy/bcm87xx.c pcs_status = phy_read(phydev, BCM87XX_10GBASER_PCS_STATUS); phydev 121 drivers/net/phy/bcm87xx.c xgxs_lane_status = phy_read(phydev, BCM87XX_XGXS_LANE_STATUS); phydev 128 drivers/net/phy/bcm87xx.c phydev->speed = 10000; phydev 129 drivers/net/phy/bcm87xx.c phydev->link = 1; phydev 130 drivers/net/phy/bcm87xx.c phydev->duplex = 1; phydev 134 drivers/net/phy/bcm87xx.c phydev->link = 0; phydev 138 drivers/net/phy/bcm87xx.c static int bcm87xx_config_intr(struct phy_device *phydev) phydev 142 drivers/net/phy/bcm87xx.c reg = phy_read(phydev, BCM87XX_LASI_CONTROL); phydev 147 drivers/net/phy/bcm87xx.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 152 drivers/net/phy/bcm87xx.c err = phy_write(phydev, BCM87XX_LASI_CONTROL, reg); phydev 156 drivers/net/phy/bcm87xx.c static int bcm87xx_did_interrupt(struct phy_device *phydev) phydev 160 drivers/net/phy/bcm87xx.c reg = phy_read(phydev, BCM87XX_LASI_STATUS); phydev 163 drivers/net/phy/bcm87xx.c phydev_err(phydev, phydev 171 drivers/net/phy/bcm87xx.c static int bcm87xx_ack_interrupt(struct phy_device *phydev) phydev 174 drivers/net/phy/bcm87xx.c bcm87xx_did_interrupt(phydev); phydev 178 drivers/net/phy/bcm87xx.c static int bcm8706_match_phy_device(struct phy_device *phydev) phydev 180 drivers/net/phy/bcm87xx.c return phydev->c45_ids.device_ids[4] == PHY_ID_BCM8706; phydev 183 drivers/net/phy/bcm87xx.c static int bcm8727_match_phy_device(struct phy_device *phydev) phydev 185 drivers/net/phy/bcm87xx.c return phydev->c45_ids.device_ids[4] == PHY_ID_BCM8727; phydev 19 drivers/net/phy/broadcom.c #define BRCM_PHY_MODEL(phydev) \ phydev 20 drivers/net/phy/broadcom.c ((phydev)->drv->phy_id & (phydev)->drv->phy_id_mask) phydev 22 drivers/net/phy/broadcom.c #define BRCM_PHY_REV(phydev) \ phydev 23 drivers/net/phy/broadcom.c ((phydev)->drv->phy_id & ~((phydev)->drv->phy_id_mask)) phydev 29 drivers/net/phy/broadcom.c static int bcm54xx_config_clock_delay(struct phy_device *phydev); phydev 31 drivers/net/phy/broadcom.c static int bcm54210e_config_init(struct phy_device *phydev) phydev 35 drivers/net/phy/broadcom.c bcm54xx_config_clock_delay(phydev); phydev 37 drivers/net/phy/broadcom.c if (phydev->dev_flags & PHY_BRCM_EN_MASTER_MODE) { phydev 38 drivers/net/phy/broadcom.c val = phy_read(phydev, MII_CTRL1000); phydev 40 drivers/net/phy/broadcom.c phy_write(phydev, MII_CTRL1000, val); phydev 46 drivers/net/phy/broadcom.c static int bcm54612e_config_init(struct phy_device *phydev) phydev 51 drivers/net/phy/broadcom.c if ((phydev->interface != PHY_INTERFACE_MODE_RGMII_ID) && phydev 52 drivers/net/phy/broadcom.c (phydev->interface != PHY_INTERFACE_MODE_RGMII_TXID)) { phydev 55 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, 0x03, 0); phydev 59 drivers/net/phy/broadcom.c if ((phydev->interface != PHY_INTERFACE_MODE_RGMII_ID) && phydev 60 drivers/net/phy/broadcom.c (phydev->interface != PHY_INTERFACE_MODE_RGMII_RXID)) { phydev 61 drivers/net/phy/broadcom.c reg = bcm54xx_auxctl_read(phydev, phydev 67 drivers/net/phy/broadcom.c bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC, phydev 72 drivers/net/phy/broadcom.c if (!(phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED)) { phydev 75 drivers/net/phy/broadcom.c reg = bcm_phy_read_exp(phydev, BCM54612E_EXP_SPARE0); phydev 76 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, BCM54612E_EXP_SPARE0, phydev 86 drivers/net/phy/broadcom.c static int bcm54xx_config_clock_delay(struct phy_device *phydev) phydev 91 drivers/net/phy/broadcom.c val = bcm54xx_auxctl_read(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC); phydev 93 drivers/net/phy/broadcom.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII || phydev 94 drivers/net/phy/broadcom.c phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { phydev 98 drivers/net/phy/broadcom.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 99 drivers/net/phy/broadcom.c phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { phydev 103 drivers/net/phy/broadcom.c rc = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC, phydev 109 drivers/net/phy/broadcom.c val = bcm_phy_read_shadow(phydev, BCM54810_SHD_CLK_CTL); phydev 110 drivers/net/phy/broadcom.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII || phydev 111 drivers/net/phy/broadcom.c phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { phydev 115 drivers/net/phy/broadcom.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 116 drivers/net/phy/broadcom.c phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { phydev 120 drivers/net/phy/broadcom.c rc = bcm_phy_write_shadow(phydev, BCM54810_SHD_CLK_CTL, val); phydev 128 drivers/net/phy/broadcom.c static int bcm50610_a0_workaround(struct phy_device *phydev) phydev 132 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_AADJ1CH0, phydev 138 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_AADJ1CH3, phydev 143 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_EXP75, phydev 148 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_EXP96, phydev 153 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_EXP97, phydev 159 drivers/net/phy/broadcom.c static int bcm54xx_phydsp_config(struct phy_device *phydev) phydev 164 drivers/net/phy/broadcom.c err = bcm54xx_auxctl_write(phydev, phydev 171 drivers/net/phy/broadcom.c if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610 || phydev 172 drivers/net/phy/broadcom.c BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610M) { phydev 174 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_EXP08, phydev 179 drivers/net/phy/broadcom.c if (phydev->drv->phy_id == PHY_ID_BCM50610) { phydev 180 drivers/net/phy/broadcom.c err = bcm50610_a0_workaround(phydev); phydev 186 drivers/net/phy/broadcom.c if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM57780) { phydev 189 drivers/net/phy/broadcom.c val = bcm_phy_read_exp(phydev, MII_BCM54XX_EXP_EXP75); phydev 194 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_EXP75, val); phydev 199 drivers/net/phy/broadcom.c err2 = bcm54xx_auxctl_write(phydev, phydev 207 drivers/net/phy/broadcom.c static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev) phydev 214 drivers/net/phy/broadcom.c if (BRCM_PHY_MODEL(phydev) != PHY_ID_BCM57780 && phydev 215 drivers/net/phy/broadcom.c BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610 && phydev 216 drivers/net/phy/broadcom.c BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M) phydev 219 drivers/net/phy/broadcom.c val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3); phydev 225 drivers/net/phy/broadcom.c if ((BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610 || phydev 226 drivers/net/phy/broadcom.c BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610M) && phydev 227 drivers/net/phy/broadcom.c BRCM_PHY_REV(phydev) >= 0x3) { phydev 234 drivers/net/phy/broadcom.c if (phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED) { phydev 241 drivers/net/phy/broadcom.c if (!clk125en || (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE)) phydev 246 drivers/net/phy/broadcom.c if (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) phydev 250 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM54XX_SHD_SCR3, val); phydev 252 drivers/net/phy/broadcom.c val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_APD); phydev 258 drivers/net/phy/broadcom.c if (!clk125en || (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE)) phydev 264 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM54XX_SHD_APD, val); phydev 267 drivers/net/phy/broadcom.c static int bcm54xx_config_init(struct phy_device *phydev) phydev 271 drivers/net/phy/broadcom.c reg = phy_read(phydev, MII_BCM54XX_ECR); phydev 277 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BCM54XX_ECR, reg); phydev 285 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BCM54XX_IMR, reg); phydev 289 drivers/net/phy/broadcom.c if ((BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610 || phydev 290 drivers/net/phy/broadcom.c BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610M) && phydev 291 drivers/net/phy/broadcom.c (phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE)) phydev 292 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM54XX_SHD_RGMII_MODE, 0); phydev 294 drivers/net/phy/broadcom.c if ((phydev->dev_flags & PHY_BRCM_RX_REFCLK_UNUSED) || phydev 295 drivers/net/phy/broadcom.c (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) || phydev 296 drivers/net/phy/broadcom.c (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE)) phydev 297 drivers/net/phy/broadcom.c bcm54xx_adjust_rxrefclk(phydev); phydev 299 drivers/net/phy/broadcom.c if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54210E) { phydev 300 drivers/net/phy/broadcom.c err = bcm54210e_config_init(phydev); phydev 303 drivers/net/phy/broadcom.c } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54612E) { phydev 304 drivers/net/phy/broadcom.c err = bcm54612e_config_init(phydev); phydev 307 drivers/net/phy/broadcom.c } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54810) { phydev 309 drivers/net/phy/broadcom.c val = bcm_phy_read_exp(phydev, phydev 312 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, phydev 319 drivers/net/phy/broadcom.c bcm54xx_phydsp_config(phydev); phydev 327 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM5482_SHD_LEDS1, val); phydev 332 drivers/net/phy/broadcom.c bcm_phy_write_exp(phydev, BCM_EXP_MULTICOLOR, val); phydev 337 drivers/net/phy/broadcom.c static int bcm5482_config_init(struct phy_device *phydev) phydev 341 drivers/net/phy/broadcom.c err = bcm54xx_config_init(phydev); phydev 343 drivers/net/phy/broadcom.c if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX) { phydev 347 drivers/net/phy/broadcom.c reg = bcm_phy_read_shadow(phydev, BCM5482_SHD_SSD); phydev 348 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM5482_SHD_SSD, phydev 357 drivers/net/phy/broadcom.c err = bcm_phy_read_exp(phydev, reg); phydev 360 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, reg, err | phydev 370 drivers/net/phy/broadcom.c err = bcm_phy_read_exp(phydev, reg); phydev 373 drivers/net/phy/broadcom.c err = bcm_phy_write_exp(phydev, reg, phydev 381 drivers/net/phy/broadcom.c reg = bcm_phy_read_shadow(phydev, BCM5482_SHD_MODE); phydev 382 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM5482_SHD_MODE, phydev 389 drivers/net/phy/broadcom.c bcm_phy_write_shadow(phydev, BCM5482_SHD_LEDS1, phydev 399 drivers/net/phy/broadcom.c phydev->autoneg = AUTONEG_DISABLE; phydev 400 drivers/net/phy/broadcom.c phydev->speed = SPEED_1000; phydev 401 drivers/net/phy/broadcom.c phydev->duplex = DUPLEX_FULL; phydev 407 drivers/net/phy/broadcom.c static int bcm5482_read_status(struct phy_device *phydev) phydev 411 drivers/net/phy/broadcom.c err = genphy_read_status(phydev); phydev 413 drivers/net/phy/broadcom.c if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX) { phydev 418 drivers/net/phy/broadcom.c if (phydev->link) { phydev 419 drivers/net/phy/broadcom.c phydev->speed = SPEED_1000; phydev 420 drivers/net/phy/broadcom.c phydev->duplex = DUPLEX_FULL; phydev 427 drivers/net/phy/broadcom.c static int bcm5481_config_aneg(struct phy_device *phydev) phydev 429 drivers/net/phy/broadcom.c struct device_node *np = phydev->mdio.dev.of_node; phydev 433 drivers/net/phy/broadcom.c ret = genphy_config_aneg(phydev); phydev 436 drivers/net/phy/broadcom.c bcm54xx_config_clock_delay(phydev); phydev 440 drivers/net/phy/broadcom.c ret = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_SEL_ER + 0x9, phydev 449 drivers/net/phy/broadcom.c static int bcm54616s_config_aneg(struct phy_device *phydev) phydev 454 drivers/net/phy/broadcom.c ret = genphy_config_aneg(phydev); phydev 457 drivers/net/phy/broadcom.c bcm54xx_config_clock_delay(phydev); phydev 462 drivers/net/phy/broadcom.c static int brcm_phy_setbits(struct phy_device *phydev, int reg, int set) phydev 466 drivers/net/phy/broadcom.c val = phy_read(phydev, reg); phydev 470 drivers/net/phy/broadcom.c return phy_write(phydev, reg, val | set); phydev 473 drivers/net/phy/broadcom.c static int brcm_fet_config_init(struct phy_device *phydev) phydev 478 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BMCR, BMCR_RESET); phydev 482 drivers/net/phy/broadcom.c reg = phy_read(phydev, MII_BRCM_FET_INTREG); phydev 493 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BRCM_FET_INTREG, reg); phydev 498 drivers/net/phy/broadcom.c brcmtest = phy_read(phydev, MII_BRCM_FET_BRCMTEST); phydev 504 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BRCM_FET_BRCMTEST, reg); phydev 509 drivers/net/phy/broadcom.c reg = phy_read(phydev, MII_BRCM_FET_SHDW_AUXMODE4); phydev 518 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BRCM_FET_SHDW_AUXMODE4, reg); phydev 523 drivers/net/phy/broadcom.c err = brcm_phy_setbits(phydev, MII_BRCM_FET_SHDW_MISCCTRL, phydev 528 drivers/net/phy/broadcom.c if (phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE) { phydev 530 drivers/net/phy/broadcom.c err = brcm_phy_setbits(phydev, MII_BRCM_FET_SHDW_AUXSTAT2, phydev 536 drivers/net/phy/broadcom.c err2 = phy_write(phydev, MII_BRCM_FET_BRCMTEST, brcmtest); phydev 543 drivers/net/phy/broadcom.c static int brcm_fet_ack_interrupt(struct phy_device *phydev) phydev 548 drivers/net/phy/broadcom.c reg = phy_read(phydev, MII_BRCM_FET_INTREG); phydev 555 drivers/net/phy/broadcom.c static int brcm_fet_config_intr(struct phy_device *phydev) phydev 559 drivers/net/phy/broadcom.c reg = phy_read(phydev, MII_BRCM_FET_INTREG); phydev 563 drivers/net/phy/broadcom.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 568 drivers/net/phy/broadcom.c err = phy_write(phydev, MII_BRCM_FET_INTREG, reg); phydev 576 drivers/net/phy/broadcom.c static int bcm53xx_phy_probe(struct phy_device *phydev) phydev 580 drivers/net/phy/broadcom.c priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); phydev 584 drivers/net/phy/broadcom.c phydev->priv = priv; phydev 586 drivers/net/phy/broadcom.c priv->stats = devm_kcalloc(&phydev->mdio.dev, phydev 587 drivers/net/phy/broadcom.c bcm_phy_get_sset_count(phydev), sizeof(u64), phydev 595 drivers/net/phy/broadcom.c static void bcm53xx_phy_get_stats(struct phy_device *phydev, phydev 598 drivers/net/phy/broadcom.c struct bcm53xx_phy_priv *priv = phydev->priv; phydev 600 drivers/net/phy/broadcom.c bcm_phy_get_stats(phydev, priv->stats, stats, data); phydev 63 drivers/net/phy/cicada.c static int cis820x_config_init(struct phy_device *phydev) phydev 67 drivers/net/phy/cicada.c err = phy_write(phydev, MII_CIS8201_AUX_CONSTAT, phydev 73 drivers/net/phy/cicada.c err = phy_write(phydev, MII_CIS8201_EXT_CON1, phydev 79 drivers/net/phy/cicada.c static int cis820x_ack_interrupt(struct phy_device *phydev) phydev 81 drivers/net/phy/cicada.c int err = phy_read(phydev, MII_CIS8201_ISTAT); phydev 86 drivers/net/phy/cicada.c static int cis820x_config_intr(struct phy_device *phydev) phydev 90 drivers/net/phy/cicada.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 91 drivers/net/phy/cicada.c err = phy_write(phydev, MII_CIS8201_IMASK, phydev 94 drivers/net/phy/cicada.c err = phy_write(phydev, MII_CIS8201_IMASK, 0); phydev 18 drivers/net/phy/cortina.c static int cortina_read_reg(struct phy_device *phydev, u16 regnum) phydev 20 drivers/net/phy/cortina.c return mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, phydev 24 drivers/net/phy/cortina.c static int cortina_read_status(struct phy_device *phydev) phydev 28 drivers/net/phy/cortina.c gpio_int_status = cortina_read_reg(phydev, VILLA_GLOBAL_GPIO_1_INTS); phydev 36 drivers/net/phy/cortina.c phydev->speed = SPEED_10000; phydev 37 drivers/net/phy/cortina.c phydev->duplex = DUPLEX_FULL; phydev 38 drivers/net/phy/cortina.c phydev->link = 1; phydev 40 drivers/net/phy/cortina.c phydev->link = 0; phydev 47 drivers/net/phy/cortina.c static int cortina_probe(struct phy_device *phydev) phydev 53 drivers/net/phy/cortina.c id_lsb = cortina_read_reg(phydev, VILLA_GLOBAL_CHIP_ID_LSB); phydev 59 drivers/net/phy/cortina.c id_msb = cortina_read_reg(phydev, VILLA_GLOBAL_CHIP_ID_MSB); phydev 68 drivers/net/phy/cortina.c if (phy_id != phydev->drv->phy_id) { phydev 69 drivers/net/phy/cortina.c phydev_err(phydev, "Error matching phy with %s driver\n", phydev 70 drivers/net/phy/cortina.c phydev->drv->name); phydev 61 drivers/net/phy/davicom.c static int dm9161_config_intr(struct phy_device *phydev) phydev 65 drivers/net/phy/davicom.c temp = phy_read(phydev, MII_DM9161_INTR); phydev 70 drivers/net/phy/davicom.c if (PHY_INTERRUPT_ENABLED == phydev->interrupts) phydev 75 drivers/net/phy/davicom.c temp = phy_write(phydev, MII_DM9161_INTR, temp); phydev 80 drivers/net/phy/davicom.c static int dm9161_config_aneg(struct phy_device *phydev) phydev 85 drivers/net/phy/davicom.c err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); phydev 91 drivers/net/phy/davicom.c err = genphy_config_aneg(phydev); phydev 99 drivers/net/phy/davicom.c static int dm9161_config_init(struct phy_device *phydev) phydev 104 drivers/net/phy/davicom.c err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); phydev 109 drivers/net/phy/davicom.c switch (phydev->interface) { phydev 121 drivers/net/phy/davicom.c err = phy_write(phydev, MII_DM9161_SCR, temp); phydev 126 drivers/net/phy/davicom.c err = phy_write(phydev, MII_DM9161_10BTCSR, MII_DM9161_10BTCSR_INIT); phydev 132 drivers/net/phy/davicom.c return phy_write(phydev, MII_BMCR, BMCR_ANENABLE); phydev 135 drivers/net/phy/davicom.c static int dm9161_ack_interrupt(struct phy_device *phydev) phydev 137 drivers/net/phy/davicom.c int err = phy_read(phydev, MII_DM9161_INTR); phydev 100 drivers/net/phy/dp83640.c struct phy_device *phydev; phydev 210 drivers/net/phy/dp83640.c static inline int broadcast_write(struct phy_device *phydev, u32 regnum, phydev 213 drivers/net/phy/dp83640.c return mdiobus_write(phydev->mdio.bus, BROADCAST_ADDR, regnum, val); phydev 217 drivers/net/phy/dp83640.c static int ext_read(struct phy_device *phydev, int page, u32 regnum) phydev 219 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 223 drivers/net/phy/dp83640.c broadcast_write(phydev, PAGESEL, page); phydev 226 drivers/net/phy/dp83640.c val = phy_read(phydev, regnum); phydev 232 drivers/net/phy/dp83640.c static void ext_write(int broadcast, struct phy_device *phydev, phydev 235 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 238 drivers/net/phy/dp83640.c broadcast_write(phydev, PAGESEL, page); phydev 242 drivers/net/phy/dp83640.c broadcast_write(phydev, regnum, val); phydev 244 drivers/net/phy/dp83640.c phy_write(phydev, regnum, val); phydev 299 drivers/net/phy/dp83640.c struct phy_device *phydev = dp83640->phydev; phydev 323 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE5, PTP_TRIG, ptp_trig); phydev 324 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_CTL, val); phydev 337 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE5, PTP_TRIG, ptp_trig); phydev 341 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_CTL, val); phydev 342 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, nsec & 0xffff); /* ns[15:0] */ phydev 343 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, nsec >> 16); /* ns[31:16] */ phydev 344 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, sec & 0xffff); /* sec[15:0] */ phydev 345 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, sec >> 16); /* sec[31:16] */ phydev 346 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, pwidth & 0xffff); /* ns[15:0] */ phydev 347 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, pwidth >> 16); /* ns[31:16] */ phydev 350 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, pwidth & 0xffff); phydev 351 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_TDR, pwidth >> 16); phydev 357 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_CTL, val); phydev 369 drivers/net/phy/dp83640.c struct phy_device *phydev = clock->chosen->phydev; phydev 390 drivers/net/phy/dp83640.c ext_write(1, phydev, PAGE4, PTP_RATEH, hi); phydev 391 drivers/net/phy/dp83640.c ext_write(1, phydev, PAGE4, PTP_RATEL, lo); phydev 402 drivers/net/phy/dp83640.c struct phy_device *phydev = clock->chosen->phydev; phydev 412 drivers/net/phy/dp83640.c err = tdr_write(1, phydev, &ts, PTP_STEP_CLK); phydev 424 drivers/net/phy/dp83640.c struct phy_device *phydev = clock->chosen->phydev; phydev 429 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_CTL, PTP_RD_CLK); phydev 431 drivers/net/phy/dp83640.c val[0] = ext_read(phydev, PAGE4, PTP_TDR); /* ns[15:0] */ phydev 432 drivers/net/phy/dp83640.c val[1] = ext_read(phydev, PAGE4, PTP_TDR); /* ns[31:16] */ phydev 433 drivers/net/phy/dp83640.c val[2] = ext_read(phydev, PAGE4, PTP_TDR); /* sec[15:0] */ phydev 434 drivers/net/phy/dp83640.c val[3] = ext_read(phydev, PAGE4, PTP_TDR); /* sec[31:16] */ phydev 449 drivers/net/phy/dp83640.c struct phy_device *phydev = clock->chosen->phydev; phydev 454 drivers/net/phy/dp83640.c err = tdr_write(1, phydev, ts, PTP_LOAD_CLK); phydev 466 drivers/net/phy/dp83640.c struct phy_device *phydev = clock->chosen->phydev; phydev 502 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE5, PTP_EVNT, evnt); phydev 540 drivers/net/phy/dp83640.c static void enable_status_frames(struct phy_device *phydev, bool on) phydev 542 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 553 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE5, PSF_CFG0, cfg0); phydev 554 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE6, PSF_CFG1, ver); phydev 558 drivers/net/phy/dp83640.c if (!phydev->attached_dev) { phydev 559 drivers/net/phy/dp83640.c phydev_warn(phydev, phydev 565 drivers/net/phy/dp83640.c if (dev_mc_add(phydev->attached_dev, status_frame_dst)) phydev 566 drivers/net/phy/dp83640.c phydev_warn(phydev, "failed to add mc address\n"); phydev 568 drivers/net/phy/dp83640.c if (dev_mc_del(phydev->attached_dev, status_frame_dst)) phydev 569 drivers/net/phy/dp83640.c phydev_warn(phydev, "failed to delete mc address\n"); phydev 606 drivers/net/phy/dp83640.c static void enable_broadcast(struct phy_device *phydev, int init_page, int on) phydev 609 drivers/net/phy/dp83640.c phy_write(phydev, PAGESEL, 0); phydev 610 drivers/net/phy/dp83640.c val = phy_read(phydev, PHYCR2); phydev 615 drivers/net/phy/dp83640.c phy_write(phydev, PHYCR2, val); phydev 616 drivers/net/phy/dp83640.c phy_write(phydev, PAGESEL, init_page); phydev 626 drivers/net/phy/dp83640.c struct phy_device *master = clock->chosen->phydev; phydev 643 drivers/net/phy/dp83640.c enable_broadcast(tmp->phydev, clock->page, 1); phydev 644 drivers/net/phy/dp83640.c tmp->cfg0 = ext_read(tmp->phydev, PAGE5, PSF_CFG0); phydev 645 drivers/net/phy/dp83640.c ext_write(0, tmp->phydev, PAGE5, PSF_CFG0, 0); phydev 646 drivers/net/phy/dp83640.c ext_write(0, tmp->phydev, PAGE4, PTP_CTL, PTP_ENABLE); phydev 662 drivers/net/phy/dp83640.c ext_write(0, tmp->phydev, PAGE5, PTP_EVNT, evnt); phydev 704 drivers/net/phy/dp83640.c val = ext_read(tmp->phydev, PAGE4, PTP_STS); phydev 705 drivers/net/phy/dp83640.c phydev_info(tmp->phydev, "slave PTP_STS 0x%04hx\n", val); phydev 706 drivers/net/phy/dp83640.c val = ext_read(tmp->phydev, PAGE4, PTP_ESTS); phydev 707 drivers/net/phy/dp83640.c phydev_info(tmp->phydev, "slave PTP_ESTS 0x%04hx\n", val); phydev 708 drivers/net/phy/dp83640.c event_ts.ns_lo = ext_read(tmp->phydev, PAGE4, PTP_EDATA); phydev 709 drivers/net/phy/dp83640.c event_ts.ns_hi = ext_read(tmp->phydev, PAGE4, PTP_EDATA); phydev 710 drivers/net/phy/dp83640.c event_ts.sec_lo = ext_read(tmp->phydev, PAGE4, PTP_EDATA); phydev 711 drivers/net/phy/dp83640.c event_ts.sec_hi = ext_read(tmp->phydev, PAGE4, PTP_EDATA); phydev 713 drivers/net/phy/dp83640.c phydev_info(tmp->phydev, "slave offset %lld nanoseconds\n", phydev 717 drivers/net/phy/dp83640.c tdr_write(0, tmp->phydev, &ts, PTP_STEP_CLK); phydev 725 drivers/net/phy/dp83640.c ext_write(0, tmp->phydev, PAGE5, PSF_CFG0, tmp->cfg0); phydev 1070 drivers/net/phy/dp83640.c struct phy_device *phydev) phydev 1075 drivers/net/phy/dp83640.c if (chosen_phy == phydev->mdio.addr) phydev 1134 drivers/net/phy/dp83640.c static int dp83640_probe(struct phy_device *phydev) phydev 1140 drivers/net/phy/dp83640.c if (phydev->mdio.addr == BROADCAST_ADDR) phydev 1143 drivers/net/phy/dp83640.c clock = dp83640_clock_get_bus(phydev->mdio.bus); phydev 1151 drivers/net/phy/dp83640.c dp83640->phydev = phydev; phydev 1159 drivers/net/phy/dp83640.c phydev->priv = dp83640; phydev 1167 drivers/net/phy/dp83640.c if (choose_this_phy(clock, phydev)) { phydev 1170 drivers/net/phy/dp83640.c &phydev->mdio.dev); phydev 1190 drivers/net/phy/dp83640.c static void dp83640_remove(struct phy_device *phydev) phydev 1194 drivers/net/phy/dp83640.c struct dp83640_private *tmp, *dp83640 = phydev->priv; phydev 1196 drivers/net/phy/dp83640.c if (phydev->mdio.addr == BROADCAST_ADDR) phydev 1199 drivers/net/phy/dp83640.c enable_status_frames(phydev, false); phydev 1224 drivers/net/phy/dp83640.c static int dp83640_soft_reset(struct phy_device *phydev) phydev 1228 drivers/net/phy/dp83640.c ret = genphy_soft_reset(phydev); phydev 1241 drivers/net/phy/dp83640.c static int dp83640_config_init(struct phy_device *phydev) phydev 1243 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 1250 drivers/net/phy/dp83640.c enable_broadcast(phydev, clock->page, 1); phydev 1254 drivers/net/phy/dp83640.c enable_status_frames(phydev, true); phydev 1257 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE4, PTP_CTL, PTP_ENABLE); phydev 1263 drivers/net/phy/dp83640.c static int dp83640_ack_interrupt(struct phy_device *phydev) phydev 1265 drivers/net/phy/dp83640.c int err = phy_read(phydev, MII_DP83640_MISR); phydev 1273 drivers/net/phy/dp83640.c static int dp83640_config_intr(struct phy_device *phydev) phydev 1279 drivers/net/phy/dp83640.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 1280 drivers/net/phy/dp83640.c misr = phy_read(phydev, MII_DP83640_MISR); phydev 1288 drivers/net/phy/dp83640.c err = phy_write(phydev, MII_DP83640_MISR, misr); phydev 1292 drivers/net/phy/dp83640.c micr = phy_read(phydev, MII_DP83640_MICR); phydev 1298 drivers/net/phy/dp83640.c return phy_write(phydev, MII_DP83640_MICR, micr); phydev 1300 drivers/net/phy/dp83640.c micr = phy_read(phydev, MII_DP83640_MICR); phydev 1306 drivers/net/phy/dp83640.c err = phy_write(phydev, MII_DP83640_MICR, micr); phydev 1310 drivers/net/phy/dp83640.c misr = phy_read(phydev, MII_DP83640_MISR); phydev 1318 drivers/net/phy/dp83640.c return phy_write(phydev, MII_DP83640_MISR, misr); phydev 1322 drivers/net/phy/dp83640.c static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) phydev 1324 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 1400 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE5, PTP_TXCFG0, txcfg0); phydev 1401 drivers/net/phy/dp83640.c ext_write(0, phydev, PAGE5, PTP_RXCFG0, rxcfg0); phydev 1431 drivers/net/phy/dp83640.c static bool dp83640_rxtstamp(struct phy_device *phydev, phydev 1434 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 1480 drivers/net/phy/dp83640.c static void dp83640_txtstamp(struct phy_device *phydev, phydev 1484 drivers/net/phy/dp83640.c struct dp83640_private *dp83640 = phydev->priv; phydev 76 drivers/net/phy/dp83822.c static int dp83822_ack_interrupt(struct phy_device *phydev) phydev 80 drivers/net/phy/dp83822.c err = phy_read(phydev, MII_DP83822_MISR1); phydev 84 drivers/net/phy/dp83822.c err = phy_read(phydev, MII_DP83822_MISR2); phydev 91 drivers/net/phy/dp83822.c static int dp83822_set_wol(struct phy_device *phydev, phydev 94 drivers/net/phy/dp83822.c struct net_device *ndev = phydev->attached_dev; phydev 107 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_DA1, phydev 109 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_DA2, phydev 111 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_DA3, phydev 114 drivers/net/phy/dp83822.c value = phy_read_mmd(phydev, DP83822_DEVADDR, phydev 122 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, phydev 125 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, phydev 128 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, phydev 138 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG, phydev 141 drivers/net/phy/dp83822.c value = phy_read_mmd(phydev, DP83822_DEVADDR, phydev 144 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG, phydev 151 drivers/net/phy/dp83822.c static void dp83822_get_wol(struct phy_device *phydev, phydev 160 drivers/net/phy/dp83822.c value = phy_read_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG); phydev 166 drivers/net/phy/dp83822.c sopass_val = phy_read_mmd(phydev, DP83822_DEVADDR, phydev 171 drivers/net/phy/dp83822.c sopass_val = phy_read_mmd(phydev, DP83822_DEVADDR, phydev 176 drivers/net/phy/dp83822.c sopass_val = phy_read_mmd(phydev, DP83822_DEVADDR, phydev 189 drivers/net/phy/dp83822.c static int dp83822_config_intr(struct phy_device *phydev) phydev 195 drivers/net/phy/dp83822.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 196 drivers/net/phy/dp83822.c misr_status = phy_read(phydev, MII_DP83822_MISR1); phydev 209 drivers/net/phy/dp83822.c err = phy_write(phydev, MII_DP83822_MISR1, misr_status); phydev 213 drivers/net/phy/dp83822.c misr_status = phy_read(phydev, MII_DP83822_MISR2); phydev 226 drivers/net/phy/dp83822.c err = phy_write(phydev, MII_DP83822_MISR2, misr_status); phydev 230 drivers/net/phy/dp83822.c physcr_status = phy_read(phydev, MII_DP83822_PHYSCR); phydev 237 drivers/net/phy/dp83822.c err = phy_write(phydev, MII_DP83822_MISR1, 0); phydev 241 drivers/net/phy/dp83822.c err = phy_write(phydev, MII_DP83822_MISR1, 0); phydev 245 drivers/net/phy/dp83822.c physcr_status = phy_read(phydev, MII_DP83822_PHYSCR); phydev 252 drivers/net/phy/dp83822.c return phy_write(phydev, MII_DP83822_PHYSCR, physcr_status); phydev 255 drivers/net/phy/dp83822.c static int dp83822_config_init(struct phy_device *phydev) phydev 261 drivers/net/phy/dp83822.c return phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG, phydev 265 drivers/net/phy/dp83822.c static int dp83822_phy_reset(struct phy_device *phydev) phydev 269 drivers/net/phy/dp83822.c err = phy_write(phydev, MII_DP83822_RESET_CTRL, DP83822_HW_RESET); phydev 273 drivers/net/phy/dp83822.c dp83822_config_init(phydev); phydev 278 drivers/net/phy/dp83822.c static int dp83822_suspend(struct phy_device *phydev) phydev 282 drivers/net/phy/dp83822.c value = phy_read_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG); phydev 285 drivers/net/phy/dp83822.c genphy_suspend(phydev); phydev 290 drivers/net/phy/dp83822.c static int dp83822_resume(struct phy_device *phydev) phydev 294 drivers/net/phy/dp83822.c genphy_resume(phydev); phydev 296 drivers/net/phy/dp83822.c value = phy_read_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG); phydev 298 drivers/net/phy/dp83822.c phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG, value | phydev 40 drivers/net/phy/dp83848.c static int dp83848_ack_interrupt(struct phy_device *phydev) phydev 42 drivers/net/phy/dp83848.c int err = phy_read(phydev, DP83848_MISR); phydev 47 drivers/net/phy/dp83848.c static int dp83848_config_intr(struct phy_device *phydev) phydev 51 drivers/net/phy/dp83848.c control = phy_read(phydev, DP83848_MICR); phydev 55 drivers/net/phy/dp83848.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 59 drivers/net/phy/dp83848.c ret = phy_write(phydev, DP83848_MISR, DP83848_INT_EN_MASK); phydev 66 drivers/net/phy/dp83848.c return phy_write(phydev, DP83848_MICR, control); phydev 69 drivers/net/phy/dp83848.c static int dp83848_config_init(struct phy_device *phydev) phydev 76 drivers/net/phy/dp83848.c val = phy_read(phydev, MII_BMCR); phydev 78 drivers/net/phy/dp83848.c phydev->autoneg = AUTONEG_DISABLE; phydev 129 drivers/net/phy/dp83867.c static int dp83867_ack_interrupt(struct phy_device *phydev) phydev 131 drivers/net/phy/dp83867.c int err = phy_read(phydev, MII_DP83867_ISR); phydev 139 drivers/net/phy/dp83867.c static int dp83867_config_intr(struct phy_device *phydev) phydev 143 drivers/net/phy/dp83867.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 144 drivers/net/phy/dp83867.c micr_status = phy_read(phydev, MII_DP83867_MICR); phydev 156 drivers/net/phy/dp83867.c return phy_write(phydev, MII_DP83867_MICR, micr_status); phydev 160 drivers/net/phy/dp83867.c return phy_write(phydev, MII_DP83867_MICR, micr_status); phydev 163 drivers/net/phy/dp83867.c static int dp83867_config_port_mirroring(struct phy_device *phydev) phydev 166 drivers/net/phy/dp83867.c (struct dp83867_private *)phydev->priv; phydev 169 drivers/net/phy/dp83867.c phy_set_bits_mmd(phydev, DP83867_DEVADDR, DP83867_CFG4, phydev 172 drivers/net/phy/dp83867.c phy_clear_bits_mmd(phydev, DP83867_DEVADDR, DP83867_CFG4, phydev 178 drivers/net/phy/dp83867.c static int dp83867_of_init(struct phy_device *phydev) phydev 180 drivers/net/phy/dp83867.c struct dp83867_private *dp83867 = phydev->priv; phydev 181 drivers/net/phy/dp83867.c struct device *dev = &phydev->mdio.dev; phydev 199 drivers/net/phy/dp83867.c phydev_err(phydev, "ti,clk-output-sel value %u out of range\n", phydev 221 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII) { phydev 222 drivers/net/phy/dp83867.c const u16 val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_STRAP_STS2); phydev 230 drivers/net/phy/dp83867.c phydev_warn(phydev, phydev 236 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 237 drivers/net/phy/dp83867.c phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { phydev 241 drivers/net/phy/dp83867.c phydev_err(phydev, "ti,rx-internal-delay must be specified\n"); phydev 245 drivers/net/phy/dp83867.c phydev_err(phydev, phydev 253 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || phydev 254 drivers/net/phy/dp83867.c phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { phydev 258 drivers/net/phy/dp83867.c phydev_err(phydev, "ti,tx-internal-delay must be specified\n"); phydev 262 drivers/net/phy/dp83867.c phydev_err(phydev, phydev 278 drivers/net/phy/dp83867.c phydev_err(phydev, phydev 283 drivers/net/phy/dp83867.c phydev_err(phydev, phydev 291 drivers/net/phy/dp83867.c static int dp83867_of_init(struct phy_device *phydev) phydev 297 drivers/net/phy/dp83867.c static int dp83867_probe(struct phy_device *phydev) phydev 301 drivers/net/phy/dp83867.c dp83867 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83867), phydev 306 drivers/net/phy/dp83867.c phydev->priv = dp83867; phydev 311 drivers/net/phy/dp83867.c static int dp83867_config_init(struct phy_device *phydev) phydev 313 drivers/net/phy/dp83867.c struct dp83867_private *dp83867 = phydev->priv; phydev 317 drivers/net/phy/dp83867.c ret = dp83867_of_init(phydev); phydev 323 drivers/net/phy/dp83867.c phy_clear_bits_mmd(phydev, DP83867_DEVADDR, DP83867_CFG4, phydev 326 drivers/net/phy/dp83867.c bs = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_STRAP_STS2); phydev 332 drivers/net/phy/dp83867.c ret = phy_modify_mmd(phydev, DP83867_DEVADDR, phydev 340 drivers/net/phy/dp83867.c if (phy_interface_is_rgmii(phydev)) { phydev 341 drivers/net/phy/dp83867.c val = phy_read(phydev, MII_DP83867_PHYCTRL); phydev 357 drivers/net/phy/dp83867.c bs = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_STRAP_STS1); phydev 361 drivers/net/phy/dp83867.c ret = phy_write(phydev, MII_DP83867_PHYCTRL, val); phydev 372 drivers/net/phy/dp83867.c val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIICTL); phydev 375 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) phydev 378 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) phydev 381 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) phydev 384 drivers/net/phy/dp83867.c phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIICTL, val); phydev 389 drivers/net/phy/dp83867.c phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIIDCTL, phydev 395 drivers/net/phy/dp83867.c phy_modify_mmd(phydev, DP83867_DEVADDR, DP83867_IO_MUX_CFG, phydev 399 drivers/net/phy/dp83867.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 406 drivers/net/phy/dp83867.c ret = phy_modify_mmd(phydev, DP83867_DEVADDR, phydev 417 drivers/net/phy/dp83867.c ret = phy_modify_mmd(phydev, DP83867_DEVADDR, phydev 425 drivers/net/phy/dp83867.c val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL); phydev 434 drivers/net/phy/dp83867.c phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL, val); phydev 437 drivers/net/phy/dp83867.c val = phy_read(phydev, DP83867_CFG3); phydev 439 drivers/net/phy/dp83867.c if (phy_interrupt_is_valid(phydev)) phydev 443 drivers/net/phy/dp83867.c phy_write(phydev, DP83867_CFG3, val); phydev 446 drivers/net/phy/dp83867.c dp83867_config_port_mirroring(phydev); phydev 460 drivers/net/phy/dp83867.c phy_modify_mmd(phydev, DP83867_DEVADDR, DP83867_IO_MUX_CFG, phydev 467 drivers/net/phy/dp83867.c static int dp83867_phy_reset(struct phy_device *phydev) phydev 471 drivers/net/phy/dp83867.c err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESET); phydev 481 drivers/net/phy/dp83867.c return phy_modify(phydev, MII_DP83867_PHYCTRL, phydev 78 drivers/net/phy/dp83tc811.c static int dp83811_ack_interrupt(struct phy_device *phydev) phydev 82 drivers/net/phy/dp83tc811.c err = phy_read(phydev, MII_DP83811_INT_STAT1); phydev 86 drivers/net/phy/dp83tc811.c err = phy_read(phydev, MII_DP83811_INT_STAT2); phydev 90 drivers/net/phy/dp83tc811.c err = phy_read(phydev, MII_DP83811_INT_STAT3); phydev 97 drivers/net/phy/dp83tc811.c static int dp83811_set_wol(struct phy_device *phydev, phydev 100 drivers/net/phy/dp83tc811.c struct net_device *ndev = phydev->attached_dev; phydev 113 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_DA1, phydev 115 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_DA2, phydev 117 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_DA3, phydev 120 drivers/net/phy/dp83tc811.c value = phy_read_mmd(phydev, DP83811_DEVADDR, phydev 128 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, phydev 131 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, phydev 134 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, phydev 144 drivers/net/phy/dp83tc811.c phy_write_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_CFG, phydev 147 drivers/net/phy/dp83tc811.c phy_clear_bits_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_CFG, phydev 154 drivers/net/phy/dp83tc811.c static void dp83811_get_wol(struct phy_device *phydev, phydev 163 drivers/net/phy/dp83tc811.c value = phy_read_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_CFG); phydev 169 drivers/net/phy/dp83tc811.c sopass_val = phy_read_mmd(phydev, DP83811_DEVADDR, phydev 174 drivers/net/phy/dp83tc811.c sopass_val = phy_read_mmd(phydev, DP83811_DEVADDR, phydev 179 drivers/net/phy/dp83tc811.c sopass_val = phy_read_mmd(phydev, DP83811_DEVADDR, phydev 192 drivers/net/phy/dp83tc811.c static int dp83811_config_intr(struct phy_device *phydev) phydev 196 drivers/net/phy/dp83tc811.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 197 drivers/net/phy/dp83tc811.c misr_status = phy_read(phydev, MII_DP83811_INT_STAT1); phydev 210 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_INT_STAT1, misr_status); phydev 214 drivers/net/phy/dp83tc811.c misr_status = phy_read(phydev, MII_DP83811_INT_STAT2); phydev 225 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_INT_STAT2, misr_status); phydev 229 drivers/net/phy/dp83tc811.c misr_status = phy_read(phydev, MII_DP83811_INT_STAT3); phydev 237 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_INT_STAT3, misr_status); phydev 240 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_INT_STAT1, 0); phydev 244 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_INT_STAT2, 0); phydev 248 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_INT_STAT3, 0); phydev 254 drivers/net/phy/dp83tc811.c static int dp83811_config_aneg(struct phy_device *phydev) phydev 258 drivers/net/phy/dp83tc811.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 259 drivers/net/phy/dp83tc811.c value = phy_read(phydev, MII_DP83811_SGMII_CTRL); phydev 260 drivers/net/phy/dp83tc811.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 261 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_SGMII_CTRL, phydev 266 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_SGMII_CTRL, phydev 273 drivers/net/phy/dp83tc811.c return genphy_config_aneg(phydev); phydev 276 drivers/net/phy/dp83tc811.c static int dp83811_config_init(struct phy_device *phydev) phydev 280 drivers/net/phy/dp83tc811.c value = phy_read(phydev, MII_DP83811_SGMII_CTRL); phydev 281 drivers/net/phy/dp83tc811.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 282 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_SGMII_CTRL, phydev 285 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_SGMII_CTRL, phydev 295 drivers/net/phy/dp83tc811.c return phy_write_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_CFG, phydev 299 drivers/net/phy/dp83tc811.c static int dp83811_phy_reset(struct phy_device *phydev) phydev 303 drivers/net/phy/dp83tc811.c err = phy_write(phydev, MII_DP83811_RESET_CTRL, DP83811_HW_RESET); phydev 310 drivers/net/phy/dp83tc811.c static int dp83811_suspend(struct phy_device *phydev) phydev 314 drivers/net/phy/dp83tc811.c value = phy_read_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_CFG); phydev 317 drivers/net/phy/dp83tc811.c genphy_suspend(phydev); phydev 322 drivers/net/phy/dp83tc811.c static int dp83811_resume(struct phy_device *phydev) phydev 324 drivers/net/phy/dp83tc811.c genphy_resume(phydev); phydev 326 drivers/net/phy/dp83tc811.c phy_set_bits_mmd(phydev, DP83811_DEVADDR, MII_DP83811_WOL_CFG, phydev 47 drivers/net/phy/et1011c.c static int et1011c_config_aneg(struct phy_device *phydev) phydev 50 drivers/net/phy/et1011c.c ctl = phy_read(phydev, MII_BMCR); phydev 56 drivers/net/phy/et1011c.c phy_write(phydev, MII_BMCR, ctl | BMCR_RESET); phydev 58 drivers/net/phy/et1011c.c return genphy_config_aneg(phydev); phydev 61 drivers/net/phy/et1011c.c static int et1011c_read_status(struct phy_device *phydev) phydev 66 drivers/net/phy/et1011c.c ret = genphy_read_status(phydev); phydev 68 drivers/net/phy/et1011c.c if (speed != phydev->speed) { phydev 69 drivers/net/phy/et1011c.c speed = phydev->speed; phydev 70 drivers/net/phy/et1011c.c val = phy_read(phydev, ET1011C_STATUS_REG); phydev 73 drivers/net/phy/et1011c.c val = phy_read(phydev, ET1011C_CONFIG_REG); phydev 75 drivers/net/phy/et1011c.c phy_write(phydev, ET1011C_CONFIG_REG, val\ phydev 36 drivers/net/phy/fixed_phy.c struct phy_device *phydev; phydev 53 drivers/net/phy/fixed_phy.c struct phy_device *phydev = dev->phydev; phydev 56 drivers/net/phy/fixed_phy.c if (!phydev || !phydev->mdio.bus) phydev 60 drivers/net/phy/fixed_phy.c if (fp->addr == phydev->mdio.addr) { phydev 90 drivers/net/phy/fixed_phy.c fp->link_update(fp->phydev->attached_dev, phydev 115 drivers/net/phy/fixed_phy.c int fixed_phy_set_link_update(struct phy_device *phydev, phydev 122 drivers/net/phy/fixed_phy.c if (!phydev || !phydev->mdio.bus) phydev 126 drivers/net/phy/fixed_phy.c if (fp->addr == phydev->mdio.addr) { phydev 128 drivers/net/phy/fixed_phy.c fp->phydev = phydev; phydev 64 drivers/net/phy/icplus.c static int ip175c_config_init(struct phy_device *phydev) phydev 72 drivers/net/phy/icplus.c err = mdiobus_write(phydev->mdio.bus, 30, 0, 0x175c); phydev 77 drivers/net/phy/icplus.c err = mdiobus_read(phydev->mdio.bus, 30, 0); phydev 83 drivers/net/phy/icplus.c err = mdiobus_write(phydev->mdio.bus, 29, 31, 0x175c); phydev 88 drivers/net/phy/icplus.c err = mdiobus_write(phydev->mdio.bus, 29, 22, 0x420); phydev 94 drivers/net/phy/icplus.c err = mdiobus_write(phydev->mdio.bus, i, phydev 101 drivers/net/phy/icplus.c err = mdiobus_read(phydev->mdio.bus, i, MII_BMCR); phydev 108 drivers/net/phy/icplus.c if (phydev->mdio.addr != 4) { phydev 109 drivers/net/phy/icplus.c phydev->state = PHY_RUNNING; phydev 110 drivers/net/phy/icplus.c phydev->speed = SPEED_100; phydev 111 drivers/net/phy/icplus.c phydev->duplex = DUPLEX_FULL; phydev 112 drivers/net/phy/icplus.c phydev->link = 1; phydev 113 drivers/net/phy/icplus.c netif_carrier_on(phydev->attached_dev); phydev 119 drivers/net/phy/icplus.c static int ip1xx_reset(struct phy_device *phydev) phydev 124 drivers/net/phy/icplus.c bmcr = phy_read(phydev, MII_BMCR); phydev 128 drivers/net/phy/icplus.c bmcr = phy_write(phydev, MII_BMCR, bmcr); phydev 133 drivers/net/phy/icplus.c bmcr = phy_read(phydev, MII_BMCR); phydev 141 drivers/net/phy/icplus.c static int ip1001_config_init(struct phy_device *phydev) phydev 145 drivers/net/phy/icplus.c c = ip1xx_reset(phydev); phydev 150 drivers/net/phy/icplus.c c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2); phydev 154 drivers/net/phy/icplus.c c = phy_write(phydev, IP1001_SPEC_CTRL_STATUS_2, c); phydev 158 drivers/net/phy/icplus.c if (phy_interface_is_rgmii(phydev)) { phydev 160 drivers/net/phy/icplus.c c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); phydev 166 drivers/net/phy/icplus.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) phydev 168 drivers/net/phy/icplus.c else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) phydev 170 drivers/net/phy/icplus.c else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) phydev 173 drivers/net/phy/icplus.c c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); phydev 181 drivers/net/phy/icplus.c static int ip175c_read_status(struct phy_device *phydev) phydev 183 drivers/net/phy/icplus.c if (phydev->mdio.addr == 4) /* WAN port */ phydev 184 drivers/net/phy/icplus.c genphy_read_status(phydev); phydev 187 drivers/net/phy/icplus.c phydev->irq = PHY_IGNORE_INTERRUPT; phydev 192 drivers/net/phy/icplus.c static int ip175c_config_aneg(struct phy_device *phydev) phydev 194 drivers/net/phy/icplus.c if (phydev->mdio.addr == 4) /* WAN port */ phydev 195 drivers/net/phy/icplus.c genphy_config_aneg(phydev); phydev 200 drivers/net/phy/icplus.c static int ip101a_g_probe(struct phy_device *phydev) phydev 202 drivers/net/phy/icplus.c struct device *dev = &phydev->mdio.dev; phydev 226 drivers/net/phy/icplus.c phydev->priv = priv; phydev 231 drivers/net/phy/icplus.c static int ip101a_g_config_init(struct phy_device *phydev) phydev 233 drivers/net/phy/icplus.c struct ip101a_g_phy_priv *priv = phydev->priv; phydev 236 drivers/net/phy/icplus.c c = ip1xx_reset(phydev); phydev 243 drivers/net/phy/icplus.c err = phy_modify(phydev, IP101G_DIGITAL_IO_SPEC_CTRL, phydev 250 drivers/net/phy/icplus.c err = phy_modify(phydev, IP101G_DIGITAL_IO_SPEC_CTRL, phydev 269 drivers/net/phy/icplus.c c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); phydev 272 drivers/net/phy/icplus.c return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); phydev 275 drivers/net/phy/icplus.c static int ip101a_g_config_intr(struct phy_device *phydev) phydev 279 drivers/net/phy/icplus.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 285 drivers/net/phy/icplus.c return phy_write(phydev, IP101A_G_IRQ_CONF_STATUS, val); phydev 288 drivers/net/phy/icplus.c static int ip101a_g_did_interrupt(struct phy_device *phydev) phydev 290 drivers/net/phy/icplus.c int val = phy_read(phydev, IP101A_G_IRQ_CONF_STATUS); phydev 300 drivers/net/phy/icplus.c static int ip101a_g_ack_interrupt(struct phy_device *phydev) phydev 302 drivers/net/phy/icplus.c int err = phy_read(phydev, IP101A_G_IRQ_CONF_STATUS); phydev 148 drivers/net/phy/intel-xway.c static int xway_gphy_config_init(struct phy_device *phydev) phydev 155 drivers/net/phy/intel-xway.c err = phy_write(phydev, XWAY_MDIO_IMASK, 0); phydev 160 drivers/net/phy/intel-xway.c phy_read(phydev, XWAY_MDIO_ISTAT); phydev 162 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LEDCH, phydev 166 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LEDCL, phydev 179 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED0H, ledxh); phydev 180 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED0L, ledxl); phydev 181 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED1H, ledxh); phydev 182 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED1L, ledxl); phydev 183 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2H, ledxh); phydev 184 drivers/net/phy/intel-xway.c phy_write_mmd(phydev, MDIO_MMD_VEND2, XWAY_MMD_LED2L, ledxl); phydev 189 drivers/net/phy/intel-xway.c static int xway_gphy14_config_aneg(struct phy_device *phydev) phydev 195 drivers/net/phy/intel-xway.c reg = phy_read(phydev, MII_CTRL1000); phydev 197 drivers/net/phy/intel-xway.c err = phy_write(phydev, MII_CTRL1000, reg); phydev 201 drivers/net/phy/intel-xway.c return genphy_config_aneg(phydev); phydev 204 drivers/net/phy/intel-xway.c static int xway_gphy_ack_interrupt(struct phy_device *phydev) phydev 208 drivers/net/phy/intel-xway.c reg = phy_read(phydev, XWAY_MDIO_ISTAT); phydev 212 drivers/net/phy/intel-xway.c static int xway_gphy_did_interrupt(struct phy_device *phydev) phydev 216 drivers/net/phy/intel-xway.c reg = phy_read(phydev, XWAY_MDIO_ISTAT); phydev 220 drivers/net/phy/intel-xway.c static int xway_gphy_config_intr(struct phy_device *phydev) phydev 224 drivers/net/phy/intel-xway.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 227 drivers/net/phy/intel-xway.c return phy_write(phydev, XWAY_MDIO_IMASK, mask); phydev 59 drivers/net/phy/lxt.c static int lxt970_ack_interrupt(struct phy_device *phydev) phydev 63 drivers/net/phy/lxt.c err = phy_read(phydev, MII_BMSR); phydev 68 drivers/net/phy/lxt.c err = phy_read(phydev, MII_LXT970_ISR); phydev 76 drivers/net/phy/lxt.c static int lxt970_config_intr(struct phy_device *phydev) phydev 78 drivers/net/phy/lxt.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 79 drivers/net/phy/lxt.c return phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN); phydev 81 drivers/net/phy/lxt.c return phy_write(phydev, MII_LXT970_IER, 0); phydev 84 drivers/net/phy/lxt.c static int lxt970_config_init(struct phy_device *phydev) phydev 86 drivers/net/phy/lxt.c return phy_write(phydev, MII_LXT970_CONFIG, 0); phydev 90 drivers/net/phy/lxt.c static int lxt971_ack_interrupt(struct phy_device *phydev) phydev 92 drivers/net/phy/lxt.c int err = phy_read(phydev, MII_LXT971_ISR); phydev 100 drivers/net/phy/lxt.c static int lxt971_config_intr(struct phy_device *phydev) phydev 102 drivers/net/phy/lxt.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 103 drivers/net/phy/lxt.c return phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN); phydev 105 drivers/net/phy/lxt.c return phy_write(phydev, MII_LXT971_IER, 0); phydev 113 drivers/net/phy/lxt.c static int lxt973a2_update_link(struct phy_device *phydev) phydev 120 drivers/net/phy/lxt.c status = phy_read(phydev, MII_BMSR); phydev 125 drivers/net/phy/lxt.c control = phy_read(phydev, MII_BMCR); phydev 131 drivers/net/phy/lxt.c status = phy_read(phydev, MII_BMSR); phydev 138 drivers/net/phy/lxt.c phydev->link = 0; phydev 140 drivers/net/phy/lxt.c phydev->link = 1; phydev 145 drivers/net/phy/lxt.c static int lxt973a2_read_status(struct phy_device *phydev) phydev 152 drivers/net/phy/lxt.c err = lxt973a2_update_link(phydev); phydev 156 drivers/net/phy/lxt.c if (AUTONEG_ENABLE == phydev->autoneg) { phydev 159 drivers/net/phy/lxt.c adv = phy_read(phydev, MII_ADVERTISE); phydev 165 drivers/net/phy/lxt.c lpa = phy_read(phydev, MII_LPA); phydev 175 drivers/net/phy/lxt.c mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, lpa); phydev 179 drivers/net/phy/lxt.c phydev->speed = SPEED_10; phydev 180 drivers/net/phy/lxt.c phydev->duplex = DUPLEX_HALF; phydev 181 drivers/net/phy/lxt.c phydev->pause = phydev->asym_pause = 0; phydev 184 drivers/net/phy/lxt.c phydev->speed = SPEED_100; phydev 187 drivers/net/phy/lxt.c phydev->duplex = DUPLEX_FULL; phydev 190 drivers/net/phy/lxt.c phydev->duplex = DUPLEX_FULL; phydev 193 drivers/net/phy/lxt.c if (phydev->duplex == DUPLEX_FULL) { phydev 194 drivers/net/phy/lxt.c phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0; phydev 195 drivers/net/phy/lxt.c phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0; phydev 198 drivers/net/phy/lxt.c int bmcr = phy_read(phydev, MII_BMCR); phydev 204 drivers/net/phy/lxt.c phydev->duplex = DUPLEX_FULL; phydev 206 drivers/net/phy/lxt.c phydev->duplex = DUPLEX_HALF; phydev 209 drivers/net/phy/lxt.c phydev->speed = SPEED_1000; phydev 211 drivers/net/phy/lxt.c phydev->speed = SPEED_100; phydev 213 drivers/net/phy/lxt.c phydev->speed = SPEED_10; phydev 215 drivers/net/phy/lxt.c phydev->pause = phydev->asym_pause = 0; phydev 216 drivers/net/phy/lxt.c linkmode_zero(phydev->lp_advertising); phydev 222 drivers/net/phy/lxt.c static int lxt973_probe(struct phy_device *phydev) phydev 224 drivers/net/phy/lxt.c int val = phy_read(phydev, MII_LXT973_PCR); phydev 231 drivers/net/phy/lxt.c val = phy_read(phydev, MII_BMCR); phydev 234 drivers/net/phy/lxt.c phy_write(phydev, MII_BMCR, val); phydev 236 drivers/net/phy/lxt.c phydev->priv = lxt973_probe; phydev 238 drivers/net/phy/lxt.c phydev->priv = NULL; phydev 243 drivers/net/phy/lxt.c static int lxt973_config_aneg(struct phy_device *phydev) phydev 246 drivers/net/phy/lxt.c return phydev->priv ? 0 : genphy_config_aneg(phydev); phydev 197 drivers/net/phy/marvell.c static int marvell_read_page(struct phy_device *phydev) phydev 199 drivers/net/phy/marvell.c return __phy_read(phydev, MII_MARVELL_PHY_PAGE); phydev 202 drivers/net/phy/marvell.c static int marvell_write_page(struct phy_device *phydev, int page) phydev 204 drivers/net/phy/marvell.c return __phy_write(phydev, MII_MARVELL_PHY_PAGE, page); phydev 207 drivers/net/phy/marvell.c static int marvell_set_page(struct phy_device *phydev, int page) phydev 209 drivers/net/phy/marvell.c return phy_write(phydev, MII_MARVELL_PHY_PAGE, page); phydev 212 drivers/net/phy/marvell.c static int marvell_ack_interrupt(struct phy_device *phydev) phydev 217 drivers/net/phy/marvell.c err = phy_read(phydev, MII_M1011_IEVENT); phydev 225 drivers/net/phy/marvell.c static int marvell_config_intr(struct phy_device *phydev) phydev 229 drivers/net/phy/marvell.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 230 drivers/net/phy/marvell.c err = phy_write(phydev, MII_M1011_IMASK, phydev 233 drivers/net/phy/marvell.c err = phy_write(phydev, MII_M1011_IMASK, phydev 239 drivers/net/phy/marvell.c static int marvell_set_polarity(struct phy_device *phydev, int polarity) phydev 246 drivers/net/phy/marvell.c reg = phy_read(phydev, MII_M1011_PHY_SCR); phydev 268 drivers/net/phy/marvell.c err = phy_write(phydev, MII_M1011_PHY_SCR, val); phydev 276 drivers/net/phy/marvell.c static int marvell_set_downshift(struct phy_device *phydev, bool enable, phydev 281 drivers/net/phy/marvell.c reg = phy_read(phydev, MII_M1011_PHY_SCR); phydev 290 drivers/net/phy/marvell.c return phy_write(phydev, MII_M1011_PHY_SCR, reg); phydev 293 drivers/net/phy/marvell.c static int marvell_config_aneg(struct phy_device *phydev) phydev 298 drivers/net/phy/marvell.c err = marvell_set_polarity(phydev, phydev->mdix_ctrl); phydev 304 drivers/net/phy/marvell.c err = phy_write(phydev, MII_M1111_PHY_LED_CONTROL, phydev 309 drivers/net/phy/marvell.c err = genphy_config_aneg(phydev); phydev 313 drivers/net/phy/marvell.c if (phydev->autoneg != AUTONEG_ENABLE || changed) { phydev 318 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 326 drivers/net/phy/marvell.c static int m88e1101_config_aneg(struct phy_device *phydev) phydev 334 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 338 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1d, 0x1f); phydev 342 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1e, 0x200c); phydev 346 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1d, 0x5); phydev 350 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1e, 0); phydev 354 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1e, 0x100); phydev 358 drivers/net/phy/marvell.c return marvell_config_aneg(phydev); phydev 375 drivers/net/phy/marvell.c static int marvell_of_reg_init(struct phy_device *phydev) phydev 380 drivers/net/phy/marvell.c if (!phydev->mdio.dev.of_node) phydev 383 drivers/net/phy/marvell.c paddr = of_get_property(phydev->mdio.dev.of_node, phydev 388 drivers/net/phy/marvell.c saved_page = phy_save_page(phydev); phydev 403 drivers/net/phy/marvell.c ret = marvell_write_page(phydev, page); phydev 410 drivers/net/phy/marvell.c val = __phy_read(phydev, reg); phydev 419 drivers/net/phy/marvell.c ret = __phy_write(phydev, reg, val); phydev 424 drivers/net/phy/marvell.c return phy_restore_page(phydev, saved_page, ret); phydev 427 drivers/net/phy/marvell.c static int marvell_of_reg_init(struct phy_device *phydev) phydev 433 drivers/net/phy/marvell.c static int m88e1121_config_aneg_rgmii_delays(struct phy_device *phydev) phydev 437 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) phydev 440 drivers/net/phy/marvell.c else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) phydev 442 drivers/net/phy/marvell.c else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) phydev 447 drivers/net/phy/marvell.c return phy_modify_paged(phydev, MII_MARVELL_MSCR_PAGE, phydev 452 drivers/net/phy/marvell.c static int m88e1121_config_aneg(struct phy_device *phydev) phydev 457 drivers/net/phy/marvell.c if (phy_interface_is_rgmii(phydev)) { phydev 458 drivers/net/phy/marvell.c err = m88e1121_config_aneg_rgmii_delays(phydev); phydev 463 drivers/net/phy/marvell.c err = marvell_set_polarity(phydev, phydev->mdix_ctrl); phydev 469 drivers/net/phy/marvell.c err = genphy_config_aneg(phydev); phydev 473 drivers/net/phy/marvell.c if (phydev->autoneg != AUTONEG_ENABLE || changed) { phydev 477 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 485 drivers/net/phy/marvell.c static int m88e1318_config_aneg(struct phy_device *phydev) phydev 489 drivers/net/phy/marvell.c err = phy_modify_paged(phydev, MII_MARVELL_MSCR_PAGE, phydev 495 drivers/net/phy/marvell.c return m88e1121_config_aneg(phydev); phydev 534 drivers/net/phy/marvell.c static int marvell_config_aneg_fiber(struct phy_device *phydev) phydev 540 drivers/net/phy/marvell.c if (phydev->autoneg != AUTONEG_ENABLE) phydev 541 drivers/net/phy/marvell.c return genphy_setup_forced(phydev); phydev 544 drivers/net/phy/marvell.c linkmode_and(phydev->advertising, phydev->advertising, phydev 545 drivers/net/phy/marvell.c phydev->supported); phydev 548 drivers/net/phy/marvell.c adv = phy_read(phydev, MII_ADVERTISE); phydev 555 drivers/net/phy/marvell.c adv |= linkmode_adv_to_fiber_adv_t(phydev->advertising); phydev 558 drivers/net/phy/marvell.c err = phy_write(phydev, MII_ADVERTISE, adv); phydev 569 drivers/net/phy/marvell.c int ctl = phy_read(phydev, MII_BMCR); phydev 582 drivers/net/phy/marvell.c changed = genphy_restart_aneg(phydev); phydev 587 drivers/net/phy/marvell.c static int m88e1510_config_aneg(struct phy_device *phydev) phydev 591 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 596 drivers/net/phy/marvell.c err = m88e1318_config_aneg(phydev); phydev 601 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) phydev 605 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); phydev 609 drivers/net/phy/marvell.c err = marvell_config_aneg_fiber(phydev); phydev 613 drivers/net/phy/marvell.c return marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 616 drivers/net/phy/marvell.c marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 620 drivers/net/phy/marvell.c static void marvell_config_led(struct phy_device *phydev) phydev 625 drivers/net/phy/marvell.c switch (MARVELL_PHY_FAMILY_ID(phydev->phy_id)) { phydev 637 drivers/net/phy/marvell.c if (phydev->dev_flags & MARVELL_PHY_LED0_LINK_LED1_ACTIVE) phydev 646 drivers/net/phy/marvell.c err = phy_write_paged(phydev, MII_MARVELL_LED_PAGE, MII_PHY_LED_CTRL, phydev 649 drivers/net/phy/marvell.c phydev_warn(phydev, "Fail to config marvell phy LED.\n"); phydev 652 drivers/net/phy/marvell.c static int marvell_config_init(struct phy_device *phydev) phydev 655 drivers/net/phy/marvell.c marvell_config_led(phydev); phydev 658 drivers/net/phy/marvell.c return marvell_of_reg_init(phydev); phydev 661 drivers/net/phy/marvell.c static int m88e1116r_config_init(struct phy_device *phydev) phydev 665 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 671 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 675 drivers/net/phy/marvell.c err = marvell_set_polarity(phydev, phydev->mdix_ctrl); phydev 679 drivers/net/phy/marvell.c err = marvell_set_downshift(phydev, true, 8); phydev 683 drivers/net/phy/marvell.c if (phy_interface_is_rgmii(phydev)) { phydev 684 drivers/net/phy/marvell.c err = m88e1121_config_aneg_rgmii_delays(phydev); phydev 689 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 693 drivers/net/phy/marvell.c return marvell_config_init(phydev); phydev 696 drivers/net/phy/marvell.c static int m88e3016_config_init(struct phy_device *phydev) phydev 701 drivers/net/phy/marvell.c ret = phy_modify(phydev, MII_88E3016_PHY_SPEC_CTRL, phydev 707 drivers/net/phy/marvell.c return marvell_config_init(phydev); phydev 710 drivers/net/phy/marvell.c static int m88e1111_config_init_hwcfg_mode(struct phy_device *phydev, phydev 717 drivers/net/phy/marvell.c return phy_modify(phydev, MII_M1111_PHY_EXT_SR, phydev 724 drivers/net/phy/marvell.c static int m88e1111_config_init_rgmii_delays(struct phy_device *phydev) phydev 728 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { phydev 730 drivers/net/phy/marvell.c } else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) { phydev 732 drivers/net/phy/marvell.c } else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) { phydev 738 drivers/net/phy/marvell.c return phy_modify(phydev, MII_M1111_PHY_EXT_CR, phydev 743 drivers/net/phy/marvell.c static int m88e1111_config_init_rgmii(struct phy_device *phydev) phydev 748 drivers/net/phy/marvell.c err = m88e1111_config_init_rgmii_delays(phydev); phydev 752 drivers/net/phy/marvell.c temp = phy_read(phydev, MII_M1111_PHY_EXT_SR); phydev 763 drivers/net/phy/marvell.c return phy_write(phydev, MII_M1111_PHY_EXT_SR, temp); phydev 766 drivers/net/phy/marvell.c static int m88e1111_config_init_sgmii(struct phy_device *phydev) phydev 771 drivers/net/phy/marvell.c phydev, phydev 778 drivers/net/phy/marvell.c return marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 781 drivers/net/phy/marvell.c static int m88e1111_config_init_rtbi(struct phy_device *phydev) phydev 785 drivers/net/phy/marvell.c err = m88e1111_config_init_rgmii_delays(phydev); phydev 790 drivers/net/phy/marvell.c phydev, phydev 797 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 802 drivers/net/phy/marvell.c phydev, phydev 807 drivers/net/phy/marvell.c static int m88e1111_config_init(struct phy_device *phydev) phydev 811 drivers/net/phy/marvell.c if (phy_interface_is_rgmii(phydev)) { phydev 812 drivers/net/phy/marvell.c err = m88e1111_config_init_rgmii(phydev); phydev 817 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 818 drivers/net/phy/marvell.c err = m88e1111_config_init_sgmii(phydev); phydev 823 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_RTBI) { phydev 824 drivers/net/phy/marvell.c err = m88e1111_config_init_rtbi(phydev); phydev 829 drivers/net/phy/marvell.c err = marvell_of_reg_init(phydev); phydev 833 drivers/net/phy/marvell.c return genphy_soft_reset(phydev); phydev 836 drivers/net/phy/marvell.c static int m88e1318_config_init(struct phy_device *phydev) phydev 838 drivers/net/phy/marvell.c if (phy_interrupt_is_valid(phydev)) { phydev 840 drivers/net/phy/marvell.c phydev, MII_MARVELL_LED_PAGE, phydev 849 drivers/net/phy/marvell.c return marvell_config_init(phydev); phydev 852 drivers/net/phy/marvell.c static int m88e1510_config_init(struct phy_device *phydev) phydev 857 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 859 drivers/net/phy/marvell.c err = marvell_set_page(phydev, 18); phydev 864 drivers/net/phy/marvell.c err = phy_modify(phydev, MII_88E1510_GEN_CTRL_REG_1, phydev 871 drivers/net/phy/marvell.c err = phy_modify(phydev, MII_88E1510_GEN_CTRL_REG_1, 0, phydev 877 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 882 drivers/net/phy/marvell.c return m88e1318_config_init(phydev); phydev 885 drivers/net/phy/marvell.c static int m88e1118_config_aneg(struct phy_device *phydev) phydev 889 drivers/net/phy/marvell.c err = genphy_soft_reset(phydev); phydev 893 drivers/net/phy/marvell.c err = marvell_set_polarity(phydev, phydev->mdix_ctrl); phydev 897 drivers/net/phy/marvell.c err = genphy_config_aneg(phydev); phydev 901 drivers/net/phy/marvell.c static int m88e1118_config_init(struct phy_device *phydev) phydev 906 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_MSCR_PAGE); phydev 911 drivers/net/phy/marvell.c err = phy_write(phydev, 0x15, 0x1070); phydev 916 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_LED_PAGE); phydev 921 drivers/net/phy/marvell.c if (phydev->dev_flags & MARVELL_PHY_M1118_DNS323_LEDS) phydev 922 drivers/net/phy/marvell.c err = phy_write(phydev, 0x10, 0x1100); phydev 924 drivers/net/phy/marvell.c err = phy_write(phydev, 0x10, 0x021e); phydev 928 drivers/net/phy/marvell.c err = marvell_of_reg_init(phydev); phydev 933 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 937 drivers/net/phy/marvell.c return genphy_soft_reset(phydev); phydev 940 drivers/net/phy/marvell.c static int m88e1149_config_init(struct phy_device *phydev) phydev 945 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_MSCR_PAGE); phydev 950 drivers/net/phy/marvell.c err = phy_write(phydev, 0x15, 0x1048); phydev 954 drivers/net/phy/marvell.c err = marvell_of_reg_init(phydev); phydev 959 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 963 drivers/net/phy/marvell.c return genphy_soft_reset(phydev); phydev 966 drivers/net/phy/marvell.c static int m88e1145_config_init_rgmii(struct phy_device *phydev) phydev 970 drivers/net/phy/marvell.c err = m88e1111_config_init_rgmii_delays(phydev); phydev 974 drivers/net/phy/marvell.c if (phydev->dev_flags & MARVELL_PHY_M1145_FLAGS_RESISTANCE) { phydev 975 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1d, 0x0012); phydev 979 drivers/net/phy/marvell.c err = phy_modify(phydev, 0x1e, 0x0fc0, phydev 985 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1d, 0x3); phydev 989 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1e, 0x8000); phydev 994 drivers/net/phy/marvell.c static int m88e1145_config_init_sgmii(struct phy_device *phydev) phydev 997 drivers/net/phy/marvell.c phydev, MII_M1111_HWCFG_MODE_SGMII_NO_CLK, phydev 1001 drivers/net/phy/marvell.c static int m88e1145_config_init(struct phy_device *phydev) phydev 1006 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1d, 0x001b); phydev 1010 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1e, 0x418f); phydev 1014 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1d, 0x0016); phydev 1018 drivers/net/phy/marvell.c err = phy_write(phydev, 0x1e, 0xa2da); phydev 1022 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { phydev 1023 drivers/net/phy/marvell.c err = m88e1145_config_init_rgmii(phydev); phydev 1028 drivers/net/phy/marvell.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 1029 drivers/net/phy/marvell.c err = m88e1145_config_init_sgmii(phydev); phydev 1034 drivers/net/phy/marvell.c err = marvell_of_reg_init(phydev); phydev 1041 drivers/net/phy/marvell.c static int m88e1540_get_fld(struct phy_device *phydev, u8 *msecs) phydev 1045 drivers/net/phy/marvell.c val = phy_read(phydev, MII_88E1540_COPPER_CTRL3); phydev 1076 drivers/net/phy/marvell.c static int m88e1540_set_fld(struct phy_device *phydev, const u8 *msecs) phydev 1082 drivers/net/phy/marvell.c return phy_clear_bits(phydev, MII_88E1540_COPPER_CTRL3, phydev 1088 drivers/net/phy/marvell.c ret = phy_ethtool_get_eee(phydev, &eee); phydev 1090 drivers/net/phy/marvell.c phydev_warn(phydev, "Fast Link Down detection requires EEE to be disabled!\n"); phydev 1105 drivers/net/phy/marvell.c ret = phy_modify(phydev, MII_88E1540_COPPER_CTRL3, phydev 1110 drivers/net/phy/marvell.c return phy_set_bits(phydev, MII_88E1540_COPPER_CTRL3, phydev 1114 drivers/net/phy/marvell.c static int m88e1540_get_tunable(struct phy_device *phydev, phydev 1119 drivers/net/phy/marvell.c return m88e1540_get_fld(phydev, data); phydev 1125 drivers/net/phy/marvell.c static int m88e1540_set_tunable(struct phy_device *phydev, phydev 1130 drivers/net/phy/marvell.c return m88e1540_set_fld(phydev, data); phydev 1140 drivers/net/phy/marvell.c static int m88e6390_errata(struct phy_device *phydev) phydev 1144 drivers/net/phy/marvell.c err = phy_write(phydev, MII_BMCR, phydev 1151 drivers/net/phy/marvell.c err = phy_write_paged(phydev, 0xf8, 0x08, 0x36); phydev 1155 drivers/net/phy/marvell.c return genphy_soft_reset(phydev); phydev 1158 drivers/net/phy/marvell.c static int m88e6390_config_aneg(struct phy_device *phydev) phydev 1162 drivers/net/phy/marvell.c err = m88e6390_errata(phydev); phydev 1166 drivers/net/phy/marvell.c return m88e1510_config_aneg(phydev); phydev 1194 drivers/net/phy/marvell.c static int marvell_update_link(struct phy_device *phydev, int fiber) phydev 1202 drivers/net/phy/marvell.c status = phy_read(phydev, MII_M1011_PHY_STATUS); phydev 1207 drivers/net/phy/marvell.c phydev->link = 0; phydev 1209 drivers/net/phy/marvell.c phydev->link = 1; phydev 1211 drivers/net/phy/marvell.c return genphy_update_link(phydev); phydev 1217 drivers/net/phy/marvell.c static int marvell_read_status_page_an(struct phy_device *phydev, phydev 1224 drivers/net/phy/marvell.c status = phy_read(phydev, MII_M1011_PHY_STATUS); phydev 1228 drivers/net/phy/marvell.c lpa = phy_read(phydev, MII_LPA); phydev 1232 drivers/net/phy/marvell.c lpagb = phy_read(phydev, MII_STAT1000); phydev 1237 drivers/net/phy/marvell.c phydev->duplex = DUPLEX_FULL; phydev 1239 drivers/net/phy/marvell.c phydev->duplex = DUPLEX_HALF; phydev 1242 drivers/net/phy/marvell.c phydev->pause = 0; phydev 1243 drivers/net/phy/marvell.c phydev->asym_pause = 0; phydev 1247 drivers/net/phy/marvell.c phydev->speed = SPEED_1000; phydev 1251 drivers/net/phy/marvell.c phydev->speed = SPEED_100; phydev 1255 drivers/net/phy/marvell.c phydev->speed = SPEED_10; phydev 1260 drivers/net/phy/marvell.c mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, lpa); phydev 1261 drivers/net/phy/marvell.c mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, lpagb); phydev 1263 drivers/net/phy/marvell.c if (phydev->duplex == DUPLEX_FULL) { phydev 1264 drivers/net/phy/marvell.c phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0; phydev 1265 drivers/net/phy/marvell.c phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0; phydev 1269 drivers/net/phy/marvell.c fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); phydev 1271 drivers/net/phy/marvell.c if (phydev->duplex == DUPLEX_FULL) { phydev 1273 drivers/net/phy/marvell.c phydev->pause = 0; phydev 1274 drivers/net/phy/marvell.c phydev->asym_pause = 0; phydev 1276 drivers/net/phy/marvell.c phydev->pause = 1; phydev 1277 drivers/net/phy/marvell.c phydev->asym_pause = 1; phydev 1279 drivers/net/phy/marvell.c phydev->pause = 1; phydev 1280 drivers/net/phy/marvell.c phydev->asym_pause = 0; phydev 1287 drivers/net/phy/marvell.c static int marvell_read_status_page_fixed(struct phy_device *phydev) phydev 1289 drivers/net/phy/marvell.c int bmcr = phy_read(phydev, MII_BMCR); phydev 1295 drivers/net/phy/marvell.c phydev->duplex = DUPLEX_FULL; phydev 1297 drivers/net/phy/marvell.c phydev->duplex = DUPLEX_HALF; phydev 1300 drivers/net/phy/marvell.c phydev->speed = SPEED_1000; phydev 1302 drivers/net/phy/marvell.c phydev->speed = SPEED_100; phydev 1304 drivers/net/phy/marvell.c phydev->speed = SPEED_10; phydev 1306 drivers/net/phy/marvell.c phydev->pause = 0; phydev 1307 drivers/net/phy/marvell.c phydev->asym_pause = 0; phydev 1308 drivers/net/phy/marvell.c linkmode_zero(phydev->lp_advertising); phydev 1321 drivers/net/phy/marvell.c static int marvell_read_status_page(struct phy_device *phydev, int page) phydev 1334 drivers/net/phy/marvell.c err = marvell_update_link(phydev, fiber); phydev 1338 drivers/net/phy/marvell.c if (phydev->autoneg == AUTONEG_ENABLE) phydev 1339 drivers/net/phy/marvell.c err = marvell_read_status_page_an(phydev, fiber); phydev 1341 drivers/net/phy/marvell.c err = marvell_read_status_page_fixed(phydev); phydev 1355 drivers/net/phy/marvell.c static int marvell_read_status(struct phy_device *phydev) phydev 1361 drivers/net/phy/marvell.c phydev->supported) && phydev 1362 drivers/net/phy/marvell.c phydev->interface != PHY_INTERFACE_MODE_SGMII) { phydev 1363 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); phydev 1367 drivers/net/phy/marvell.c err = marvell_read_status_page(phydev, MII_MARVELL_FIBER_PAGE); phydev 1378 drivers/net/phy/marvell.c if (phydev->link) phydev 1382 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1387 drivers/net/phy/marvell.c return marvell_read_status_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1390 drivers/net/phy/marvell.c marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1399 drivers/net/phy/marvell.c static int marvell_suspend(struct phy_device *phydev) phydev 1405 drivers/net/phy/marvell.c phydev->supported)) { phydev 1406 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); phydev 1411 drivers/net/phy/marvell.c err = genphy_suspend(phydev); phydev 1416 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1422 drivers/net/phy/marvell.c return genphy_suspend(phydev); phydev 1425 drivers/net/phy/marvell.c marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1434 drivers/net/phy/marvell.c static int marvell_resume(struct phy_device *phydev) phydev 1440 drivers/net/phy/marvell.c phydev->supported)) { phydev 1441 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE); phydev 1446 drivers/net/phy/marvell.c err = genphy_resume(phydev); phydev 1451 drivers/net/phy/marvell.c err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1457 drivers/net/phy/marvell.c return genphy_resume(phydev); phydev 1460 drivers/net/phy/marvell.c marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1464 drivers/net/phy/marvell.c static int marvell_aneg_done(struct phy_device *phydev) phydev 1466 drivers/net/phy/marvell.c int retval = phy_read(phydev, MII_M1011_PHY_STATUS); phydev 1471 drivers/net/phy/marvell.c static int m88e1121_did_interrupt(struct phy_device *phydev) phydev 1475 drivers/net/phy/marvell.c imask = phy_read(phydev, MII_M1011_IEVENT); phydev 1483 drivers/net/phy/marvell.c static void m88e1318_get_wol(struct phy_device *phydev, phydev 1491 drivers/net/phy/marvell.c oldpage = phy_select_page(phydev, MII_MARVELL_WOL_PAGE); phydev 1495 drivers/net/phy/marvell.c ret = __phy_read(phydev, MII_88E1318S_PHY_WOL_CTRL); phydev 1500 drivers/net/phy/marvell.c phy_restore_page(phydev, oldpage, ret); phydev 1503 drivers/net/phy/marvell.c static int m88e1318_set_wol(struct phy_device *phydev, phydev 1508 drivers/net/phy/marvell.c oldpage = phy_save_page(phydev); phydev 1514 drivers/net/phy/marvell.c err = marvell_write_page(phydev, MII_MARVELL_COPPER_PAGE); phydev 1524 drivers/net/phy/marvell.c if (!phy_interrupt_is_valid(phydev)) phydev 1525 drivers/net/phy/marvell.c __phy_read(phydev, MII_M1011_IEVENT); phydev 1528 drivers/net/phy/marvell.c err = __phy_modify(phydev, MII_88E1318S_PHY_CSIER, 0, phydev 1533 drivers/net/phy/marvell.c err = marvell_write_page(phydev, MII_MARVELL_LED_PAGE); phydev 1538 drivers/net/phy/marvell.c err = __phy_modify(phydev, MII_88E1318S_PHY_LED_TCR, phydev 1545 drivers/net/phy/marvell.c err = marvell_write_page(phydev, MII_MARVELL_WOL_PAGE); phydev 1550 drivers/net/phy/marvell.c err = __phy_write(phydev, MII_88E1318S_PHY_MAGIC_PACKET_WORD2, phydev 1551 drivers/net/phy/marvell.c ((phydev->attached_dev->dev_addr[5] << 8) | phydev 1552 drivers/net/phy/marvell.c phydev->attached_dev->dev_addr[4])); phydev 1555 drivers/net/phy/marvell.c err = __phy_write(phydev, MII_88E1318S_PHY_MAGIC_PACKET_WORD1, phydev 1556 drivers/net/phy/marvell.c ((phydev->attached_dev->dev_addr[3] << 8) | phydev 1557 drivers/net/phy/marvell.c phydev->attached_dev->dev_addr[2])); phydev 1560 drivers/net/phy/marvell.c err = __phy_write(phydev, MII_88E1318S_PHY_MAGIC_PACKET_WORD0, phydev 1561 drivers/net/phy/marvell.c ((phydev->attached_dev->dev_addr[1] << 8) | phydev 1562 drivers/net/phy/marvell.c phydev->attached_dev->dev_addr[0])); phydev 1567 drivers/net/phy/marvell.c err = __phy_modify(phydev, MII_88E1318S_PHY_WOL_CTRL, 0, phydev 1573 drivers/net/phy/marvell.c err = marvell_write_page(phydev, MII_MARVELL_WOL_PAGE); phydev 1578 drivers/net/phy/marvell.c err = __phy_modify(phydev, MII_88E1318S_PHY_WOL_CTRL, phydev 1586 drivers/net/phy/marvell.c return phy_restore_page(phydev, oldpage, err); phydev 1589 drivers/net/phy/marvell.c static int marvell_get_sset_count(struct phy_device *phydev) phydev 1592 drivers/net/phy/marvell.c phydev->supported)) phydev 1598 drivers/net/phy/marvell.c static void marvell_get_strings(struct phy_device *phydev, u8 *data) phydev 1600 drivers/net/phy/marvell.c int count = marvell_get_sset_count(phydev); phydev 1609 drivers/net/phy/marvell.c static u64 marvell_get_stat(struct phy_device *phydev, int i) phydev 1612 drivers/net/phy/marvell.c struct marvell_priv *priv = phydev->priv; phydev 1616 drivers/net/phy/marvell.c val = phy_read_paged(phydev, stat.page, stat.reg); phydev 1628 drivers/net/phy/marvell.c static void marvell_get_stats(struct phy_device *phydev, phydev 1631 drivers/net/phy/marvell.c int count = marvell_get_sset_count(phydev); phydev 1635 drivers/net/phy/marvell.c data[i] = marvell_get_stat(phydev, i); phydev 1639 drivers/net/phy/marvell.c static int m88e1121_get_temp(struct phy_device *phydev, long *temp) phydev 1647 drivers/net/phy/marvell.c oldpage = phy_select_page(phydev, MII_MARVELL_MISC_TEST_PAGE); phydev 1652 drivers/net/phy/marvell.c ret = __phy_read(phydev, MII_88E1121_MISC_TEST); phydev 1656 drivers/net/phy/marvell.c ret = __phy_write(phydev, MII_88E1121_MISC_TEST, phydev 1664 drivers/net/phy/marvell.c val = __phy_read(phydev, MII_88E1121_MISC_TEST); phydev 1671 drivers/net/phy/marvell.c ret = __phy_write(phydev, MII_88E1121_MISC_TEST, phydev 1679 drivers/net/phy/marvell.c return phy_restore_page(phydev, oldpage, ret); phydev 1686 drivers/net/phy/marvell.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 1691 drivers/net/phy/marvell.c err = m88e1121_get_temp(phydev, temp); phydev 1751 drivers/net/phy/marvell.c static int m88e1510_get_temp(struct phy_device *phydev, long *temp) phydev 1757 drivers/net/phy/marvell.c ret = phy_read_paged(phydev, MII_MARVELL_MISC_TEST_PAGE, phydev 1767 drivers/net/phy/marvell.c static int m88e1510_get_temp_critical(struct phy_device *phydev, long *temp) phydev 1773 drivers/net/phy/marvell.c ret = phy_read_paged(phydev, MII_MARVELL_MISC_TEST_PAGE, phydev 1786 drivers/net/phy/marvell.c static int m88e1510_set_temp_critical(struct phy_device *phydev, long temp) phydev 1791 drivers/net/phy/marvell.c return phy_modify_paged(phydev, MII_MARVELL_MISC_TEST_PAGE, phydev 1797 drivers/net/phy/marvell.c static int m88e1510_get_temp_alarm(struct phy_device *phydev, long *alarm) phydev 1803 drivers/net/phy/marvell.c ret = phy_read_paged(phydev, MII_MARVELL_MISC_TEST_PAGE, phydev 1817 drivers/net/phy/marvell.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 1822 drivers/net/phy/marvell.c err = m88e1510_get_temp(phydev, temp); phydev 1825 drivers/net/phy/marvell.c err = m88e1510_get_temp_critical(phydev, temp); phydev 1828 drivers/net/phy/marvell.c err = m88e1510_get_temp_alarm(phydev, temp); phydev 1841 drivers/net/phy/marvell.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 1846 drivers/net/phy/marvell.c err = m88e1510_set_temp_critical(phydev, temp); phydev 1899 drivers/net/phy/marvell.c static int m88e6390_get_temp(struct phy_device *phydev, long *temp) phydev 1908 drivers/net/phy/marvell.c oldpage = phy_select_page(phydev, MII_MARVELL_MISC_TEST_PAGE); phydev 1913 drivers/net/phy/marvell.c ret = __phy_read(phydev, MII_88E6390_MISC_TEST); phydev 1921 drivers/net/phy/marvell.c ret = __phy_write(phydev, MII_88E6390_MISC_TEST, ret); phydev 1932 drivers/net/phy/marvell.c ret = __phy_read(phydev, MII_88E6390_TEMP_SENSOR); phydev 1942 drivers/net/phy/marvell.c ret = __phy_read(phydev, MII_88E6390_MISC_TEST); phydev 1949 drivers/net/phy/marvell.c ret = __phy_write(phydev, MII_88E6390_MISC_TEST, ret); phydev 1952 drivers/net/phy/marvell.c phy_restore_page(phydev, oldpage, ret); phydev 1961 drivers/net/phy/marvell.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 1966 drivers/net/phy/marvell.c err = m88e6390_get_temp(phydev, temp); phydev 2016 drivers/net/phy/marvell.c static int marvell_hwmon_name(struct phy_device *phydev) phydev 2018 drivers/net/phy/marvell.c struct marvell_priv *priv = phydev->priv; phydev 2019 drivers/net/phy/marvell.c struct device *dev = &phydev->mdio.dev; phydev 2036 drivers/net/phy/marvell.c static int marvell_hwmon_probe(struct phy_device *phydev, phydev 2039 drivers/net/phy/marvell.c struct marvell_priv *priv = phydev->priv; phydev 2040 drivers/net/phy/marvell.c struct device *dev = &phydev->mdio.dev; phydev 2043 drivers/net/phy/marvell.c err = marvell_hwmon_name(phydev); phydev 2048 drivers/net/phy/marvell.c dev, priv->hwmon_name, phydev, chip, NULL); phydev 2053 drivers/net/phy/marvell.c static int m88e1121_hwmon_probe(struct phy_device *phydev) phydev 2055 drivers/net/phy/marvell.c return marvell_hwmon_probe(phydev, &m88e1121_hwmon_chip_info); phydev 2058 drivers/net/phy/marvell.c static int m88e1510_hwmon_probe(struct phy_device *phydev) phydev 2060 drivers/net/phy/marvell.c return marvell_hwmon_probe(phydev, &m88e1510_hwmon_chip_info); phydev 2063 drivers/net/phy/marvell.c static int m88e6390_hwmon_probe(struct phy_device *phydev) phydev 2065 drivers/net/phy/marvell.c return marvell_hwmon_probe(phydev, &m88e6390_hwmon_chip_info); phydev 2068 drivers/net/phy/marvell.c static int m88e1121_hwmon_probe(struct phy_device *phydev) phydev 2073 drivers/net/phy/marvell.c static int m88e1510_hwmon_probe(struct phy_device *phydev) phydev 2078 drivers/net/phy/marvell.c static int m88e6390_hwmon_probe(struct phy_device *phydev) phydev 2084 drivers/net/phy/marvell.c static int marvell_probe(struct phy_device *phydev) phydev 2088 drivers/net/phy/marvell.c priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); phydev 2092 drivers/net/phy/marvell.c phydev->priv = priv; phydev 2097 drivers/net/phy/marvell.c static int m88e1121_probe(struct phy_device *phydev) phydev 2101 drivers/net/phy/marvell.c err = marvell_probe(phydev); phydev 2105 drivers/net/phy/marvell.c return m88e1121_hwmon_probe(phydev); phydev 2108 drivers/net/phy/marvell.c static int m88e1510_probe(struct phy_device *phydev) phydev 2112 drivers/net/phy/marvell.c err = marvell_probe(phydev); phydev 2116 drivers/net/phy/marvell.c return m88e1510_hwmon_probe(phydev); phydev 2119 drivers/net/phy/marvell.c static int m88e6390_probe(struct phy_device *phydev) phydev 2123 drivers/net/phy/marvell.c err = marvell_probe(phydev); phydev 2127 drivers/net/phy/marvell.c return m88e6390_hwmon_probe(phydev); phydev 84 drivers/net/phy/marvell10g.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 93 drivers/net/phy/marvell10g.c temp = phy_read_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP); phydev 141 drivers/net/phy/marvell10g.c static int mv3310_hwmon_config(struct phy_device *phydev, bool enable) phydev 146 drivers/net/phy/marvell10g.c ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP, phydev 153 drivers/net/phy/marvell10g.c return phy_modify_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP_CTRL, phydev 159 drivers/net/phy/marvell10g.c struct phy_device *phydev = data; phydev 161 drivers/net/phy/marvell10g.c mv3310_hwmon_config(phydev, false); phydev 164 drivers/net/phy/marvell10g.c static int mv3310_hwmon_probe(struct phy_device *phydev) phydev 166 drivers/net/phy/marvell10g.c struct device *dev = &phydev->mdio.dev; phydev 167 drivers/net/phy/marvell10g.c struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev); phydev 183 drivers/net/phy/marvell10g.c ret = mv3310_hwmon_config(phydev, true); phydev 187 drivers/net/phy/marvell10g.c ret = devm_add_action_or_reset(dev, mv3310_hwmon_disable, phydev); phydev 192 drivers/net/phy/marvell10g.c priv->hwmon_name, phydev, phydev 198 drivers/net/phy/marvell10g.c static inline int mv3310_hwmon_config(struct phy_device *phydev, bool enable) phydev 203 drivers/net/phy/marvell10g.c static int mv3310_hwmon_probe(struct phy_device *phydev) phydev 209 drivers/net/phy/marvell10g.c static int mv3310_probe(struct phy_device *phydev) phydev 215 drivers/net/phy/marvell10g.c if (!phydev->is_c45 || phydev 216 drivers/net/phy/marvell10g.c (phydev->c45_ids.devices_in_package & mmd_mask) != mmd_mask) phydev 219 drivers/net/phy/marvell10g.c ret = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MV_PMA_BOOT); phydev 224 drivers/net/phy/marvell10g.c dev_warn(&phydev->mdio.dev, phydev 229 drivers/net/phy/marvell10g.c priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); phydev 233 drivers/net/phy/marvell10g.c dev_set_drvdata(&phydev->mdio.dev, priv); phydev 235 drivers/net/phy/marvell10g.c ret = mv3310_hwmon_probe(phydev); phydev 242 drivers/net/phy/marvell10g.c static int mv3310_suspend(struct phy_device *phydev) phydev 244 drivers/net/phy/marvell10g.c return phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL, phydev 248 drivers/net/phy/marvell10g.c static int mv3310_resume(struct phy_device *phydev) phydev 252 drivers/net/phy/marvell10g.c ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL, phydev 257 drivers/net/phy/marvell10g.c return mv3310_hwmon_config(phydev, true); phydev 267 drivers/net/phy/marvell10g.c static bool mv3310_has_pma_ngbaset_quirk(struct phy_device *phydev) phydev 269 drivers/net/phy/marvell10g.c if (!(phydev->c45_ids.devices_in_package & MDIO_DEVS_PMAPMD)) phydev 273 drivers/net/phy/marvell10g.c return (phydev->c45_ids.device_ids[MDIO_MMD_PMAPMD] & phydev 277 drivers/net/phy/marvell10g.c static int mv3310_config_init(struct phy_device *phydev) phydev 280 drivers/net/phy/marvell10g.c if (phydev->interface != PHY_INTERFACE_MODE_SGMII && phydev 281 drivers/net/phy/marvell10g.c phydev->interface != PHY_INTERFACE_MODE_2500BASEX && phydev 282 drivers/net/phy/marvell10g.c phydev->interface != PHY_INTERFACE_MODE_XAUI && phydev 283 drivers/net/phy/marvell10g.c phydev->interface != PHY_INTERFACE_MODE_RXAUI && phydev 284 drivers/net/phy/marvell10g.c phydev->interface != PHY_INTERFACE_MODE_10GKR) phydev 290 drivers/net/phy/marvell10g.c static int mv3310_get_features(struct phy_device *phydev) phydev 294 drivers/net/phy/marvell10g.c ret = genphy_c45_pma_read_abilities(phydev); phydev 298 drivers/net/phy/marvell10g.c if (mv3310_has_pma_ngbaset_quirk(phydev)) { phydev 299 drivers/net/phy/marvell10g.c val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, phydev 305 drivers/net/phy/marvell10g.c phydev->supported, phydev 309 drivers/net/phy/marvell10g.c phydev->supported, phydev 316 drivers/net/phy/marvell10g.c static int mv3310_config_aneg(struct phy_device *phydev) phydev 323 drivers/net/phy/marvell10g.c phydev->mdix_ctrl = ETH_TP_MDI_AUTO; phydev 325 drivers/net/phy/marvell10g.c if (phydev->autoneg == AUTONEG_DISABLE) phydev 326 drivers/net/phy/marvell10g.c return genphy_c45_pma_setup_forced(phydev); phydev 328 drivers/net/phy/marvell10g.c ret = genphy_c45_an_config_aneg(phydev); phydev 337 drivers/net/phy/marvell10g.c reg = linkmode_adv_to_mii_ctrl1000_t(phydev->advertising); phydev 338 drivers/net/phy/marvell10g.c ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MV_AN_CTRL1000, phydev 345 drivers/net/phy/marvell10g.c return genphy_c45_check_and_restart_aneg(phydev, changed); phydev 348 drivers/net/phy/marvell10g.c static int mv3310_aneg_done(struct phy_device *phydev) phydev 352 drivers/net/phy/marvell10g.c val = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_BASE_R + MDIO_STAT1); phydev 359 drivers/net/phy/marvell10g.c return genphy_c45_aneg_done(phydev); phydev 362 drivers/net/phy/marvell10g.c static void mv3310_update_interface(struct phy_device *phydev) phydev 364 drivers/net/phy/marvell10g.c if ((phydev->interface == PHY_INTERFACE_MODE_SGMII || phydev 365 drivers/net/phy/marvell10g.c phydev->interface == PHY_INTERFACE_MODE_2500BASEX || phydev 366 drivers/net/phy/marvell10g.c phydev->interface == PHY_INTERFACE_MODE_10GKR) && phydev->link) { phydev 373 drivers/net/phy/marvell10g.c switch (phydev->speed) { phydev 375 drivers/net/phy/marvell10g.c phydev->interface = PHY_INTERFACE_MODE_10GKR; phydev 378 drivers/net/phy/marvell10g.c phydev->interface = PHY_INTERFACE_MODE_2500BASEX; phydev 383 drivers/net/phy/marvell10g.c phydev->interface = PHY_INTERFACE_MODE_SGMII; phydev 392 drivers/net/phy/marvell10g.c static int mv3310_read_10gbr_status(struct phy_device *phydev) phydev 394 drivers/net/phy/marvell10g.c phydev->link = 1; phydev 395 drivers/net/phy/marvell10g.c phydev->speed = SPEED_10000; phydev 396 drivers/net/phy/marvell10g.c phydev->duplex = DUPLEX_FULL; phydev 398 drivers/net/phy/marvell10g.c mv3310_update_interface(phydev); phydev 403 drivers/net/phy/marvell10g.c static int mv3310_read_status(struct phy_device *phydev) phydev 407 drivers/net/phy/marvell10g.c phydev->speed = SPEED_UNKNOWN; phydev 408 drivers/net/phy/marvell10g.c phydev->duplex = DUPLEX_UNKNOWN; phydev 409 drivers/net/phy/marvell10g.c linkmode_zero(phydev->lp_advertising); phydev 410 drivers/net/phy/marvell10g.c phydev->link = 0; phydev 411 drivers/net/phy/marvell10g.c phydev->pause = 0; phydev 412 drivers/net/phy/marvell10g.c phydev->asym_pause = 0; phydev 413 drivers/net/phy/marvell10g.c phydev->mdix = 0; phydev 415 drivers/net/phy/marvell10g.c val = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_BASE_R + MDIO_STAT1); phydev 420 drivers/net/phy/marvell10g.c return mv3310_read_10gbr_status(phydev); phydev 422 drivers/net/phy/marvell10g.c val = genphy_c45_read_link(phydev); phydev 426 drivers/net/phy/marvell10g.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); phydev 431 drivers/net/phy/marvell10g.c val = genphy_c45_read_lpa(phydev); phydev 436 drivers/net/phy/marvell10g.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MV_AN_STAT1000); phydev 440 drivers/net/phy/marvell10g.c mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, val); phydev 442 drivers/net/phy/marvell10g.c if (phydev->autoneg == AUTONEG_ENABLE) phydev 443 drivers/net/phy/marvell10g.c phy_resolve_aneg_linkmode(phydev); phydev 446 drivers/net/phy/marvell10g.c if (phydev->autoneg != AUTONEG_ENABLE) { phydev 447 drivers/net/phy/marvell10g.c val = genphy_c45_read_pma(phydev); phydev 452 drivers/net/phy/marvell10g.c if (phydev->speed == SPEED_10000) { phydev 453 drivers/net/phy/marvell10g.c val = genphy_c45_read_mdix(phydev); phydev 457 drivers/net/phy/marvell10g.c val = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_PAIRSWAP); phydev 463 drivers/net/phy/marvell10g.c phydev->mdix = ETH_TP_MDI_X; phydev 466 drivers/net/phy/marvell10g.c phydev->mdix = ETH_TP_MDI; phydev 469 drivers/net/phy/marvell10g.c phydev->mdix = ETH_TP_MDI_INVALID; phydev 474 drivers/net/phy/marvell10g.c mv3310_update_interface(phydev); phydev 416 drivers/net/phy/mdio_bus.c struct phy_device *phydev; phydev 418 drivers/net/phy/mdio_bus.c phydev = mdiobus_scan(bus, i); phydev 419 drivers/net/phy/mdio_bus.c if (IS_ERR(phydev) && (PTR_ERR(phydev) != -ENODEV)) { phydev 420 drivers/net/phy/mdio_bus.c err = PTR_ERR(phydev); phydev 516 drivers/net/phy/mdio_bus.c struct phy_device *phydev; phydev 519 drivers/net/phy/mdio_bus.c phydev = get_phy_device(bus, addr, false); phydev 520 drivers/net/phy/mdio_bus.c if (IS_ERR(phydev)) phydev 521 drivers/net/phy/mdio_bus.c return phydev; phydev 527 drivers/net/phy/mdio_bus.c of_mdiobus_link_mdiodev(bus, &phydev->mdio); phydev 529 drivers/net/phy/mdio_bus.c err = phy_device_register(phydev); phydev 531 drivers/net/phy/mdio_bus.c phy_device_free(phydev); phydev 535 drivers/net/phy/mdio_bus.c return phydev; phydev 48 drivers/net/phy/meson-gxl.c static int meson_gxl_open_banks(struct phy_device *phydev) phydev 55 drivers/net/phy/meson-gxl.c ret = phy_write(phydev, TSTCNTL, 0); phydev 58 drivers/net/phy/meson-gxl.c ret = phy_write(phydev, TSTCNTL, TSTCNTL_TEST_MODE); phydev 61 drivers/net/phy/meson-gxl.c ret = phy_write(phydev, TSTCNTL, 0); phydev 64 drivers/net/phy/meson-gxl.c return phy_write(phydev, TSTCNTL, TSTCNTL_TEST_MODE); phydev 67 drivers/net/phy/meson-gxl.c static void meson_gxl_close_banks(struct phy_device *phydev) phydev 69 drivers/net/phy/meson-gxl.c phy_write(phydev, TSTCNTL, 0); phydev 72 drivers/net/phy/meson-gxl.c static int meson_gxl_read_reg(struct phy_device *phydev, phydev 77 drivers/net/phy/meson-gxl.c ret = meson_gxl_open_banks(phydev); phydev 81 drivers/net/phy/meson-gxl.c ret = phy_write(phydev, TSTCNTL, TSTCNTL_READ | phydev 88 drivers/net/phy/meson-gxl.c ret = phy_read(phydev, TSTREAD1); phydev 91 drivers/net/phy/meson-gxl.c meson_gxl_close_banks(phydev); phydev 95 drivers/net/phy/meson-gxl.c static int meson_gxl_write_reg(struct phy_device *phydev, phydev 101 drivers/net/phy/meson-gxl.c ret = meson_gxl_open_banks(phydev); phydev 105 drivers/net/phy/meson-gxl.c ret = phy_write(phydev, TSTWRITE, value); phydev 109 drivers/net/phy/meson-gxl.c ret = phy_write(phydev, TSTCNTL, TSTCNTL_WRITE | phydev 116 drivers/net/phy/meson-gxl.c meson_gxl_close_banks(phydev); phydev 120 drivers/net/phy/meson-gxl.c static int meson_gxl_config_init(struct phy_device *phydev) phydev 125 drivers/net/phy/meson-gxl.c ret = meson_gxl_write_reg(phydev, BANK_BIST, FR_PLL_CONTROL, 0x5); phydev 130 drivers/net/phy/meson-gxl.c ret = meson_gxl_write_reg(phydev, BANK_BIST, FR_PLL_DIV1, 0x029a); phydev 135 drivers/net/phy/meson-gxl.c ret = meson_gxl_write_reg(phydev, BANK_BIST, FR_PLL_DIV0, 0xaaaa); phydev 158 drivers/net/phy/meson-gxl.c static int meson_gxl_read_status(struct phy_device *phydev) phydev 162 drivers/net/phy/meson-gxl.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 163 drivers/net/phy/meson-gxl.c ret = genphy_aneg_done(phydev); phydev 170 drivers/net/phy/meson-gxl.c wol = meson_gxl_read_reg(phydev, BANK_WOL, LPI_STATUS); phydev 174 drivers/net/phy/meson-gxl.c lpa = phy_read(phydev, MII_LPA); phydev 178 drivers/net/phy/meson-gxl.c exp = phy_read(phydev, MII_EXPANSION); phydev 185 drivers/net/phy/meson-gxl.c phydev_dbg(phydev, "LPA corruption - aneg restart\n"); phydev 186 drivers/net/phy/meson-gxl.c return genphy_restart_aneg(phydev); phydev 191 drivers/net/phy/meson-gxl.c return genphy_read_status(phydev); phydev 194 drivers/net/phy/meson-gxl.c static int meson_gxl_ack_interrupt(struct phy_device *phydev) phydev 196 drivers/net/phy/meson-gxl.c int ret = phy_read(phydev, INTSRC_FLAG); phydev 201 drivers/net/phy/meson-gxl.c static int meson_gxl_config_intr(struct phy_device *phydev) phydev 206 drivers/net/phy/meson-gxl.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 218 drivers/net/phy/meson-gxl.c ret = meson_gxl_ack_interrupt(phydev); phydev 222 drivers/net/phy/meson-gxl.c return phy_write(phydev, INTSRC_MASK, val); phydev 133 drivers/net/phy/micrel.c static int kszphy_extended_write(struct phy_device *phydev, phydev 136 drivers/net/phy/micrel.c phy_write(phydev, MII_KSZPHY_EXTREG, KSZPHY_EXTREG_WRITE | regnum); phydev 137 drivers/net/phy/micrel.c return phy_write(phydev, MII_KSZPHY_EXTREG_WRITE, val); phydev 140 drivers/net/phy/micrel.c static int kszphy_extended_read(struct phy_device *phydev, phydev 143 drivers/net/phy/micrel.c phy_write(phydev, MII_KSZPHY_EXTREG, regnum); phydev 144 drivers/net/phy/micrel.c return phy_read(phydev, MII_KSZPHY_EXTREG_READ); phydev 147 drivers/net/phy/micrel.c static int kszphy_ack_interrupt(struct phy_device *phydev) phydev 152 drivers/net/phy/micrel.c rc = phy_read(phydev, MII_KSZPHY_INTCS); phydev 157 drivers/net/phy/micrel.c static int kszphy_config_intr(struct phy_device *phydev) phydev 159 drivers/net/phy/micrel.c const struct kszphy_type *type = phydev->drv->driver_data; phydev 169 drivers/net/phy/micrel.c temp = phy_read(phydev, MII_KSZPHY_CTRL); phydev 173 drivers/net/phy/micrel.c phy_write(phydev, MII_KSZPHY_CTRL, temp); phydev 176 drivers/net/phy/micrel.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 181 drivers/net/phy/micrel.c return phy_write(phydev, MII_KSZPHY_INTCS, temp); phydev 184 drivers/net/phy/micrel.c static int kszphy_rmii_clk_sel(struct phy_device *phydev, bool val) phydev 188 drivers/net/phy/micrel.c ctrl = phy_read(phydev, MII_KSZPHY_CTRL); phydev 197 drivers/net/phy/micrel.c return phy_write(phydev, MII_KSZPHY_CTRL, ctrl); phydev 200 drivers/net/phy/micrel.c static int kszphy_setup_led(struct phy_device *phydev, u32 reg, int val) phydev 215 drivers/net/phy/micrel.c temp = phy_read(phydev, reg); phydev 223 drivers/net/phy/micrel.c rc = phy_write(phydev, reg, temp); phydev 226 drivers/net/phy/micrel.c phydev_err(phydev, "failed to set led mode\n"); phydev 234 drivers/net/phy/micrel.c static int kszphy_broadcast_disable(struct phy_device *phydev) phydev 238 drivers/net/phy/micrel.c ret = phy_read(phydev, MII_KSZPHY_OMSO); phydev 242 drivers/net/phy/micrel.c ret = phy_write(phydev, MII_KSZPHY_OMSO, ret | KSZPHY_OMSO_B_CAST_OFF); phydev 245 drivers/net/phy/micrel.c phydev_err(phydev, "failed to disable broadcast address\n"); phydev 250 drivers/net/phy/micrel.c static int kszphy_nand_tree_disable(struct phy_device *phydev) phydev 254 drivers/net/phy/micrel.c ret = phy_read(phydev, MII_KSZPHY_OMSO); phydev 261 drivers/net/phy/micrel.c ret = phy_write(phydev, MII_KSZPHY_OMSO, phydev 265 drivers/net/phy/micrel.c phydev_err(phydev, "failed to disable NAND tree mode\n"); phydev 271 drivers/net/phy/micrel.c static int kszphy_config_reset(struct phy_device *phydev) phydev 273 drivers/net/phy/micrel.c struct kszphy_priv *priv = phydev->priv; phydev 277 drivers/net/phy/micrel.c ret = kszphy_rmii_clk_sel(phydev, priv->rmii_ref_clk_sel_val); phydev 279 drivers/net/phy/micrel.c phydev_err(phydev, phydev 286 drivers/net/phy/micrel.c kszphy_setup_led(phydev, priv->type->led_mode_reg, priv->led_mode); phydev 291 drivers/net/phy/micrel.c static int kszphy_config_init(struct phy_device *phydev) phydev 293 drivers/net/phy/micrel.c struct kszphy_priv *priv = phydev->priv; phydev 302 drivers/net/phy/micrel.c kszphy_broadcast_disable(phydev); phydev 305 drivers/net/phy/micrel.c kszphy_nand_tree_disable(phydev); phydev 307 drivers/net/phy/micrel.c return kszphy_config_reset(phydev); phydev 310 drivers/net/phy/micrel.c static int ksz8041_config_init(struct phy_device *phydev) phydev 314 drivers/net/phy/micrel.c struct device_node *of_node = phydev->mdio.dev.of_node; phydev 318 drivers/net/phy/micrel.c phydev->dev_flags |= MICREL_PHY_FXEN; phydev 322 drivers/net/phy/micrel.c linkmode_and(phydev->supported, phydev->supported, mask); phydev 324 drivers/net/phy/micrel.c phydev->supported); phydev 325 drivers/net/phy/micrel.c linkmode_and(phydev->advertising, phydev->advertising, mask); phydev 327 drivers/net/phy/micrel.c phydev->advertising); phydev 328 drivers/net/phy/micrel.c phydev->autoneg = AUTONEG_DISABLE; phydev 331 drivers/net/phy/micrel.c return kszphy_config_init(phydev); phydev 334 drivers/net/phy/micrel.c static int ksz8041_config_aneg(struct phy_device *phydev) phydev 337 drivers/net/phy/micrel.c if (phydev->dev_flags & MICREL_PHY_FXEN) { phydev 338 drivers/net/phy/micrel.c phydev->speed = SPEED_100; phydev 342 drivers/net/phy/micrel.c return genphy_config_aneg(phydev); phydev 345 drivers/net/phy/micrel.c static int ksz8051_ksz8795_match_phy_device(struct phy_device *phydev, phydev 350 drivers/net/phy/micrel.c if ((phydev->phy_id & MICREL_PHY_ID_MASK) != ksz_phy_id) phydev 353 drivers/net/phy/micrel.c ret = phy_read(phydev, MII_BMSR); phydev 369 drivers/net/phy/micrel.c static int ksz8051_match_phy_device(struct phy_device *phydev) phydev 371 drivers/net/phy/micrel.c return ksz8051_ksz8795_match_phy_device(phydev, PHY_ID_KSZ8051); phydev 374 drivers/net/phy/micrel.c static int ksz8081_config_init(struct phy_device *phydev) phydev 381 drivers/net/phy/micrel.c phy_clear_bits(phydev, MII_KSZPHY_OMSO, KSZPHY_OMSO_FACTORY_TEST); phydev 383 drivers/net/phy/micrel.c return kszphy_config_init(phydev); phydev 386 drivers/net/phy/micrel.c static int ksz8061_config_init(struct phy_device *phydev) phydev 390 drivers/net/phy/micrel.c ret = phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_DEVID1, 0xB61A); phydev 394 drivers/net/phy/micrel.c return kszphy_config_init(phydev); phydev 397 drivers/net/phy/micrel.c static int ksz8795_match_phy_device(struct phy_device *phydev) phydev 399 drivers/net/phy/micrel.c return ksz8051_ksz8795_match_phy_device(phydev, PHY_ID_KSZ87XX); phydev 402 drivers/net/phy/micrel.c static int ksz9021_load_values_from_of(struct phy_device *phydev, phydev 431 drivers/net/phy/micrel.c newval = kszphy_extended_read(phydev, reg); phydev 447 drivers/net/phy/micrel.c return kszphy_extended_write(phydev, reg, newval); phydev 450 drivers/net/phy/micrel.c static int ksz9021_config_init(struct phy_device *phydev) phydev 452 drivers/net/phy/micrel.c const struct device *dev = &phydev->mdio.dev; phydev 460 drivers/net/phy/micrel.c dev_walker = &phydev->mdio.dev; phydev 468 drivers/net/phy/micrel.c ksz9021_load_values_from_of(phydev, of_node, phydev 472 drivers/net/phy/micrel.c ksz9021_load_values_from_of(phydev, of_node, phydev 476 drivers/net/phy/micrel.c ksz9021_load_values_from_of(phydev, of_node, phydev 501 drivers/net/phy/micrel.c static int ksz9031_of_load_skew_values(struct phy_device *phydev, phydev 521 drivers/net/phy/micrel.c newval = phy_read_mmd(phydev, 2, reg); phydev 535 drivers/net/phy/micrel.c return phy_write_mmd(phydev, 2, reg, newval); phydev 539 drivers/net/phy/micrel.c static int ksz9031_center_flp_timing(struct phy_device *phydev) phydev 543 drivers/net/phy/micrel.c result = phy_write_mmd(phydev, 0, MII_KSZ9031RN_FLP_BURST_TX_HI, phydev 548 drivers/net/phy/micrel.c result = phy_write_mmd(phydev, 0, MII_KSZ9031RN_FLP_BURST_TX_LO, phydev 553 drivers/net/phy/micrel.c return genphy_restart_aneg(phydev); phydev 557 drivers/net/phy/micrel.c static int ksz9031_enable_edpd(struct phy_device *phydev) phydev 561 drivers/net/phy/micrel.c reg = phy_read_mmd(phydev, 0x1C, MII_KSZ9031RN_EDPD); phydev 564 drivers/net/phy/micrel.c return phy_write_mmd(phydev, 0x1C, MII_KSZ9031RN_EDPD, phydev 568 drivers/net/phy/micrel.c static int ksz9031_config_init(struct phy_device *phydev) phydev 570 drivers/net/phy/micrel.c const struct device *dev = &phydev->mdio.dev; phydev 585 drivers/net/phy/micrel.c result = ksz9031_enable_edpd(phydev); phydev 593 drivers/net/phy/micrel.c dev_walker = &phydev->mdio.dev; phydev 600 drivers/net/phy/micrel.c ksz9031_of_load_skew_values(phydev, of_node, phydev 604 drivers/net/phy/micrel.c ksz9031_of_load_skew_values(phydev, of_node, phydev 608 drivers/net/phy/micrel.c ksz9031_of_load_skew_values(phydev, of_node, phydev 612 drivers/net/phy/micrel.c ksz9031_of_load_skew_values(phydev, of_node, phydev 632 drivers/net/phy/micrel.c result = phy_read(phydev, MII_CTRL1000); phydev 638 drivers/net/phy/micrel.c result = phy_write(phydev, MII_CTRL1000, result); phydev 644 drivers/net/phy/micrel.c return ksz9031_center_flp_timing(phydev); phydev 647 drivers/net/phy/micrel.c phydev_err(phydev, "failed to force the phy to master mode\n"); phydev 656 drivers/net/phy/micrel.c static int ksz9131_of_load_skew_values(struct phy_device *phydev, phydev 691 drivers/net/phy/micrel.c newval = phy_read_mmd(phydev, 2, reg); phydev 705 drivers/net/phy/micrel.c return phy_write_mmd(phydev, 2, reg, newval); phydev 708 drivers/net/phy/micrel.c static int ksz9131_config_init(struct phy_device *phydev) phydev 710 drivers/net/phy/micrel.c const struct device *dev = &phydev->mdio.dev; phydev 725 drivers/net/phy/micrel.c dev_walker = &phydev->mdio.dev; phydev 734 drivers/net/phy/micrel.c ret = ksz9131_of_load_skew_values(phydev, of_node, phydev 740 drivers/net/phy/micrel.c ret = ksz9131_of_load_skew_values(phydev, of_node, phydev 746 drivers/net/phy/micrel.c ret = ksz9131_of_load_skew_values(phydev, of_node, phydev 752 drivers/net/phy/micrel.c ret = ksz9131_of_load_skew_values(phydev, of_node, phydev 764 drivers/net/phy/micrel.c static int ksz8873mll_read_status(struct phy_device *phydev) phydev 769 drivers/net/phy/micrel.c regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4); phydev 771 drivers/net/phy/micrel.c regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4); phydev 774 drivers/net/phy/micrel.c phydev->duplex = DUPLEX_HALF; phydev 776 drivers/net/phy/micrel.c phydev->duplex = DUPLEX_FULL; phydev 779 drivers/net/phy/micrel.c phydev->speed = SPEED_10; phydev 781 drivers/net/phy/micrel.c phydev->speed = SPEED_100; phydev 783 drivers/net/phy/micrel.c phydev->link = 1; phydev 784 drivers/net/phy/micrel.c phydev->pause = phydev->asym_pause = 0; phydev 789 drivers/net/phy/micrel.c static int ksz9031_get_features(struct phy_device *phydev) phydev 793 drivers/net/phy/micrel.c ret = genphy_read_abilities(phydev); phydev 806 drivers/net/phy/micrel.c linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported); phydev 811 drivers/net/phy/micrel.c linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported); phydev 816 drivers/net/phy/micrel.c static int ksz9031_read_status(struct phy_device *phydev) phydev 821 drivers/net/phy/micrel.c err = genphy_read_status(phydev); phydev 828 drivers/net/phy/micrel.c regval = phy_read(phydev, MII_STAT1000); phydev 830 drivers/net/phy/micrel.c phy_init_hw(phydev); phydev 831 drivers/net/phy/micrel.c phydev->link = 0; phydev 832 drivers/net/phy/micrel.c if (phydev->drv->config_intr && phy_interrupt_is_valid(phydev)) phydev 833 drivers/net/phy/micrel.c phydev->drv->config_intr(phydev); phydev 834 drivers/net/phy/micrel.c return genphy_config_aneg(phydev); phydev 840 drivers/net/phy/micrel.c static int ksz8873mll_config_aneg(struct phy_device *phydev) phydev 845 drivers/net/phy/micrel.c static int kszphy_get_sset_count(struct phy_device *phydev) phydev 850 drivers/net/phy/micrel.c static void kszphy_get_strings(struct phy_device *phydev, u8 *data) phydev 860 drivers/net/phy/micrel.c static u64 kszphy_get_stat(struct phy_device *phydev, int i) phydev 863 drivers/net/phy/micrel.c struct kszphy_priv *priv = phydev->priv; phydev 867 drivers/net/phy/micrel.c val = phy_read(phydev, stat.reg); phydev 879 drivers/net/phy/micrel.c static void kszphy_get_stats(struct phy_device *phydev, phydev 885 drivers/net/phy/micrel.c data[i] = kszphy_get_stat(phydev, i); phydev 888 drivers/net/phy/micrel.c static int kszphy_suspend(struct phy_device *phydev) phydev 891 drivers/net/phy/micrel.c if (phy_interrupt_is_valid(phydev)) { phydev 892 drivers/net/phy/micrel.c phydev->interrupts = PHY_INTERRUPT_DISABLED; phydev 893 drivers/net/phy/micrel.c if (phydev->drv->config_intr) phydev 894 drivers/net/phy/micrel.c phydev->drv->config_intr(phydev); phydev 897 drivers/net/phy/micrel.c return genphy_suspend(phydev); phydev 900 drivers/net/phy/micrel.c static int kszphy_resume(struct phy_device *phydev) phydev 904 drivers/net/phy/micrel.c genphy_resume(phydev); phydev 912 drivers/net/phy/micrel.c ret = kszphy_config_reset(phydev); phydev 917 drivers/net/phy/micrel.c if (phy_interrupt_is_valid(phydev)) { phydev 918 drivers/net/phy/micrel.c phydev->interrupts = PHY_INTERRUPT_ENABLED; phydev 919 drivers/net/phy/micrel.c if (phydev->drv->config_intr) phydev 920 drivers/net/phy/micrel.c phydev->drv->config_intr(phydev); phydev 926 drivers/net/phy/micrel.c static int kszphy_probe(struct phy_device *phydev) phydev 928 drivers/net/phy/micrel.c const struct kszphy_type *type = phydev->drv->driver_data; phydev 929 drivers/net/phy/micrel.c const struct device_node *np = phydev->mdio.dev.of_node; phydev 934 drivers/net/phy/micrel.c priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL); phydev 938 drivers/net/phy/micrel.c phydev->priv = priv; phydev 949 drivers/net/phy/micrel.c phydev_err(phydev, "invalid led mode: 0x%02x\n", phydev 957 drivers/net/phy/micrel.c clk = devm_clk_get(&phydev->mdio.dev, "rmii-ref"); phydev 972 drivers/net/phy/micrel.c phydev_err(phydev, "Clock rate out of range: %ld\n", phydev 979 drivers/net/phy/micrel.c if (phydev->dev_flags & MICREL_PHY_50MHZ_CLK) { phydev 24 drivers/net/phy/microchip.c static int lan88xx_read_page(struct phy_device *phydev) phydev 26 drivers/net/phy/microchip.c return __phy_read(phydev, LAN88XX_EXT_PAGE_ACCESS); phydev 29 drivers/net/phy/microchip.c static int lan88xx_write_page(struct phy_device *phydev, int page) phydev 31 drivers/net/phy/microchip.c return __phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, page); phydev 34 drivers/net/phy/microchip.c static int lan88xx_phy_config_intr(struct phy_device *phydev) phydev 38 drivers/net/phy/microchip.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 40 drivers/net/phy/microchip.c rc = phy_write(phydev, LAN88XX_INT_MASK, 0x7FFF); phydev 41 drivers/net/phy/microchip.c rc = phy_read(phydev, LAN88XX_INT_STS); phydev 42 drivers/net/phy/microchip.c rc = phy_write(phydev, LAN88XX_INT_MASK, phydev 46 drivers/net/phy/microchip.c rc = phy_write(phydev, LAN88XX_INT_MASK, 0); phydev 52 drivers/net/phy/microchip.c static int lan88xx_phy_ack_interrupt(struct phy_device *phydev) phydev 54 drivers/net/phy/microchip.c int rc = phy_read(phydev, LAN88XX_INT_STS); phydev 59 drivers/net/phy/microchip.c static int lan88xx_suspend(struct phy_device *phydev) phydev 61 drivers/net/phy/microchip.c struct lan88xx_priv *priv = phydev->priv; phydev 65 drivers/net/phy/microchip.c genphy_suspend(phydev); phydev 70 drivers/net/phy/microchip.c static int lan88xx_TR_reg_set(struct phy_device *phydev, u16 regaddr, phydev 77 drivers/net/phy/microchip.c save_page = phy_save_page(phydev); phydev 79 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to get current page\n"); phydev 84 drivers/net/phy/microchip.c lan88xx_write_page(phydev, LAN88XX_EXT_PAGE_ACCESS_TR); phydev 86 drivers/net/phy/microchip.c ret = __phy_write(phydev, LAN88XX_EXT_PAGE_TR_LOW_DATA, phydev 89 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to write TR low data\n"); phydev 93 drivers/net/phy/microchip.c ret = __phy_write(phydev, LAN88XX_EXT_PAGE_TR_HIGH_DATA, phydev 96 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to write TR high data\n"); phydev 104 drivers/net/phy/microchip.c ret = __phy_write(phydev, LAN88XX_EXT_PAGE_TR_CR, buf); phydev 106 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to write data in reg\n"); phydev 111 drivers/net/phy/microchip.c val = __phy_read(phydev, LAN88XX_EXT_PAGE_TR_CR); phydev 113 drivers/net/phy/microchip.c phydev_warn(phydev, "TR Register[0x%X] configuration failed\n", phydev 116 drivers/net/phy/microchip.c return phy_restore_page(phydev, save_page, ret); phydev 119 drivers/net/phy/microchip.c static void lan88xx_config_TR_regs(struct phy_device *phydev) phydev 127 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x0F82, 0x12B00A); phydev 129 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x0F82]\n"); phydev 135 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x168C, 0xD2C46F); phydev 137 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x168C]\n"); phydev 143 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x17A2, 0x620); phydev 145 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x17A2]\n"); phydev 152 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x16A0, 0xEEFFDD); phydev 154 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x16A0]\n"); phydev 160 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x16A6, 0x071448); phydev 162 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x16A6]\n"); phydev 168 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x16A4, 0x13132F); phydev 170 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x16A4]\n"); phydev 176 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x16A8, 0x0); phydev 178 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x16A8]\n"); phydev 185 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x0FE8, 0x91B06C); phydev 187 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x0FE8]\n"); phydev 194 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x0FFC, 0xC0A028); phydev 196 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x0FFC]\n"); phydev 203 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x0FEA, 0x041600); phydev 205 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x0FEA]\n"); phydev 210 drivers/net/phy/microchip.c err = lan88xx_TR_reg_set(phydev, 0x1686, 0x000004); phydev 212 drivers/net/phy/microchip.c phydev_warn(phydev, "Failed to Set Register[0x1686]\n"); phydev 215 drivers/net/phy/microchip.c static int lan88xx_probe(struct phy_device *phydev) phydev 217 drivers/net/phy/microchip.c struct device *dev = &phydev->mdio.dev; phydev 244 drivers/net/phy/microchip.c (void)phy_write(phydev, LAN78XX_PHY_LED_MODE_SELECT, reg); phydev 250 drivers/net/phy/microchip.c priv->chip_id = phy_read_mmd(phydev, 3, LAN88XX_MMD3_CHIP_ID); phydev 251 drivers/net/phy/microchip.c priv->chip_rev = phy_read_mmd(phydev, 3, LAN88XX_MMD3_CHIP_REV); phydev 253 drivers/net/phy/microchip.c phydev->priv = priv; phydev 258 drivers/net/phy/microchip.c static void lan88xx_remove(struct phy_device *phydev) phydev 260 drivers/net/phy/microchip.c struct device *dev = &phydev->mdio.dev; phydev 261 drivers/net/phy/microchip.c struct lan88xx_priv *priv = phydev->priv; phydev 267 drivers/net/phy/microchip.c static int lan88xx_set_wol(struct phy_device *phydev, phydev 270 drivers/net/phy/microchip.c struct lan88xx_priv *priv = phydev->priv; phydev 277 drivers/net/phy/microchip.c static void lan88xx_set_mdix(struct phy_device *phydev) phydev 282 drivers/net/phy/microchip.c switch (phydev->mdix_ctrl) { phydev 296 drivers/net/phy/microchip.c phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_1); phydev 297 drivers/net/phy/microchip.c buf = phy_read(phydev, LAN88XX_EXT_MODE_CTRL); phydev 300 drivers/net/phy/microchip.c phy_write(phydev, LAN88XX_EXT_MODE_CTRL, buf); phydev 301 drivers/net/phy/microchip.c phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_0); phydev 304 drivers/net/phy/microchip.c static int lan88xx_config_init(struct phy_device *phydev) phydev 309 drivers/net/phy/microchip.c val = phy_read_mmd(phydev, MDIO_MMD_PCS, phydev 313 drivers/net/phy/microchip.c phy_write_mmd(phydev, MDIO_MMD_PCS, PHY_ARDENNES_MMD_DEV_3_PHY_CFG, phydev 317 drivers/net/phy/microchip.c lan88xx_config_TR_regs(phydev); phydev 322 drivers/net/phy/microchip.c static int lan88xx_config_aneg(struct phy_device *phydev) phydev 324 drivers/net/phy/microchip.c lan88xx_set_mdix(phydev); phydev 326 drivers/net/phy/microchip.c return genphy_config_aneg(phydev); phydev 51 drivers/net/phy/microchip_t1.c static int access_ereg(struct phy_device *phydev, u8 mode, u8 bank, phydev 62 drivers/net/phy/microchip_t1.c rc = phy_write(phydev, offset, val); phydev 64 drivers/net/phy/microchip_t1.c rc = phy_read(phydev, offset); phydev 70 drivers/net/phy/microchip_t1.c rc = phy_write(phydev, LAN87XX_EXT_REG_WR_DATA, val); phydev 79 drivers/net/phy/microchip_t1.c rc = phy_write(phydev, LAN87XX_EXT_REG_CTL, ereg); phydev 84 drivers/net/phy/microchip_t1.c rc = phy_read(phydev, LAN87XX_EXT_REG_RD_DATA); phydev 89 drivers/net/phy/microchip_t1.c static int access_ereg_modify_changed(struct phy_device *phydev, phydev 97 drivers/net/phy/microchip_t1.c rc = access_ereg(phydev, PHYACC_ATTR_MODE_READ, bank, offset, val); phydev 102 drivers/net/phy/microchip_t1.c rc = access_ereg(phydev, PHYACC_ATTR_MODE_WRITE, bank, offset, new); phydev 107 drivers/net/phy/microchip_t1.c static int lan87xx_phy_init(struct phy_device *phydev) phydev 145 drivers/net/phy/microchip_t1.c rc = access_ereg_modify_changed(phydev, PHYACC_ATTR_BANK_SMI, phydev 151 drivers/net/phy/microchip_t1.c rc = access_ereg_modify_changed(phydev, PHYACC_ATTR_BANK_SMI, phydev 158 drivers/net/phy/microchip_t1.c rc = access_ereg(phydev, PHYACC_ATTR_MODE_READ, phydev 168 drivers/net/phy/microchip_t1.c rc = access_ereg_modify_changed(phydev, init[i].bank, phydev 173 drivers/net/phy/microchip_t1.c rc = access_ereg(phydev, init[i].mode, init[i].bank, phydev 183 drivers/net/phy/microchip_t1.c static int lan87xx_phy_config_intr(struct phy_device *phydev) phydev 187 drivers/net/phy/microchip_t1.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 189 drivers/net/phy/microchip_t1.c rc = phy_write(phydev, LAN87XX_INTERRUPT_MASK, 0x7FFF); phydev 190 drivers/net/phy/microchip_t1.c rc = phy_read(phydev, LAN87XX_INTERRUPT_SOURCE); phydev 194 drivers/net/phy/microchip_t1.c rc = phy_write(phydev, LAN87XX_INTERRUPT_MASK, val); phydev 199 drivers/net/phy/microchip_t1.c static int lan87xx_phy_ack_interrupt(struct phy_device *phydev) phydev 201 drivers/net/phy/microchip_t1.c int rc = phy_read(phydev, LAN87XX_INTERRUPT_SOURCE); phydev 206 drivers/net/phy/microchip_t1.c static int lan87xx_config_init(struct phy_device *phydev) phydev 208 drivers/net/phy/microchip_t1.c int rc = lan87xx_phy_init(phydev); phydev 435 drivers/net/phy/mscc.c static int vsc85xx_phy_read_page(struct phy_device *phydev) phydev 437 drivers/net/phy/mscc.c return __phy_read(phydev, MSCC_EXT_PAGE_ACCESS); phydev 440 drivers/net/phy/mscc.c static int vsc85xx_phy_write_page(struct phy_device *phydev, int page) phydev 442 drivers/net/phy/mscc.c return __phy_write(phydev, MSCC_EXT_PAGE_ACCESS, page); phydev 445 drivers/net/phy/mscc.c static int vsc85xx_get_sset_count(struct phy_device *phydev) phydev 447 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 455 drivers/net/phy/mscc.c static void vsc85xx_get_strings(struct phy_device *phydev, u8 *data) phydev 457 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 468 drivers/net/phy/mscc.c static u64 vsc85xx_get_stat(struct phy_device *phydev, int i) phydev 470 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 473 drivers/net/phy/mscc.c val = phy_read_paged(phydev, priv->hw_stats[i].page, phydev 484 drivers/net/phy/mscc.c static void vsc85xx_get_stats(struct phy_device *phydev, phydev 487 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 494 drivers/net/phy/mscc.c data[i] = vsc85xx_get_stat(phydev, i); phydev 497 drivers/net/phy/mscc.c static int vsc85xx_led_cntl_set(struct phy_device *phydev, phydev 504 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 505 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MSCC_PHY_LED_MODE_SEL); phydev 508 drivers/net/phy/mscc.c rc = phy_write(phydev, MSCC_PHY_LED_MODE_SEL, reg_val); phydev 509 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 514 drivers/net/phy/mscc.c static int vsc85xx_mdix_get(struct phy_device *phydev, u8 *mdix) phydev 518 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MSCC_PHY_DEV_AUX_CNTL); phydev 527 drivers/net/phy/mscc.c static int vsc85xx_mdix_set(struct phy_device *phydev, u8 mdix) phydev 532 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MSCC_PHY_BYPASS_CONTROL); phydev 542 drivers/net/phy/mscc.c rc = phy_write(phydev, MSCC_PHY_BYPASS_CONTROL, reg_val); phydev 553 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED, phydev 559 drivers/net/phy/mscc.c return genphy_restart_aneg(phydev); phydev 562 drivers/net/phy/mscc.c static int vsc85xx_downshift_get(struct phy_device *phydev, u8 *count) phydev 566 drivers/net/phy/mscc.c reg_val = phy_read_paged(phydev, MSCC_PHY_PAGE_EXTENDED, phydev 580 drivers/net/phy/mscc.c static int vsc85xx_downshift_set(struct phy_device *phydev, u8 count) phydev 586 drivers/net/phy/mscc.c phydev_err(phydev, "Downshift count should be 2,3,4 or 5\n"); phydev 593 drivers/net/phy/mscc.c return phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED, phydev 598 drivers/net/phy/mscc.c static int vsc85xx_wol_set(struct phy_device *phydev, phydev 606 drivers/net/phy/mscc.c u8 *mac_addr = phydev->attached_dev->dev_addr; phydev 608 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 609 drivers/net/phy/mscc.c rc = phy_select_page(phydev, MSCC_PHY_PAGE_EXTENDED_2); phydev 611 drivers/net/phy/mscc.c rc = phy_restore_page(phydev, rc, rc); phydev 620 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_LOWER_MAC_ADDR, pwd[0]); phydev 621 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_MID_MAC_ADDR, pwd[1]); phydev 622 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_UPPER_MAC_ADDR, pwd[2]); phydev 624 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_LOWER_MAC_ADDR, 0); phydev 625 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_MID_MAC_ADDR, 0); phydev 626 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_UPPER_MAC_ADDR, 0); phydev 633 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_LOWER_PASSWD, pwd[0]); phydev 634 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_MID_PASSWD, pwd[1]); phydev 635 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_UPPER_PASSWD, pwd[2]); phydev 637 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_LOWER_PASSWD, 0); phydev 638 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_MID_PASSWD, 0); phydev 639 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_UPPER_PASSWD, 0); phydev 642 drivers/net/phy/mscc.c reg_val = __phy_read(phydev, MSCC_PHY_WOL_MAC_CONTROL); phydev 647 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_WOL_MAC_CONTROL, reg_val); phydev 649 drivers/net/phy/mscc.c rc = phy_restore_page(phydev, rc, rc > 0 ? 0 : rc); phydev 655 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MII_VSC85XX_INT_MASK); phydev 657 drivers/net/phy/mscc.c rc = phy_write(phydev, MII_VSC85XX_INT_MASK, reg_val); phydev 662 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MII_VSC85XX_INT_MASK); phydev 664 drivers/net/phy/mscc.c rc = phy_write(phydev, MII_VSC85XX_INT_MASK, reg_val); phydev 669 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MII_VSC85XX_INT_STATUS); phydev 672 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 677 drivers/net/phy/mscc.c static void vsc85xx_wol_get(struct phy_device *phydev, phydev 686 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 687 drivers/net/phy/mscc.c rc = phy_select_page(phydev, MSCC_PHY_PAGE_EXTENDED_2); phydev 691 drivers/net/phy/mscc.c reg_val = __phy_read(phydev, MSCC_PHY_WOL_MAC_CONTROL); phydev 695 drivers/net/phy/mscc.c pwd[0] = __phy_read(phydev, MSCC_PHY_WOL_LOWER_PASSWD); phydev 696 drivers/net/phy/mscc.c pwd[1] = __phy_read(phydev, MSCC_PHY_WOL_MID_PASSWD); phydev 697 drivers/net/phy/mscc.c pwd[2] = __phy_read(phydev, MSCC_PHY_WOL_UPPER_PASSWD); phydev 706 drivers/net/phy/mscc.c phy_restore_page(phydev, rc, rc > 0 ? 0 : rc); phydev 707 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 711 drivers/net/phy/mscc.c static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) phydev 715 drivers/net/phy/mscc.c struct device *dev = &phydev->mdio.dev; phydev 737 drivers/net/phy/mscc.c static int vsc85xx_dt_led_mode_get(struct phy_device *phydev, phydev 741 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 742 drivers/net/phy/mscc.c struct device *dev = &phydev->mdio.dev; phydev 753 drivers/net/phy/mscc.c phydev_err(phydev, "DT %s invalid\n", led); phydev 761 drivers/net/phy/mscc.c static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) phydev 766 drivers/net/phy/mscc.c static int vsc85xx_dt_led_mode_get(struct phy_device *phydev, phydev 774 drivers/net/phy/mscc.c static int vsc85xx_dt_led_modes_get(struct phy_device *phydev, phydev 777 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 786 drivers/net/phy/mscc.c ret = vsc85xx_dt_led_mode_get(phydev, led_dt_prop, phydev 796 drivers/net/phy/mscc.c static int vsc85xx_edge_rate_cntl_set(struct phy_device *phydev, u8 edge_rate) phydev 800 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 801 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED_2, phydev 804 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 809 drivers/net/phy/mscc.c static int vsc85xx_mac_if_set(struct phy_device *phydev, phydev 815 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 816 drivers/net/phy/mscc.c reg_val = phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_1); phydev 833 drivers/net/phy/mscc.c rc = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, reg_val); phydev 837 drivers/net/phy/mscc.c rc = genphy_soft_reset(phydev); phydev 840 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 845 drivers/net/phy/mscc.c static int vsc85xx_default_config(struct phy_device *phydev) phydev 850 drivers/net/phy/mscc.c phydev->mdix_ctrl = ETH_TP_MDI_AUTO; phydev 851 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 855 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED_2, phydev 859 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 864 drivers/net/phy/mscc.c static int vsc85xx_get_tunable(struct phy_device *phydev, phydev 869 drivers/net/phy/mscc.c return vsc85xx_downshift_get(phydev, (u8 *)data); phydev 875 drivers/net/phy/mscc.c static int vsc85xx_set_tunable(struct phy_device *phydev, phydev 881 drivers/net/phy/mscc.c return vsc85xx_downshift_set(phydev, *(u8 *)data); phydev 888 drivers/net/phy/mscc.c static void vsc85xx_tr_write(struct phy_device *phydev, u16 addr, u32 val) phydev 890 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_TR_MSB, val >> 16); phydev 891 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_TR_LSB, val & GENMASK(15, 0)); phydev 892 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_PHY_TR_CNTL, TR_WRITE | TR_ADDR(addr)); phydev 895 drivers/net/phy/mscc.c static int vsc8531_pre_init_seq_set(struct phy_device *phydev) phydev 907 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_STANDARD, phydev 912 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_TEST, phydev 916 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_TEST, phydev 920 drivers/net/phy/mscc.c rc = phy_modify_paged(phydev, MSCC_PHY_PAGE_TEST, phydev 925 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 926 drivers/net/phy/mscc.c oldpage = phy_select_page(phydev, MSCC_PHY_PAGE_TR); phydev 931 drivers/net/phy/mscc.c vsc85xx_tr_write(phydev, init_seq[i].reg, init_seq[i].val); phydev 934 drivers/net/phy/mscc.c oldpage = phy_restore_page(phydev, oldpage, oldpage); phydev 935 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 940 drivers/net/phy/mscc.c static int vsc85xx_eee_init_seq_set(struct phy_device *phydev) phydev 965 drivers/net/phy/mscc.c mutex_lock(&phydev->lock); phydev 966 drivers/net/phy/mscc.c oldpage = phy_select_page(phydev, MSCC_PHY_PAGE_TR); phydev 971 drivers/net/phy/mscc.c vsc85xx_tr_write(phydev, init_eee[i].reg, init_eee[i].val); phydev 974 drivers/net/phy/mscc.c oldpage = phy_restore_page(phydev, oldpage, oldpage); phydev 975 drivers/net/phy/mscc.c mutex_unlock(&phydev->lock); phydev 981 drivers/net/phy/mscc.c static int phy_base_write(struct phy_device *phydev, u32 regnum, u16 val) phydev 983 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 985 drivers/net/phy/mscc.c if (unlikely(!mutex_is_locked(&phydev->mdio.bus->mdio_lock))) { phydev 986 drivers/net/phy/mscc.c dev_err(&phydev->mdio.dev, "MDIO bus lock not held!\n"); phydev 990 drivers/net/phy/mscc.c return __mdiobus_write(phydev->mdio.bus, priv->base_addr, regnum, val); phydev 994 drivers/net/phy/mscc.c static int phy_base_read(struct phy_device *phydev, u32 regnum) phydev 996 drivers/net/phy/mscc.c struct vsc8531_private *priv = phydev->priv; phydev 998 drivers/net/phy/mscc.c if (unlikely(!mutex_is_locked(&phydev->mdio.bus->mdio_lock))) { phydev 999 drivers/net/phy/mscc.c dev_err(&phydev->mdio.dev, "MDIO bus lock not held!\n"); phydev 1003 drivers/net/phy/mscc.c return __mdiobus_read(phydev->mdio.bus, priv->base_addr, regnum); phydev 1007 drivers/net/phy/mscc.c static void vsc8584_csr_write(struct phy_device *phydev, u16 addr, u32 val) phydev 1009 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TR_MSB, val >> 16); phydev 1010 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TR_LSB, val & GENMASK(15, 0)); phydev 1011 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TR_CNTL, TR_WRITE | TR_ADDR(addr)); phydev 1015 drivers/net/phy/mscc.c static int vsc8584_cmd(struct phy_device *phydev, u16 val) phydev 1020 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1023 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_PROC_CMD, PROC_CMD_NCOMPLETED | val); phydev 1027 drivers/net/phy/mscc.c reg_val = phy_base_read(phydev, MSCC_PHY_PROC_CMD); phydev 1032 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1044 drivers/net/phy/mscc.c static int vsc8584_micro_deassert_reset(struct phy_device *phydev, phydev 1049 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1061 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, READ_RAM); phydev 1067 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_DW8051_CNTL_STATUS, enable); phydev 1069 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_DW8051_CNTL_STATUS, release); phydev 1071 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1077 drivers/net/phy/mscc.c static int vsc8584_micro_assert_reset(struct phy_device *phydev) phydev 1082 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, PROC_CMD_NOP); phydev 1086 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1089 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_INT_MEM_CNTL); phydev 1091 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, reg); phydev 1093 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_TRAP_ROM_ADDR(4), 0x005b); phydev 1094 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PATCH_RAM_ADDR(4), 0x005b); phydev 1096 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_INT_MEM_CNTL); phydev 1098 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, reg); phydev 1100 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_PROC_CMD, PROC_CMD_NOP); phydev 1102 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_DW8051_CNTL_STATUS); phydev 1104 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_DW8051_CNTL_STATUS, reg); phydev 1106 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_PROC_CMD, PROC_CMD_MCB_ACCESS_MAC_CONF | phydev 1110 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_INT_MEM_CNTL); phydev 1112 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, reg); phydev 1114 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1120 drivers/net/phy/mscc.c static int vsc8584_get_fw_crc(struct phy_device *phydev, u16 start, u16 size, phydev 1125 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_EXTENDED); phydev 1127 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_VERIPHY_CNTL_2, start); phydev 1128 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_VERIPHY_CNTL_3, size); phydev 1131 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, PROC_CMD_CRC16); phydev 1135 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_EXTENDED); phydev 1137 drivers/net/phy/mscc.c *crc = phy_base_read(phydev, MSCC_PHY_VERIPHY_CNTL_2); phydev 1140 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1146 drivers/net/phy/mscc.c static int vsc8584_patch_fw(struct phy_device *phydev, phydev 1151 drivers/net/phy/mscc.c ret = vsc8584_micro_assert_reset(phydev); phydev 1153 drivers/net/phy/mscc.c dev_err(&phydev->mdio.dev, phydev 1158 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1164 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_DW8051_CNTL_STATUS, RUN_FROM_INT_ROM | phydev 1167 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, READ_PRAM | INT_MEM_WRITE_EN | phydev 1169 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_ADDR, 0x0000); phydev 1172 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, READ_PRAM | phydev 1176 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, READ_RAM); phydev 1178 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1184 drivers/net/phy/mscc.c static bool vsc8574_is_serdes_init(struct phy_device *phydev) phydev 1189 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1192 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_TRAP_ROM_ADDR(1)); phydev 1198 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PATCH_RAM_ADDR(1)); phydev 1204 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_INT_MEM_CNTL); phydev 1210 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_DW8051_CNTL_STATUS); phydev 1219 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1225 drivers/net/phy/mscc.c static int vsc8574_config_pre_init(struct phy_device *phydev) phydev 1291 drivers/net/phy/mscc.c struct device *dev = &phydev->mdio.dev; phydev 1298 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1301 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_EXT_CNTL_STATUS); phydev 1303 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_CNTL_STATUS, reg); phydev 1305 drivers/net/phy/mscc.c phy_base_write(phydev, MII_VSC85XX_INT_MASK, 0); phydev 1312 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_PHY_CNTL_2, 0x0040); phydev 1314 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TEST); phydev 1316 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_20, 0x4320); phydev 1317 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_24, 0x0c00); phydev 1318 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_9, 0x18ca); phydev 1319 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_5, 0x1b20); phydev 1321 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TEST_PAGE_8); phydev 1323 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_8, reg); phydev 1325 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TR); phydev 1328 drivers/net/phy/mscc.c vsc8584_csr_write(phydev, pre_init1[i].reg, pre_init1[i].val); phydev 1330 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_EXTENDED_2); phydev 1332 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_CU_PMD_TX_CNTL, 0x028e); phydev 1334 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TR); phydev 1337 drivers/net/phy/mscc.c vsc8584_csr_write(phydev, pre_init2[i].reg, pre_init2[i].val); phydev 1339 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TEST); phydev 1341 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TEST_PAGE_8); phydev 1343 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_8, reg); phydev 1345 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1348 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_EXT_CNTL_STATUS); phydev 1350 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_CNTL_STATUS, reg); phydev 1360 drivers/net/phy/mscc.c ret = vsc8584_get_fw_crc(phydev, phydev 1367 drivers/net/phy/mscc.c serdes_init = vsc8574_is_serdes_init(phydev); phydev 1370 drivers/net/phy/mscc.c ret = vsc8584_micro_assert_reset(phydev); phydev 1383 drivers/net/phy/mscc.c if (vsc8584_patch_fw(phydev, fw)) phydev 1389 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1392 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_TRAP_ROM_ADDR(1), 0x3eb7); phydev 1393 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PATCH_RAM_ADDR(1), 0x4012); phydev 1394 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_INT_MEM_CNTL, phydev 1397 drivers/net/phy/mscc.c vsc8584_micro_deassert_reset(phydev, false); phydev 1402 drivers/net/phy/mscc.c ret = vsc8584_get_fw_crc(phydev, phydev 1413 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1416 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, PROC_CMD_1588_DEFAULT_INIT | phydev 1420 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1428 drivers/net/phy/mscc.c static int vsc8584_config_pre_init(struct phy_device *phydev) phydev 1460 drivers/net/phy/mscc.c struct device *dev = &phydev->mdio.dev; phydev 1465 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1468 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_EXT_CNTL_STATUS); phydev 1470 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_CNTL_STATUS, reg); phydev 1472 drivers/net/phy/mscc.c phy_base_write(phydev, MII_VSC85XX_INT_MASK, 0); phydev 1474 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_BYPASS_CONTROL); phydev 1476 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_BYPASS_CONTROL, reg); phydev 1483 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_EXTENDED_3); phydev 1485 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_SERDES_TX_CRC_ERR_CNT, 0x2000); phydev 1487 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TEST); phydev 1489 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_5, 0x1f20); phydev 1491 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TEST_PAGE_8); phydev 1493 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_8, reg); phydev 1495 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TR); phydev 1497 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TR_CNTL, TR_WRITE | TR_ADDR(0x2fa4)); phydev 1499 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TR_MSB); phydev 1502 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TR_MSB, reg); phydev 1504 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TR_CNTL, TR_WRITE | TR_ADDR(0x0fa4)); phydev 1507 drivers/net/phy/mscc.c vsc8584_csr_write(phydev, pre_init1[i].reg, pre_init1[i].val); phydev 1509 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_EXTENDED_2); phydev 1511 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_CU_PMD_TX_CNTL, 0x028e); phydev 1513 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TR); phydev 1516 drivers/net/phy/mscc.c vsc8584_csr_write(phydev, pre_init2[i].reg, pre_init2[i].val); phydev 1518 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TEST); phydev 1520 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TEST_PAGE_8); phydev 1522 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_8, reg); phydev 1524 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1527 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_EXT_CNTL_STATUS); phydev 1529 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_CNTL_STATUS, reg); phydev 1539 drivers/net/phy/mscc.c ret = vsc8584_get_fw_crc(phydev, phydev 1547 drivers/net/phy/mscc.c if (vsc8584_patch_fw(phydev, fw)) phydev 1552 drivers/net/phy/mscc.c vsc8584_micro_deassert_reset(phydev, false); phydev 1555 drivers/net/phy/mscc.c ret = vsc8584_get_fw_crc(phydev, phydev 1565 drivers/net/phy/mscc.c ret = vsc8584_micro_assert_reset(phydev); phydev 1569 drivers/net/phy/mscc.c vsc8584_micro_deassert_reset(phydev, true); phydev 1572 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1582 drivers/net/phy/mscc.c static bool vsc8584_is_pkg_init(struct phy_device *phydev, bool reversed) phydev 1584 drivers/net/phy/mscc.c struct mdio_device **map = phydev->mdio.bus->mdio_map; phydev 1591 drivers/net/phy/mscc.c vsc8531 = phydev->priv; phydev 1600 drivers/net/phy/mscc.c if ((phy->phy_id & phydev->drv->phy_id_mask) != phydev 1601 drivers/net/phy/mscc.c (phydev->drv->phy_id & phydev->drv->phy_id_mask)) phydev 1613 drivers/net/phy/mscc.c static int vsc8584_config_init(struct phy_device *phydev) phydev 1615 drivers/net/phy/mscc.c struct vsc8531_private *vsc8531 = phydev->priv; phydev 1619 drivers/net/phy/mscc.c phydev->mdix_ctrl = ETH_TP_MDI_AUTO; phydev 1621 drivers/net/phy/mscc.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 1623 drivers/net/phy/mscc.c __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, phydev 1625 drivers/net/phy/mscc.c addr = __mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, phydev 1629 drivers/net/phy/mscc.c val = __mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, phydev 1632 drivers/net/phy/mscc.c vsc8531->base_addr = phydev->mdio.addr + addr; phydev 1634 drivers/net/phy/mscc.c vsc8531->base_addr = phydev->mdio.addr - addr; phydev 1649 drivers/net/phy/mscc.c if (!vsc8584_is_pkg_init(phydev, val & PHY_ADDR_REVERSED ? 1 : 0)) { phydev 1650 drivers/net/phy/mscc.c if ((phydev->phy_id & phydev->drv->phy_id_mask) == phydev 1651 drivers/net/phy/mscc.c (PHY_ID_VSC8574 & phydev->drv->phy_id_mask)) phydev 1652 drivers/net/phy/mscc.c ret = vsc8574_config_pre_init(phydev); phydev 1653 drivers/net/phy/mscc.c else if ((phydev->phy_id & phydev->drv->phy_id_mask) == phydev 1654 drivers/net/phy/mscc.c (PHY_ID_VSC8584 & phydev->drv->phy_id_mask)) phydev 1655 drivers/net/phy/mscc.c ret = vsc8584_config_pre_init(phydev); phydev 1665 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1668 drivers/net/phy/mscc.c val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK); phydev 1670 drivers/net/phy/mscc.c if (phydev->interface == PHY_INTERFACE_MODE_QSGMII) phydev 1675 drivers/net/phy/mscc.c ret = phy_base_write(phydev, MSCC_PHY_MAC_CFG_FASTLINK, val); phydev 1681 drivers/net/phy/mscc.c if (phydev->interface == PHY_INTERFACE_MODE_QSGMII) phydev 1686 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, val); phydev 1693 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, PROC_CMD_FIBER_MEDIA_CONF | phydev 1701 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, PROC_CMD_FIBER_MEDIA_CONF | phydev 1708 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 1710 drivers/net/phy/mscc.c phy_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1712 drivers/net/phy/mscc.c val = phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_1); phydev 1716 drivers/net/phy/mscc.c ret = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, val); phydev 1718 drivers/net/phy/mscc.c ret = genphy_soft_reset(phydev); phydev 1723 drivers/net/phy/mscc.c ret = vsc85xx_led_cntl_set(phydev, i, vsc8531->leds_mode[i]); phydev 1731 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 1735 drivers/net/phy/mscc.c static int vsc85xx_config_init(struct phy_device *phydev) phydev 1738 drivers/net/phy/mscc.c struct vsc8531_private *vsc8531 = phydev->priv; phydev 1740 drivers/net/phy/mscc.c rc = vsc85xx_default_config(phydev); phydev 1744 drivers/net/phy/mscc.c rc = vsc85xx_mac_if_set(phydev, phydev->interface); phydev 1748 drivers/net/phy/mscc.c rc = vsc85xx_edge_rate_cntl_set(phydev, vsc8531->rate_magic); phydev 1752 drivers/net/phy/mscc.c phy_id = phydev->drv->phy_id & phydev->drv->phy_id_mask; phydev 1755 drivers/net/phy/mscc.c rc = vsc8531_pre_init_seq_set(phydev); phydev 1760 drivers/net/phy/mscc.c rc = vsc85xx_eee_init_seq_set(phydev); phydev 1765 drivers/net/phy/mscc.c rc = vsc85xx_led_cntl_set(phydev, i, vsc8531->leds_mode[i]); phydev 1773 drivers/net/phy/mscc.c static int vsc8584_did_interrupt(struct phy_device *phydev) phydev 1777 drivers/net/phy/mscc.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 1778 drivers/net/phy/mscc.c rc = phy_read(phydev, MII_VSC85XX_INT_STATUS); phydev 1783 drivers/net/phy/mscc.c static int vsc8514_config_pre_init(struct phy_device *phydev) phydev 1814 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1817 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_EXT_CNTL_STATUS); phydev 1819 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_CNTL_STATUS, reg); phydev 1821 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TEST); phydev 1823 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TEST_PAGE_8); phydev 1825 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_8, reg); phydev 1827 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TR); phydev 1830 drivers/net/phy/mscc.c vsc8584_csr_write(phydev, pre_init1[i].reg, pre_init1[i].val); phydev 1832 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_TEST); phydev 1834 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_TEST_PAGE_8); phydev 1836 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_TEST_PAGE_8, reg); phydev 1838 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 1840 drivers/net/phy/mscc.c reg = phy_base_read(phydev, MSCC_PHY_EXT_CNTL_STATUS); phydev 1842 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_PHY_EXT_CNTL_STATUS, reg); phydev 1847 drivers/net/phy/mscc.c static u32 vsc85xx_csr_ctrl_phy_read(struct phy_device *phydev, phydev 1853 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_CSR_CNTL); phydev 1863 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_CSR_CNTL_20, phydev 1867 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_CSR_CNTL_19, phydev 1876 drivers/net/phy/mscc.c val = phy_base_read(phydev, MSCC_EXT_PAGE_CSR_CNTL_19); phydev 1884 drivers/net/phy/mscc.c val_l = phy_base_read(phydev, MSCC_EXT_PAGE_CSR_CNTL_17); phydev 1887 drivers/net/phy/mscc.c val_h = phy_base_read(phydev, MSCC_EXT_PAGE_CSR_CNTL_18); phydev 1889 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1895 drivers/net/phy/mscc.c static int vsc85xx_csr_ctrl_phy_write(struct phy_device *phydev, phydev 1900 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_CSR_CNTL); phydev 1910 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_CSR_CNTL_20, phydev 1914 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_CSR_CNTL_17, (u16)val); phydev 1917 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_CSR_CNTL_18, (u16)(val >> 16)); phydev 1920 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_CSR_CNTL_19, phydev 1929 drivers/net/phy/mscc.c val = phy_base_read(phydev, MSCC_EXT_PAGE_CSR_CNTL_19); phydev 1936 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 1942 drivers/net/phy/mscc.c static int __phy_write_mcb_s6g(struct phy_device *phydev, u32 reg, u8 mcb, phydev 1949 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, reg, phydev 1957 drivers/net/phy/mscc.c val = vsc85xx_csr_ctrl_phy_read(phydev, PHY_MCB_TARGET, reg); phydev 1971 drivers/net/phy/mscc.c static int phy_update_mcb_s6g(struct phy_device *phydev, u32 reg, u8 mcb) phydev 1973 drivers/net/phy/mscc.c return __phy_write_mcb_s6g(phydev, reg, mcb, PHY_MCB_S6G_READ); phydev 1977 drivers/net/phy/mscc.c static int phy_commit_mcb_s6g(struct phy_device *phydev, u32 reg, u8 mcb) phydev 1979 drivers/net/phy/mscc.c return __phy_write_mcb_s6g(phydev, reg, mcb, PHY_MCB_S6G_WRITE); phydev 1982 drivers/net/phy/mscc.c static int vsc8514_config_init(struct phy_device *phydev) phydev 1984 drivers/net/phy/mscc.c struct vsc8531_private *vsc8531 = phydev->priv; phydev 1990 drivers/net/phy/mscc.c phydev->mdix_ctrl = ETH_TP_MDI_AUTO; phydev 1992 drivers/net/phy/mscc.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 1994 drivers/net/phy/mscc.c __phy_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_EXTENDED); phydev 1996 drivers/net/phy/mscc.c addr = __phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_4); phydev 1999 drivers/net/phy/mscc.c val = __phy_read(phydev, MSCC_PHY_ACTIPHY_CNTL); phydev 2002 drivers/net/phy/mscc.c vsc8531->base_addr = phydev->mdio.addr + addr; phydev 2004 drivers/net/phy/mscc.c vsc8531->base_addr = phydev->mdio.addr - addr; phydev 2017 drivers/net/phy/mscc.c if (!vsc8584_is_pkg_init(phydev, val & PHY_ADDR_REVERSED ? 1 : 0)) phydev 2018 drivers/net/phy/mscc.c vsc8514_config_pre_init(phydev); phydev 2022 drivers/net/phy/mscc.c phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, phydev 2025 drivers/net/phy/mscc.c val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK); phydev 2029 drivers/net/phy/mscc.c ret = phy_base_write(phydev, MSCC_PHY_MAC_CFG_FASTLINK, val); phydev 2034 drivers/net/phy/mscc.c ret = vsc8584_cmd(phydev, phydev 2042 drivers/net/phy/mscc.c phy_update_mcb_s6g(phydev, PHY_MCB_S6G_CFG, 0); phydev 2044 drivers/net/phy/mscc.c phy_update_mcb_s6g(phydev, PHY_S6G_LCPLL_CFG, 0); phydev 2046 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, phydev 2051 drivers/net/phy/mscc.c phy_commit_mcb_s6g(phydev, PHY_S6G_LCPLL_CFG, 0); phydev 2053 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, phydev 2062 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, phydev 2073 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, phydev 2079 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, phydev 2084 drivers/net/phy/mscc.c phy_commit_mcb_s6g(phydev, PHY_S6G_DFT_CFG2, 0); phydev 2089 drivers/net/phy/mscc.c phy_update_mcb_s6g(phydev, PHY_MCB_S6G_CFG, phydev 2091 drivers/net/phy/mscc.c reg = vsc85xx_csr_ctrl_phy_read(phydev, PHY_MCB_TARGET, phydev 2094 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 2101 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 2106 drivers/net/phy/mscc.c ret = vsc85xx_csr_ctrl_phy_write(phydev, PHY_MCB_TARGET, phydev 2111 drivers/net/phy/mscc.c phy_commit_mcb_s6g(phydev, PHY_MCB_S6G_CFG, 0); phydev 2116 drivers/net/phy/mscc.c phy_update_mcb_s6g(phydev, PHY_MCB_S6G_CFG, phydev 2118 drivers/net/phy/mscc.c reg = vsc85xx_csr_ctrl_phy_read(phydev, PHY_MCB_TARGET, phydev 2121 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 2128 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 2132 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 2134 drivers/net/phy/mscc.c ret = phy_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); phydev 2139 drivers/net/phy/mscc.c ret = phy_modify(phydev, MSCC_PHY_EXT_PHY_CNTL_1, MEDIA_OP_MODE_MASK, phydev 2145 drivers/net/phy/mscc.c ret = genphy_soft_reset(phydev); phydev 2151 drivers/net/phy/mscc.c ret = vsc85xx_led_cntl_set(phydev, i, vsc8531->leds_mode[i]); phydev 2159 drivers/net/phy/mscc.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 2163 drivers/net/phy/mscc.c static int vsc85xx_ack_interrupt(struct phy_device *phydev) phydev 2167 drivers/net/phy/mscc.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 2168 drivers/net/phy/mscc.c rc = phy_read(phydev, MII_VSC85XX_INT_STATUS); phydev 2173 drivers/net/phy/mscc.c static int vsc85xx_config_intr(struct phy_device *phydev) phydev 2177 drivers/net/phy/mscc.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 2178 drivers/net/phy/mscc.c rc = phy_write(phydev, MII_VSC85XX_INT_MASK, phydev 2181 drivers/net/phy/mscc.c rc = phy_write(phydev, MII_VSC85XX_INT_MASK, 0); phydev 2184 drivers/net/phy/mscc.c rc = phy_read(phydev, MII_VSC85XX_INT_STATUS); phydev 2190 drivers/net/phy/mscc.c static int vsc85xx_config_aneg(struct phy_device *phydev) phydev 2194 drivers/net/phy/mscc.c rc = vsc85xx_mdix_set(phydev, phydev->mdix_ctrl); phydev 2198 drivers/net/phy/mscc.c return genphy_config_aneg(phydev); phydev 2201 drivers/net/phy/mscc.c static int vsc85xx_read_status(struct phy_device *phydev) phydev 2205 drivers/net/phy/mscc.c rc = vsc85xx_mdix_get(phydev, &phydev->mdix); phydev 2209 drivers/net/phy/mscc.c return genphy_read_status(phydev); phydev 2212 drivers/net/phy/mscc.c static int vsc8514_probe(struct phy_device *phydev) phydev 2219 drivers/net/phy/mscc.c vsc8531 = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531), GFP_KERNEL); phydev 2223 drivers/net/phy/mscc.c phydev->priv = vsc8531; phydev 2229 drivers/net/phy/mscc.c vsc8531->stats = devm_kcalloc(&phydev->mdio.dev, vsc8531->nstats, phydev 2234 drivers/net/phy/mscc.c return vsc85xx_dt_led_modes_get(phydev, default_mode); phydev 2237 drivers/net/phy/mscc.c static int vsc8574_probe(struct phy_device *phydev) phydev 2244 drivers/net/phy/mscc.c vsc8531 = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531), GFP_KERNEL); phydev 2248 drivers/net/phy/mscc.c phydev->priv = vsc8531; phydev 2254 drivers/net/phy/mscc.c vsc8531->stats = devm_kcalloc(&phydev->mdio.dev, vsc8531->nstats, phydev 2259 drivers/net/phy/mscc.c return vsc85xx_dt_led_modes_get(phydev, default_mode); phydev 2262 drivers/net/phy/mscc.c static int vsc8584_probe(struct phy_device *phydev) phydev 2269 drivers/net/phy/mscc.c if ((phydev->phy_id & MSCC_DEV_REV_MASK) != VSC8584_REVB) { phydev 2270 drivers/net/phy/mscc.c dev_err(&phydev->mdio.dev, "Only VSC8584 revB is supported.\n"); phydev 2274 drivers/net/phy/mscc.c vsc8531 = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531), GFP_KERNEL); phydev 2278 drivers/net/phy/mscc.c phydev->priv = vsc8531; phydev 2284 drivers/net/phy/mscc.c vsc8531->stats = devm_kcalloc(&phydev->mdio.dev, vsc8531->nstats, phydev 2289 drivers/net/phy/mscc.c return vsc85xx_dt_led_modes_get(phydev, default_mode); phydev 2292 drivers/net/phy/mscc.c static int vsc85xx_probe(struct phy_device *phydev) phydev 2299 drivers/net/phy/mscc.c rate_magic = vsc85xx_edge_rate_magic_get(phydev); phydev 2303 drivers/net/phy/mscc.c vsc8531 = devm_kzalloc(&phydev->mdio.dev, sizeof(*vsc8531), GFP_KERNEL); phydev 2307 drivers/net/phy/mscc.c phydev->priv = vsc8531; phydev 2314 drivers/net/phy/mscc.c vsc8531->stats = devm_kcalloc(&phydev->mdio.dev, vsc8531->nstats, phydev 2319 drivers/net/phy/mscc.c return vsc85xx_dt_led_modes_get(phydev, default_mode); phydev 54 drivers/net/phy/national.c static u8 ns_exp_read(struct phy_device *phydev, u16 reg) phydev 56 drivers/net/phy/national.c phy_write(phydev, NS_EXP_MEM_ADD, reg); phydev 57 drivers/net/phy/national.c return phy_read(phydev, NS_EXP_MEM_DATA); phydev 60 drivers/net/phy/national.c static void ns_exp_write(struct phy_device *phydev, u16 reg, u8 data) phydev 62 drivers/net/phy/national.c phy_write(phydev, NS_EXP_MEM_ADD, reg); phydev 63 drivers/net/phy/national.c phy_write(phydev, NS_EXP_MEM_DATA, data); phydev 66 drivers/net/phy/national.c static int ns_config_intr(struct phy_device *phydev) phydev 70 drivers/net/phy/national.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 71 drivers/net/phy/national.c err = phy_write(phydev, DP83865_INT_MASK, phydev 74 drivers/net/phy/national.c err = phy_write(phydev, DP83865_INT_MASK, 0); phydev 79 drivers/net/phy/national.c static int ns_ack_interrupt(struct phy_device *phydev) phydev 81 drivers/net/phy/national.c int ret = phy_read(phydev, DP83865_INT_STATUS); phydev 87 drivers/net/phy/national.c ret = phy_write(phydev, DP83865_INT_CLEAR, ret & ~0x7); phydev 92 drivers/net/phy/national.c static void ns_giga_speed_fallback(struct phy_device *phydev, int mode) phydev 94 drivers/net/phy/national.c int bmcr = phy_read(phydev, MII_BMCR); phydev 96 drivers/net/phy/national.c phy_write(phydev, MII_BMCR, (bmcr | BMCR_PDOWN)); phydev 99 drivers/net/phy/national.c phy_write(phydev, NS_EXP_MEM_CTL, 0); phydev 100 drivers/net/phy/national.c phy_write(phydev, NS_EXP_MEM_ADD, 0x1C0); phydev 101 drivers/net/phy/national.c phy_write(phydev, NS_EXP_MEM_DATA, 0x0008); phydev 102 drivers/net/phy/national.c phy_write(phydev, MII_BMCR, (bmcr & ~BMCR_PDOWN)); phydev 103 drivers/net/phy/national.c phy_write(phydev, LED_CTRL_REG, mode); phydev 106 drivers/net/phy/national.c static void ns_10_base_t_hdx_loopack(struct phy_device *phydev, int disable) phydev 111 drivers/net/phy/national.c ns_exp_write(phydev, 0x1c0, phydev 112 drivers/net/phy/national.c ns_exp_read(phydev, 0x1c0) | lb_dis); phydev 114 drivers/net/phy/national.c ns_exp_write(phydev, 0x1c0, phydev 115 drivers/net/phy/national.c ns_exp_read(phydev, 0x1c0) & ~lb_dis); phydev 118 drivers/net/phy/national.c (ns_exp_read(phydev, 0x1c0) & lb_dis) ? "off" : "on"); phydev 121 drivers/net/phy/national.c static int ns_config_init(struct phy_device *phydev) phydev 123 drivers/net/phy/national.c ns_giga_speed_fallback(phydev, ALL_FALLBACK_ON); phydev 126 drivers/net/phy/national.c ns_10_base_t_hdx_loopack(phydev, hdx_loopback_off); phydev 127 drivers/net/phy/national.c return ns_ack_interrupt(phydev); phydev 73 drivers/net/phy/nxp-tja11xx.c static int tja11xx_check(struct phy_device *phydev, u8 reg, u16 mask, u16 set) phydev 78 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, reg); phydev 91 drivers/net/phy/nxp-tja11xx.c static int phy_modify_check(struct phy_device *phydev, u8 reg, phydev 96 drivers/net/phy/nxp-tja11xx.c ret = phy_modify(phydev, reg, mask, set); phydev 100 drivers/net/phy/nxp-tja11xx.c return tja11xx_check(phydev, reg, mask, set); phydev 103 drivers/net/phy/nxp-tja11xx.c static int tja11xx_enable_reg_write(struct phy_device *phydev) phydev 105 drivers/net/phy/nxp-tja11xx.c return phy_set_bits(phydev, MII_ECTRL, MII_ECTRL_CONFIG_EN); phydev 108 drivers/net/phy/nxp-tja11xx.c static int tja11xx_enable_link_control(struct phy_device *phydev) phydev 110 drivers/net/phy/nxp-tja11xx.c return phy_set_bits(phydev, MII_ECTRL, MII_ECTRL_LINK_CONTROL); phydev 113 drivers/net/phy/nxp-tja11xx.c static int tja11xx_wakeup(struct phy_device *phydev) phydev 117 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, MII_ECTRL); phydev 125 drivers/net/phy/nxp-tja11xx.c ret = phy_set_bits(phydev, MII_ECTRL, MII_ECTRL_WAKE_REQUEST); phydev 129 drivers/net/phy/nxp-tja11xx.c ret = phy_clear_bits(phydev, MII_ECTRL, MII_ECTRL_WAKE_REQUEST); phydev 134 drivers/net/phy/nxp-tja11xx.c ret = phy_modify_check(phydev, MII_ECTRL, phydev 140 drivers/net/phy/nxp-tja11xx.c ret = phy_modify(phydev, MII_ECTRL, MII_ECTRL_POWER_MODE_MASK, phydev 145 drivers/net/phy/nxp-tja11xx.c ret = phy_modify_check(phydev, MII_GENSTAT, phydev 151 drivers/net/phy/nxp-tja11xx.c return tja11xx_enable_link_control(phydev); phydev 159 drivers/net/phy/nxp-tja11xx.c static int tja11xx_soft_reset(struct phy_device *phydev) phydev 163 drivers/net/phy/nxp-tja11xx.c ret = tja11xx_enable_reg_write(phydev); phydev 167 drivers/net/phy/nxp-tja11xx.c return genphy_soft_reset(phydev); phydev 170 drivers/net/phy/nxp-tja11xx.c static int tja11xx_config_init(struct phy_device *phydev) phydev 174 drivers/net/phy/nxp-tja11xx.c ret = tja11xx_enable_reg_write(phydev); phydev 178 drivers/net/phy/nxp-tja11xx.c phydev->autoneg = AUTONEG_DISABLE; phydev 179 drivers/net/phy/nxp-tja11xx.c phydev->speed = SPEED_100; phydev 180 drivers/net/phy/nxp-tja11xx.c phydev->duplex = DUPLEX_FULL; phydev 182 drivers/net/phy/nxp-tja11xx.c switch (phydev->phy_id & PHY_ID_MASK) { phydev 184 drivers/net/phy/nxp-tja11xx.c ret = phy_modify(phydev, MII_CFG1, phydev 193 drivers/net/phy/nxp-tja11xx.c ret = phy_set_bits(phydev, MII_COMMCFG, MII_COMMCFG_AUTO_OP); phydev 201 drivers/net/phy/nxp-tja11xx.c ret = phy_clear_bits(phydev, MII_CFG1, MII_CFG1_SLEEP_CONFIRM); phydev 205 drivers/net/phy/nxp-tja11xx.c ret = phy_modify(phydev, MII_CFG2, MII_CFG2_SLEEP_REQUEST_TO, phydev 210 drivers/net/phy/nxp-tja11xx.c ret = tja11xx_wakeup(phydev); phydev 215 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, MII_INTSRC); phydev 222 drivers/net/phy/nxp-tja11xx.c static int tja11xx_read_status(struct phy_device *phydev) phydev 226 drivers/net/phy/nxp-tja11xx.c ret = genphy_update_link(phydev); phydev 230 drivers/net/phy/nxp-tja11xx.c if (phydev->link) { phydev 231 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, MII_COMMSTAT); phydev 236 drivers/net/phy/nxp-tja11xx.c phydev->link = 0; phydev 242 drivers/net/phy/nxp-tja11xx.c static int tja11xx_get_sset_count(struct phy_device *phydev) phydev 247 drivers/net/phy/nxp-tja11xx.c static void tja11xx_get_strings(struct phy_device *phydev, u8 *data) phydev 257 drivers/net/phy/nxp-tja11xx.c static void tja11xx_get_stats(struct phy_device *phydev, phydev 263 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, tja11xx_hw_stats[i].reg); phydev 277 drivers/net/phy/nxp-tja11xx.c struct phy_device *phydev = dev_get_drvdata(dev); phydev 281 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, MII_INTSRC); phydev 290 drivers/net/phy/nxp-tja11xx.c ret = phy_read(phydev, MII_INTSRC); phydev 330 drivers/net/phy/nxp-tja11xx.c static int tja11xx_probe(struct phy_device *phydev) phydev 332 drivers/net/phy/nxp-tja11xx.c struct device *dev = &phydev->mdio.dev; phydev 350 drivers/net/phy/nxp-tja11xx.c phydev, phydev 15 drivers/net/phy/phy-c45.c int genphy_c45_pma_setup_forced(struct phy_device *phydev) phydev 20 drivers/net/phy/phy-c45.c if (phydev->duplex != DUPLEX_FULL) phydev 23 drivers/net/phy/phy-c45.c ctrl1 = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL1); phydev 27 drivers/net/phy/phy-c45.c ctrl2 = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL2); phydev 38 drivers/net/phy/phy-c45.c switch (phydev->speed) { phydev 70 drivers/net/phy/phy-c45.c ret = phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL1, ctrl1); phydev 74 drivers/net/phy/phy-c45.c ret = phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL2, ctrl2); phydev 78 drivers/net/phy/phy-c45.c return genphy_c45_an_disable_aneg(phydev); phydev 91 drivers/net/phy/phy-c45.c int genphy_c45_an_config_aneg(struct phy_device *phydev) phydev 96 drivers/net/phy/phy-c45.c linkmode_and(phydev->advertising, phydev->advertising, phydev 97 drivers/net/phy/phy-c45.c phydev->supported); phydev 99 drivers/net/phy/phy-c45.c changed = genphy_config_eee_advert(phydev); phydev 101 drivers/net/phy/phy-c45.c adv = linkmode_adv_to_mii_adv_t(phydev->advertising); phydev 103 drivers/net/phy/phy-c45.c ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE, phydev 112 drivers/net/phy/phy-c45.c adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising); phydev 114 drivers/net/phy/phy-c45.c ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL, phydev 136 drivers/net/phy/phy-c45.c int genphy_c45_an_disable_aneg(struct phy_device *phydev) phydev 139 drivers/net/phy/phy-c45.c return phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1, phydev 152 drivers/net/phy/phy-c45.c int genphy_c45_restart_aneg(struct phy_device *phydev) phydev 154 drivers/net/phy/phy-c45.c return phy_set_bits_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1, phydev 168 drivers/net/phy/phy-c45.c int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart) phydev 174 drivers/net/phy/phy-c45.c ret = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1); phydev 183 drivers/net/phy/phy-c45.c ret = genphy_c45_restart_aneg(phydev); phydev 200 drivers/net/phy/phy-c45.c int genphy_c45_aneg_done(struct phy_device *phydev) phydev 202 drivers/net/phy/phy-c45.c int val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); phydev 216 drivers/net/phy/phy-c45.c int genphy_c45_read_link(struct phy_device *phydev) phydev 222 drivers/net/phy/phy-c45.c if (phydev->c45_ids.devices_in_package & MDIO_DEVS_AN) { phydev 223 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1); phydev 231 drivers/net/phy/phy-c45.c phydev->link = 0; phydev 244 drivers/net/phy/phy-c45.c if (!phy_polling_mode(phydev)) { phydev 245 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, devad, MDIO_STAT1); phydev 252 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, devad, MDIO_STAT1); phydev 260 drivers/net/phy/phy-c45.c phydev->link = link; phydev 276 drivers/net/phy/phy-c45.c int genphy_c45_read_lpa(struct phy_device *phydev) phydev 280 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); phydev 286 drivers/net/phy/phy-c45.c phydev->lp_advertising); phydev 287 drivers/net/phy/phy-c45.c mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, 0); phydev 288 drivers/net/phy/phy-c45.c mii_adv_mod_linkmode_adv_t(phydev->lp_advertising, 0); phydev 289 drivers/net/phy/phy-c45.c phydev->pause = 0; phydev 290 drivers/net/phy/phy-c45.c phydev->asym_pause = 0; phydev 295 drivers/net/phy/phy-c45.c linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->lp_advertising, phydev 299 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_LPA); phydev 303 drivers/net/phy/phy-c45.c mii_adv_mod_linkmode_adv_t(phydev->lp_advertising, val); phydev 304 drivers/net/phy/phy-c45.c phydev->pause = val & LPA_PAUSE_CAP ? 1 : 0; phydev 305 drivers/net/phy/phy-c45.c phydev->asym_pause = val & LPA_PAUSE_ASYM ? 1 : 0; phydev 308 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_STAT); phydev 312 drivers/net/phy/phy-c45.c mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, val); phydev 322 drivers/net/phy/phy-c45.c int genphy_c45_read_pma(struct phy_device *phydev) phydev 326 drivers/net/phy/phy-c45.c linkmode_zero(phydev->lp_advertising); phydev 328 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL1); phydev 334 drivers/net/phy/phy-c45.c phydev->speed = SPEED_10; phydev 337 drivers/net/phy/phy-c45.c phydev->speed = SPEED_100; phydev 340 drivers/net/phy/phy-c45.c phydev->speed = SPEED_1000; phydev 343 drivers/net/phy/phy-c45.c phydev->speed = SPEED_2500; phydev 346 drivers/net/phy/phy-c45.c phydev->speed = SPEED_5000; phydev 349 drivers/net/phy/phy-c45.c phydev->speed = SPEED_10000; phydev 352 drivers/net/phy/phy-c45.c phydev->speed = SPEED_UNKNOWN; phydev 356 drivers/net/phy/phy-c45.c phydev->duplex = DUPLEX_FULL; phydev 366 drivers/net/phy/phy-c45.c int genphy_c45_read_mdix(struct phy_device *phydev) phydev 370 drivers/net/phy/phy-c45.c if (phydev->speed == SPEED_10000) { phydev 371 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, phydev 378 drivers/net/phy/phy-c45.c phydev->mdix = ETH_TP_MDI; phydev 382 drivers/net/phy/phy-c45.c phydev->mdix = ETH_TP_MDI_X; phydev 386 drivers/net/phy/phy-c45.c phydev->mdix = ETH_TP_MDI_INVALID; phydev 406 drivers/net/phy/phy-c45.c int genphy_c45_pma_read_abilities(struct phy_device *phydev) phydev 410 drivers/net/phy/phy-c45.c linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported); phydev 411 drivers/net/phy/phy-c45.c if (phydev->c45_ids.devices_in_package & MDIO_DEVS_AN) { phydev 412 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); phydev 418 drivers/net/phy/phy-c45.c phydev->supported); phydev 421 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_STAT2); phydev 426 drivers/net/phy/phy-c45.c phydev->supported, phydev 430 drivers/net/phy/phy-c45.c phydev->supported, phydev 434 drivers/net/phy/phy-c45.c phydev->supported, phydev 438 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_EXTABLE); phydev 443 drivers/net/phy/phy-c45.c phydev->supported, phydev 446 drivers/net/phy/phy-c45.c phydev->supported, phydev 449 drivers/net/phy/phy-c45.c phydev->supported, phydev 452 drivers/net/phy/phy-c45.c phydev->supported, phydev 455 drivers/net/phy/phy-c45.c phydev->supported, phydev 458 drivers/net/phy/phy-c45.c phydev->supported, phydev 462 drivers/net/phy/phy-c45.c phydev->supported, phydev 465 drivers/net/phy/phy-c45.c phydev->supported, phydev 469 drivers/net/phy/phy-c45.c phydev->supported, phydev 472 drivers/net/phy/phy-c45.c phydev->supported, phydev 476 drivers/net/phy/phy-c45.c val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, phydev 482 drivers/net/phy/phy-c45.c phydev->supported, phydev 486 drivers/net/phy/phy-c45.c phydev->supported, phydev 501 drivers/net/phy/phy-c45.c int genphy_c45_read_status(struct phy_device *phydev) phydev 505 drivers/net/phy/phy-c45.c ret = genphy_c45_read_link(phydev); phydev 509 drivers/net/phy/phy-c45.c phydev->speed = SPEED_UNKNOWN; phydev 510 drivers/net/phy/phy-c45.c phydev->duplex = DUPLEX_UNKNOWN; phydev 511 drivers/net/phy/phy-c45.c phydev->pause = 0; phydev 512 drivers/net/phy/phy-c45.c phydev->asym_pause = 0; phydev 514 drivers/net/phy/phy-c45.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 515 drivers/net/phy/phy-c45.c ret = genphy_c45_read_lpa(phydev); phydev 519 drivers/net/phy/phy-c45.c phy_resolve_aneg_linkmode(phydev); phydev 521 drivers/net/phy/phy-c45.c ret = genphy_c45_read_pma(phydev); phydev 536 drivers/net/phy/phy-c45.c int genphy_c45_config_aneg(struct phy_device *phydev) phydev 541 drivers/net/phy/phy-c45.c if (phydev->autoneg == AUTONEG_DISABLE) phydev 542 drivers/net/phy/phy-c45.c return genphy_c45_pma_setup_forced(phydev); phydev 544 drivers/net/phy/phy-c45.c ret = genphy_c45_an_config_aneg(phydev); phydev 550 drivers/net/phy/phy-c45.c return genphy_c45_check_and_restart_aneg(phydev, changed); phydev 556 drivers/net/phy/phy-c45.c int gen10g_config_aneg(struct phy_device *phydev) phydev 225 drivers/net/phy/phy-core.c static int __set_phy_supported(struct phy_device *phydev, u32 max_speed) phydev 227 drivers/net/phy/phy-core.c return __set_linkmode_max_speed(max_speed, phydev->supported); phydev 230 drivers/net/phy/phy-core.c int phy_set_max_speed(struct phy_device *phydev, u32 max_speed) phydev 234 drivers/net/phy/phy-core.c err = __set_phy_supported(phydev, max_speed); phydev 238 drivers/net/phy/phy-core.c phy_advertise_supported(phydev); phydev 244 drivers/net/phy/phy-core.c void of_set_phy_supported(struct phy_device *phydev) phydev 246 drivers/net/phy/phy-core.c struct device_node *node = phydev->mdio.dev.of_node; phydev 256 drivers/net/phy/phy-core.c __set_phy_supported(phydev, max_speed); phydev 259 drivers/net/phy/phy-core.c void of_set_phy_eee_broken(struct phy_device *phydev) phydev 261 drivers/net/phy/phy-core.c struct device_node *node = phydev->mdio.dev.of_node; phydev 283 drivers/net/phy/phy-core.c phydev->eee_broken_modes = broken; phydev 286 drivers/net/phy/phy-core.c void phy_resolve_aneg_pause(struct phy_device *phydev) phydev 288 drivers/net/phy/phy-core.c if (phydev->duplex == DUPLEX_FULL) { phydev 289 drivers/net/phy/phy-core.c phydev->pause = linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev 290 drivers/net/phy/phy-core.c phydev->lp_advertising); phydev 291 drivers/net/phy/phy-core.c phydev->asym_pause = linkmode_test_bit( phydev 293 drivers/net/phy/phy-core.c phydev->lp_advertising); phydev 306 drivers/net/phy/phy-core.c void phy_resolve_aneg_linkmode(struct phy_device *phydev) phydev 311 drivers/net/phy/phy-core.c linkmode_and(common, phydev->lp_advertising, phydev->advertising); phydev 315 drivers/net/phy/phy-core.c phydev->speed = settings[i].speed; phydev 316 drivers/net/phy/phy-core.c phydev->duplex = settings[i].duplex; phydev 320 drivers/net/phy/phy-core.c phy_resolve_aneg_pause(phydev); phydev 324 drivers/net/phy/phy-core.c static int phy_resolve_min_speed(struct phy_device *phydev, bool fdx_only) phydev 329 drivers/net/phy/phy-core.c linkmode_and(common, phydev->lp_advertising, phydev->advertising); phydev 342 drivers/net/phy/phy-core.c int phy_speed_down_core(struct phy_device *phydev) phydev 344 drivers/net/phy/phy-core.c int min_common_speed = phy_resolve_min_speed(phydev, true); phydev 349 drivers/net/phy/phy-core.c return __set_linkmode_max_speed(min_common_speed, phydev->advertising); phydev 375 drivers/net/phy/phy-core.c int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) phydev 382 drivers/net/phy/phy-core.c if (phydev->drv->read_mmd) { phydev 383 drivers/net/phy/phy-core.c val = phydev->drv->read_mmd(phydev, devad, regnum); phydev 384 drivers/net/phy/phy-core.c } else if (phydev->is_c45) { phydev 387 drivers/net/phy/phy-core.c val = __mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, addr); phydev 389 drivers/net/phy/phy-core.c struct mii_bus *bus = phydev->mdio.bus; phydev 390 drivers/net/phy/phy-core.c int phy_addr = phydev->mdio.addr; phydev 410 drivers/net/phy/phy-core.c int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) phydev 414 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 415 drivers/net/phy/phy-core.c ret = __phy_read_mmd(phydev, devad, regnum); phydev 416 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 432 drivers/net/phy/phy-core.c int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val) phydev 439 drivers/net/phy/phy-core.c if (phydev->drv->write_mmd) { phydev 440 drivers/net/phy/phy-core.c ret = phydev->drv->write_mmd(phydev, devad, regnum, val); phydev 441 drivers/net/phy/phy-core.c } else if (phydev->is_c45) { phydev 444 drivers/net/phy/phy-core.c ret = __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, phydev 447 drivers/net/phy/phy-core.c struct mii_bus *bus = phydev->mdio.bus; phydev 448 drivers/net/phy/phy-core.c int phy_addr = phydev->mdio.addr; phydev 471 drivers/net/phy/phy-core.c int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val) phydev 475 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 476 drivers/net/phy/phy-core.c ret = __phy_write_mmd(phydev, devad, regnum, val); phydev 477 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 495 drivers/net/phy/phy-core.c int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask, phydev 500 drivers/net/phy/phy-core.c ret = __phy_read(phydev, regnum); phydev 508 drivers/net/phy/phy-core.c ret = __phy_write(phydev, regnum, new); phydev 527 drivers/net/phy/phy-core.c int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask, u16 set) phydev 531 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 532 drivers/net/phy/phy-core.c ret = __phy_modify_changed(phydev, regnum, mask, set); phydev 533 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 550 drivers/net/phy/phy-core.c int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set) phydev 554 drivers/net/phy/phy-core.c ret = __phy_modify_changed(phydev, regnum, mask, set); phydev 571 drivers/net/phy/phy-core.c int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set) phydev 575 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 576 drivers/net/phy/phy-core.c ret = __phy_modify(phydev, regnum, mask, set); phydev 577 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 596 drivers/net/phy/phy-core.c int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum, phydev 601 drivers/net/phy/phy-core.c ret = __phy_read_mmd(phydev, devad, regnum); phydev 609 drivers/net/phy/phy-core.c ret = __phy_write_mmd(phydev, devad, regnum, new); phydev 629 drivers/net/phy/phy-core.c int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum, phydev 634 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 635 drivers/net/phy/phy-core.c ret = __phy_modify_mmd_changed(phydev, devad, regnum, mask, set); phydev 636 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 654 drivers/net/phy/phy-core.c int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, phydev 659 drivers/net/phy/phy-core.c ret = __phy_modify_mmd_changed(phydev, devad, regnum, mask, set); phydev 677 drivers/net/phy/phy-core.c int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, phydev 682 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 683 drivers/net/phy/phy-core.c ret = __phy_modify_mmd(phydev, devad, regnum, mask, set); phydev 684 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 690 drivers/net/phy/phy-core.c static int __phy_read_page(struct phy_device *phydev) phydev 692 drivers/net/phy/phy-core.c return phydev->drv->read_page(phydev); phydev 695 drivers/net/phy/phy-core.c static int __phy_write_page(struct phy_device *phydev, int page) phydev 697 drivers/net/phy/phy-core.c return phydev->drv->write_page(phydev, page); phydev 708 drivers/net/phy/phy-core.c int phy_save_page(struct phy_device *phydev) phydev 710 drivers/net/phy/phy-core.c mutex_lock(&phydev->mdio.bus->mdio_lock); phydev 711 drivers/net/phy/phy-core.c return __phy_read_page(phydev); phydev 726 drivers/net/phy/phy-core.c int phy_select_page(struct phy_device *phydev, int page) phydev 730 drivers/net/phy/phy-core.c oldpage = ret = phy_save_page(phydev); phydev 735 drivers/net/phy/phy-core.c ret = __phy_write_page(phydev, page); phydev 760 drivers/net/phy/phy-core.c int phy_restore_page(struct phy_device *phydev, int oldpage, int ret) phydev 765 drivers/net/phy/phy-core.c r = __phy_write_page(phydev, oldpage); phydev 777 drivers/net/phy/phy-core.c mutex_unlock(&phydev->mdio.bus->mdio_lock); phydev 791 drivers/net/phy/phy-core.c int phy_read_paged(struct phy_device *phydev, int page, u32 regnum) phydev 795 drivers/net/phy/phy-core.c oldpage = phy_select_page(phydev, page); phydev 797 drivers/net/phy/phy-core.c ret = __phy_read(phydev, regnum); phydev 799 drivers/net/phy/phy-core.c return phy_restore_page(phydev, oldpage, ret); phydev 812 drivers/net/phy/phy-core.c int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val) phydev 816 drivers/net/phy/phy-core.c oldpage = phy_select_page(phydev, page); phydev 818 drivers/net/phy/phy-core.c ret = __phy_write(phydev, regnum, val); phydev 820 drivers/net/phy/phy-core.c return phy_restore_page(phydev, oldpage, ret); phydev 834 drivers/net/phy/phy-core.c int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum, phydev 839 drivers/net/phy/phy-core.c oldpage = phy_select_page(phydev, page); phydev 841 drivers/net/phy/phy-core.c ret = __phy_modify_changed(phydev, regnum, mask, set); phydev 843 drivers/net/phy/phy-core.c return phy_restore_page(phydev, oldpage, ret); phydev 857 drivers/net/phy/phy-core.c int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum, phydev 860 drivers/net/phy/phy-core.c int ret = phy_modify_paged_changed(phydev, page, regnum, mask, set); phydev 52 drivers/net/phy/phy.c static void phy_link_up(struct phy_device *phydev) phydev 54 drivers/net/phy/phy.c phydev->phy_link_change(phydev, true, true); phydev 55 drivers/net/phy/phy.c phy_led_trigger_change_speed(phydev); phydev 58 drivers/net/phy/phy.c static void phy_link_down(struct phy_device *phydev, bool do_carrier) phydev 60 drivers/net/phy/phy.c phydev->phy_link_change(phydev, false, do_carrier); phydev 61 drivers/net/phy/phy.c phy_led_trigger_change_speed(phydev); phydev 64 drivers/net/phy/phy.c static const char *phy_pause_str(struct phy_device *phydev) phydev 68 drivers/net/phy/phy.c if (phydev->autoneg == AUTONEG_DISABLE) phydev 72 drivers/net/phy/phy.c phydev->advertising); phydev 74 drivers/net/phy/phy.c phydev->advertising); phydev 76 drivers/net/phy/phy.c if (local_pause && phydev->pause) phydev 79 drivers/net/phy/phy.c if (local_asym_pause && phydev->asym_pause) { phydev 82 drivers/net/phy/phy.c if (phydev->pause) phydev 94 drivers/net/phy/phy.c void phy_print_status(struct phy_device *phydev) phydev 96 drivers/net/phy/phy.c if (phydev->link) { phydev 97 drivers/net/phy/phy.c netdev_info(phydev->attached_dev, phydev 99 drivers/net/phy/phy.c phy_speed_to_str(phydev->speed), phydev 100 drivers/net/phy/phy.c phy_duplex_to_str(phydev->duplex), phydev 101 drivers/net/phy/phy.c phy_pause_str(phydev)); phydev 103 drivers/net/phy/phy.c netdev_info(phydev->attached_dev, "Link is Down\n"); phydev 117 drivers/net/phy/phy.c static int phy_clear_interrupt(struct phy_device *phydev) phydev 119 drivers/net/phy/phy.c if (phydev->drv->ack_interrupt) phydev 120 drivers/net/phy/phy.c return phydev->drv->ack_interrupt(phydev); phydev 132 drivers/net/phy/phy.c static int phy_config_interrupt(struct phy_device *phydev, bool interrupts) phydev 134 drivers/net/phy/phy.c phydev->interrupts = interrupts ? 1 : 0; phydev 135 drivers/net/phy/phy.c if (phydev->drv->config_intr) phydev 136 drivers/net/phy/phy.c return phydev->drv->config_intr(phydev); phydev 148 drivers/net/phy/phy.c int phy_restart_aneg(struct phy_device *phydev) phydev 152 drivers/net/phy/phy.c if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0))) phydev 153 drivers/net/phy/phy.c ret = genphy_c45_restart_aneg(phydev); phydev 155 drivers/net/phy/phy.c ret = genphy_restart_aneg(phydev); phydev 169 drivers/net/phy/phy.c int phy_aneg_done(struct phy_device *phydev) phydev 171 drivers/net/phy/phy.c if (phydev->drv && phydev->drv->aneg_done) phydev 172 drivers/net/phy/phy.c return phydev->drv->aneg_done(phydev); phydev 173 drivers/net/phy/phy.c else if (phydev->is_c45) phydev 174 drivers/net/phy/phy.c return genphy_c45_aneg_done(phydev); phydev 176 drivers/net/phy/phy.c return genphy_aneg_done(phydev); phydev 239 drivers/net/phy/phy.c static void phy_sanitize_settings(struct phy_device *phydev) phydev 243 drivers/net/phy/phy.c setting = phy_find_valid(phydev->speed, phydev->duplex, phydev 244 drivers/net/phy/phy.c phydev->supported); phydev 246 drivers/net/phy/phy.c phydev->speed = setting->speed; phydev 247 drivers/net/phy/phy.c phydev->duplex = setting->duplex; phydev 250 drivers/net/phy/phy.c phydev->speed = SPEED_UNKNOWN; phydev 251 drivers/net/phy/phy.c phydev->duplex = DUPLEX_UNKNOWN; phydev 268 drivers/net/phy/phy.c int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) phydev 273 drivers/net/phy/phy.c if (cmd->phy_address != phydev->mdio.addr) phydev 278 drivers/net/phy/phy.c linkmode_and(advertising, advertising, phydev->supported); phydev 295 drivers/net/phy/phy.c phydev->autoneg = cmd->autoneg; phydev 297 drivers/net/phy/phy.c phydev->speed = speed; phydev 299 drivers/net/phy/phy.c linkmode_copy(phydev->advertising, advertising); phydev 302 drivers/net/phy/phy.c phydev->advertising, AUTONEG_ENABLE == cmd->autoneg); phydev 304 drivers/net/phy/phy.c phydev->duplex = cmd->duplex; phydev 306 drivers/net/phy/phy.c phydev->mdix_ctrl = cmd->eth_tp_mdix_ctrl; phydev 309 drivers/net/phy/phy.c phy_start_aneg(phydev); phydev 315 drivers/net/phy/phy.c int phy_ethtool_ksettings_set(struct phy_device *phydev, phydev 323 drivers/net/phy/phy.c if (cmd->base.phy_address != phydev->mdio.addr) phydev 329 drivers/net/phy/phy.c linkmode_and(advertising, advertising, phydev->supported); phydev 346 drivers/net/phy/phy.c phydev->autoneg = autoneg; phydev 348 drivers/net/phy/phy.c phydev->speed = speed; phydev 350 drivers/net/phy/phy.c linkmode_copy(phydev->advertising, advertising); phydev 353 drivers/net/phy/phy.c phydev->advertising, autoneg == AUTONEG_ENABLE); phydev 355 drivers/net/phy/phy.c phydev->duplex = duplex; phydev 357 drivers/net/phy/phy.c phydev->mdix_ctrl = cmd->base.eth_tp_mdix_ctrl; phydev 360 drivers/net/phy/phy.c phy_start_aneg(phydev); phydev 366 drivers/net/phy/phy.c void phy_ethtool_ksettings_get(struct phy_device *phydev, phydev 369 drivers/net/phy/phy.c linkmode_copy(cmd->link_modes.supported, phydev->supported); phydev 370 drivers/net/phy/phy.c linkmode_copy(cmd->link_modes.advertising, phydev->advertising); phydev 371 drivers/net/phy/phy.c linkmode_copy(cmd->link_modes.lp_advertising, phydev->lp_advertising); phydev 373 drivers/net/phy/phy.c cmd->base.speed = phydev->speed; phydev 374 drivers/net/phy/phy.c cmd->base.duplex = phydev->duplex; phydev 375 drivers/net/phy/phy.c if (phydev->interface == PHY_INTERFACE_MODE_MOCA) phydev 379 drivers/net/phy/phy.c cmd->base.transceiver = phy_is_internal(phydev) ? phydev 381 drivers/net/phy/phy.c cmd->base.phy_address = phydev->mdio.addr; phydev 382 drivers/net/phy/phy.c cmd->base.autoneg = phydev->autoneg; phydev 383 drivers/net/phy/phy.c cmd->base.eth_tp_mdix_ctrl = phydev->mdix_ctrl; phydev 384 drivers/net/phy/phy.c cmd->base.eth_tp_mdix = phydev->mdix; phydev 398 drivers/net/phy/phy.c int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd) phydev 407 drivers/net/phy/phy.c mii_data->phy_id = phydev->mdio.addr; phydev 419 drivers/net/phy/phy.c mii_data->val_out = mdiobus_read(phydev->mdio.bus, prtad, phydev 432 drivers/net/phy/phy.c if (prtad == phydev->mdio.addr) { phydev 436 drivers/net/phy/phy.c if (phydev->autoneg == AUTONEG_ENABLE) phydev 438 drivers/net/phy/phy.c phydev->autoneg = AUTONEG_DISABLE; phydev 440 drivers/net/phy/phy.c phydev->duplex = DUPLEX_FULL; phydev 442 drivers/net/phy/phy.c phydev->duplex = DUPLEX_HALF; phydev 444 drivers/net/phy/phy.c phydev->speed = SPEED_1000; phydev 446 drivers/net/phy/phy.c phydev->speed = SPEED_100; phydev 447 drivers/net/phy/phy.c else phydev->speed = SPEED_10; phydev 450 drivers/net/phy/phy.c if (phydev->autoneg == AUTONEG_DISABLE) phydev 452 drivers/net/phy/phy.c phydev->autoneg = AUTONEG_ENABLE; phydev 456 drivers/net/phy/phy.c mii_adv_mod_linkmode_adv_t(phydev->advertising, phydev 461 drivers/net/phy/phy.c mii_ctrl1000_mod_linkmode_adv_t(phydev->advertising, phydev 471 drivers/net/phy/phy.c mdiobus_write(phydev->mdio.bus, prtad, devad, val); phydev 473 drivers/net/phy/phy.c if (prtad == phydev->mdio.addr && phydev 476 drivers/net/phy/phy.c return phy_init_hw(phydev); phydev 479 drivers/net/phy/phy.c return phy_start_aneg(phydev); phydev 484 drivers/net/phy/phy.c if (phydev->drv && phydev->drv->hwtstamp) phydev 485 drivers/net/phy/phy.c return phydev->drv->hwtstamp(phydev, ifr); phydev 494 drivers/net/phy/phy.c void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies) phydev 496 drivers/net/phy/phy.c mod_delayed_work(system_power_efficient_wq, &phydev->state_queue, phydev 501 drivers/net/phy/phy.c static void phy_trigger_machine(struct phy_device *phydev) phydev 503 drivers/net/phy/phy.c phy_queue_state_machine(phydev, 0); phydev 506 drivers/net/phy/phy.c static int phy_config_aneg(struct phy_device *phydev) phydev 508 drivers/net/phy/phy.c if (phydev->drv->config_aneg) phydev 509 drivers/net/phy/phy.c return phydev->drv->config_aneg(phydev); phydev 514 drivers/net/phy/phy.c if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0))) phydev 515 drivers/net/phy/phy.c return genphy_c45_config_aneg(phydev); phydev 517 drivers/net/phy/phy.c return genphy_config_aneg(phydev); phydev 527 drivers/net/phy/phy.c static int phy_check_link_status(struct phy_device *phydev) phydev 531 drivers/net/phy/phy.c WARN_ON(!mutex_is_locked(&phydev->lock)); phydev 536 drivers/net/phy/phy.c if (phydev->loopback_enabled) phydev 539 drivers/net/phy/phy.c err = phy_read_status(phydev); phydev 543 drivers/net/phy/phy.c if (phydev->link && phydev->state != PHY_RUNNING) { phydev 544 drivers/net/phy/phy.c phydev->state = PHY_RUNNING; phydev 545 drivers/net/phy/phy.c phy_link_up(phydev); phydev 546 drivers/net/phy/phy.c } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev 547 drivers/net/phy/phy.c phydev->state = PHY_NOLINK; phydev 548 drivers/net/phy/phy.c phy_link_down(phydev, true); phydev 563 drivers/net/phy/phy.c int phy_start_aneg(struct phy_device *phydev) phydev 567 drivers/net/phy/phy.c if (!phydev->drv) phydev 570 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 572 drivers/net/phy/phy.c if (AUTONEG_DISABLE == phydev->autoneg) phydev 573 drivers/net/phy/phy.c phy_sanitize_settings(phydev); phydev 575 drivers/net/phy/phy.c err = phy_config_aneg(phydev); phydev 579 drivers/net/phy/phy.c if (phy_is_started(phydev)) phydev 580 drivers/net/phy/phy.c err = phy_check_link_status(phydev); phydev 582 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 588 drivers/net/phy/phy.c static int phy_poll_aneg_done(struct phy_device *phydev) phydev 595 drivers/net/phy/phy.c ret = phy_aneg_done(phydev); phydev 617 drivers/net/phy/phy.c int phy_speed_down(struct phy_device *phydev, bool sync) phydev 622 drivers/net/phy/phy.c if (phydev->autoneg != AUTONEG_ENABLE) phydev 625 drivers/net/phy/phy.c linkmode_copy(adv_tmp, phydev->advertising); phydev 627 drivers/net/phy/phy.c ret = phy_speed_down_core(phydev); phydev 631 drivers/net/phy/phy.c linkmode_copy(phydev->adv_old, adv_tmp); phydev 633 drivers/net/phy/phy.c if (linkmode_equal(phydev->advertising, adv_tmp)) phydev 636 drivers/net/phy/phy.c ret = phy_config_aneg(phydev); phydev 640 drivers/net/phy/phy.c return sync ? phy_poll_aneg_done(phydev) : 0; phydev 650 drivers/net/phy/phy.c int phy_speed_up(struct phy_device *phydev) phydev 654 drivers/net/phy/phy.c if (phydev->autoneg != AUTONEG_ENABLE) phydev 657 drivers/net/phy/phy.c if (linkmode_empty(phydev->adv_old)) phydev 660 drivers/net/phy/phy.c linkmode_copy(adv_tmp, phydev->advertising); phydev 661 drivers/net/phy/phy.c linkmode_copy(phydev->advertising, phydev->adv_old); phydev 662 drivers/net/phy/phy.c linkmode_zero(phydev->adv_old); phydev 664 drivers/net/phy/phy.c if (linkmode_equal(phydev->advertising, adv_tmp)) phydev 667 drivers/net/phy/phy.c return phy_config_aneg(phydev); phydev 681 drivers/net/phy/phy.c void phy_start_machine(struct phy_device *phydev) phydev 683 drivers/net/phy/phy.c phy_trigger_machine(phydev); phydev 695 drivers/net/phy/phy.c void phy_stop_machine(struct phy_device *phydev) phydev 697 drivers/net/phy/phy.c cancel_delayed_work_sync(&phydev->state_queue); phydev 699 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 700 drivers/net/phy/phy.c if (phy_is_started(phydev)) phydev 701 drivers/net/phy/phy.c phydev->state = PHY_UP; phydev 702 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 714 drivers/net/phy/phy.c static void phy_error(struct phy_device *phydev) phydev 718 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 719 drivers/net/phy/phy.c phydev->state = PHY_HALTED; phydev 720 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 722 drivers/net/phy/phy.c phy_trigger_machine(phydev); phydev 729 drivers/net/phy/phy.c static int phy_disable_interrupts(struct phy_device *phydev) phydev 734 drivers/net/phy/phy.c err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED); phydev 739 drivers/net/phy/phy.c return phy_clear_interrupt(phydev); phydev 751 drivers/net/phy/phy.c struct phy_device *phydev = phy_dat; phydev 753 drivers/net/phy/phy.c if (phydev->drv->did_interrupt && !phydev->drv->did_interrupt(phydev)) phydev 756 drivers/net/phy/phy.c if (phydev->drv->handle_interrupt) { phydev 757 drivers/net/phy/phy.c if (phydev->drv->handle_interrupt(phydev)) phydev 761 drivers/net/phy/phy.c phy_trigger_machine(phydev); phydev 765 drivers/net/phy/phy.c if (!phydev->drv->did_interrupt && phy_clear_interrupt(phydev)) phydev 770 drivers/net/phy/phy.c phy_error(phydev); phydev 778 drivers/net/phy/phy.c static int phy_enable_interrupts(struct phy_device *phydev) phydev 780 drivers/net/phy/phy.c int err = phy_clear_interrupt(phydev); phydev 785 drivers/net/phy/phy.c return phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED); phydev 796 drivers/net/phy/phy.c void phy_request_interrupt(struct phy_device *phydev) phydev 800 drivers/net/phy/phy.c err = request_threaded_irq(phydev->irq, NULL, phy_interrupt, phydev 802 drivers/net/phy/phy.c phydev_name(phydev), phydev); phydev 804 drivers/net/phy/phy.c phydev_warn(phydev, "Error %d requesting IRQ %d, falling back to polling\n", phydev 805 drivers/net/phy/phy.c err, phydev->irq); phydev 806 drivers/net/phy/phy.c phydev->irq = PHY_POLL; phydev 808 drivers/net/phy/phy.c if (phy_enable_interrupts(phydev)) { phydev 809 drivers/net/phy/phy.c phydev_warn(phydev, "Can't enable interrupt, falling back to polling\n"); phydev 810 drivers/net/phy/phy.c phy_free_interrupt(phydev); phydev 811 drivers/net/phy/phy.c phydev->irq = PHY_POLL; phydev 824 drivers/net/phy/phy.c void phy_free_interrupt(struct phy_device *phydev) phydev 826 drivers/net/phy/phy.c phy_disable_interrupts(phydev); phydev 827 drivers/net/phy/phy.c free_irq(phydev->irq, phydev); phydev 835 drivers/net/phy/phy.c void phy_stop(struct phy_device *phydev) phydev 837 drivers/net/phy/phy.c if (!phy_is_started(phydev)) { phydev 839 drivers/net/phy/phy.c phy_state_to_str(phydev->state)); phydev 843 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 845 drivers/net/phy/phy.c phydev->state = PHY_HALTED; phydev 847 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 849 drivers/net/phy/phy.c phy_state_machine(&phydev->state_queue.work); phydev 850 drivers/net/phy/phy.c phy_stop_machine(phydev); phydev 869 drivers/net/phy/phy.c void phy_start(struct phy_device *phydev) phydev 871 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 873 drivers/net/phy/phy.c if (phydev->state != PHY_READY && phydev->state != PHY_HALTED) { phydev 875 drivers/net/phy/phy.c phy_state_to_str(phydev->state)); phydev 880 drivers/net/phy/phy.c __phy_resume(phydev); phydev 882 drivers/net/phy/phy.c phydev->state = PHY_UP; phydev 884 drivers/net/phy/phy.c phy_start_machine(phydev); phydev 886 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 897 drivers/net/phy/phy.c struct phy_device *phydev = phydev 903 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 905 drivers/net/phy/phy.c old_state = phydev->state; phydev 907 drivers/net/phy/phy.c switch (phydev->state) { phydev 917 drivers/net/phy/phy.c err = phy_check_link_status(phydev); phydev 920 drivers/net/phy/phy.c if (phydev->link) { phydev 921 drivers/net/phy/phy.c phydev->link = 0; phydev 922 drivers/net/phy/phy.c phy_link_down(phydev, true); phydev 928 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 931 drivers/net/phy/phy.c err = phy_start_aneg(phydev); phydev 933 drivers/net/phy/phy.c phy_suspend(phydev); phydev 936 drivers/net/phy/phy.c phy_error(phydev); phydev 938 drivers/net/phy/phy.c if (old_state != phydev->state) { phydev 939 drivers/net/phy/phy.c phydev_dbg(phydev, "PHY state change %s -> %s\n", phydev 941 drivers/net/phy/phy.c phy_state_to_str(phydev->state)); phydev 942 drivers/net/phy/phy.c if (phydev->drv && phydev->drv->link_change_notify) phydev 943 drivers/net/phy/phy.c phydev->drv->link_change_notify(phydev); phydev 954 drivers/net/phy/phy.c mutex_lock(&phydev->lock); phydev 955 drivers/net/phy/phy.c if (phy_polling_mode(phydev) && phy_is_started(phydev)) phydev 956 drivers/net/phy/phy.c phy_queue_state_machine(phydev, PHY_STATE_TIME); phydev 957 drivers/net/phy/phy.c mutex_unlock(&phydev->lock); phydev 967 drivers/net/phy/phy.c void phy_mac_interrupt(struct phy_device *phydev) phydev 970 drivers/net/phy/phy.c phy_trigger_machine(phydev); phydev 1008 drivers/net/phy/phy.c int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) phydev 1010 drivers/net/phy/phy.c if (!phydev->drv) phydev 1015 drivers/net/phy/phy.c if (phydev->duplex == DUPLEX_FULL) { phydev 1024 drivers/net/phy/phy.c status = phy_read_status(phydev); phydev 1029 drivers/net/phy/phy.c eee_cap = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); phydev 1040 drivers/net/phy/phy.c eee_lp = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE); phydev 1044 drivers/net/phy/phy.c eee_adv = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV); phydev 1052 drivers/net/phy/phy.c if (!phy_check_valid(phydev->speed, phydev->duplex, common)) phydev 1059 drivers/net/phy/phy.c phy_set_bits_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL1, phydev 1076 drivers/net/phy/phy.c int phy_get_eee_err(struct phy_device *phydev) phydev 1078 drivers/net/phy/phy.c if (!phydev->drv) phydev 1081 drivers/net/phy/phy.c return phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_WK_ERR); phydev 1093 drivers/net/phy/phy.c int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data) phydev 1097 drivers/net/phy/phy.c if (!phydev->drv) phydev 1101 drivers/net/phy/phy.c val = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); phydev 1107 drivers/net/phy/phy.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV); phydev 1114 drivers/net/phy/phy.c val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE); phydev 1132 drivers/net/phy/phy.c int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) phydev 1136 drivers/net/phy/phy.c if (!phydev->drv) phydev 1140 drivers/net/phy/phy.c cap = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); phydev 1144 drivers/net/phy/phy.c old_adv = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV); phydev 1152 drivers/net/phy/phy.c adv &= ~phydev->eee_broken_modes; phydev 1156 drivers/net/phy/phy.c ret = phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv); phydev 1163 drivers/net/phy/phy.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 1164 drivers/net/phy/phy.c ret = phy_restart_aneg(phydev); phydev 1174 drivers/net/phy/phy.c int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) phydev 1176 drivers/net/phy/phy.c if (phydev->drv && phydev->drv->set_wol) phydev 1177 drivers/net/phy/phy.c return phydev->drv->set_wol(phydev, wol); phydev 1183 drivers/net/phy/phy.c void phy_ethtool_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) phydev 1185 drivers/net/phy/phy.c if (phydev->drv && phydev->drv->get_wol) phydev 1186 drivers/net/phy/phy.c phydev->drv->get_wol(phydev, wol); phydev 1193 drivers/net/phy/phy.c struct phy_device *phydev = ndev->phydev; phydev 1195 drivers/net/phy/phy.c if (!phydev) phydev 1198 drivers/net/phy/phy.c phy_ethtool_ksettings_get(phydev, cmd); phydev 1207 drivers/net/phy/phy.c struct phy_device *phydev = ndev->phydev; phydev 1209 drivers/net/phy/phy.c if (!phydev) phydev 1212 drivers/net/phy/phy.c return phy_ethtool_ksettings_set(phydev, cmd); phydev 1218 drivers/net/phy/phy.c struct phy_device *phydev = ndev->phydev; phydev 1220 drivers/net/phy/phy.c if (!phydev) phydev 1223 drivers/net/phy/phy.c if (!phydev->drv) phydev 1226 drivers/net/phy/phy.c return phy_restart_aneg(phydev); phydev 200 drivers/net/phy/phy_device.c void phy_device_free(struct phy_device *phydev) phydev 202 drivers/net/phy/phy_device.c put_device(&phydev->mdio.dev); phydev 208 drivers/net/phy/phy_device.c struct phy_device *phydev; phydev 210 drivers/net/phy/phy_device.c phydev = container_of(mdiodev, struct phy_device, mdio); phydev 211 drivers/net/phy/phy_device.c phy_device_free(phydev); phydev 221 drivers/net/phy/phy_device.c struct phy_device *phydev; phydev 223 drivers/net/phy/phy_device.c phydev = container_of(mdiodev, struct phy_device, mdio); phydev 224 drivers/net/phy/phy_device.c phy_device_remove(phydev); phydev 234 drivers/net/phy/phy_device.c static bool mdio_bus_phy_may_suspend(struct phy_device *phydev) phydev 236 drivers/net/phy/phy_device.c struct device_driver *drv = phydev->mdio.dev.driver; phydev 238 drivers/net/phy/phy_device.c struct net_device *netdev = phydev->attached_dev; phydev 270 drivers/net/phy/phy_device.c return !phydev->suspended; phydev 275 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 282 drivers/net/phy/phy_device.c if (phydev->attached_dev && phydev->adjust_link) phydev 283 drivers/net/phy/phy_device.c phy_stop_machine(phydev); phydev 285 drivers/net/phy/phy_device.c if (!mdio_bus_phy_may_suspend(phydev)) phydev 288 drivers/net/phy/phy_device.c phydev->suspended_by_mdio_bus = 1; phydev 290 drivers/net/phy/phy_device.c return phy_suspend(phydev); phydev 295 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 298 drivers/net/phy/phy_device.c if (!phydev->suspended_by_mdio_bus) phydev 301 drivers/net/phy/phy_device.c phydev->suspended_by_mdio_bus = 0; phydev 303 drivers/net/phy/phy_device.c ret = phy_resume(phydev); phydev 308 drivers/net/phy/phy_device.c if (phydev->attached_dev && phydev->adjust_link) phydev 309 drivers/net/phy/phy_device.c phy_start_machine(phydev); phydev 316 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 317 drivers/net/phy/phy_device.c struct net_device *netdev = phydev->attached_dev; phydev 323 drivers/net/phy/phy_device.c ret = phy_init_hw(phydev); phydev 327 drivers/net/phy/phy_device.c if (phydev->attached_dev && phydev->adjust_link) phydev 328 drivers/net/phy/phy_device.c phy_start_machine(phydev); phydev 445 drivers/net/phy/phy_device.c static int phy_needs_fixup(struct phy_device *phydev, struct phy_fixup *fixup) phydev 447 drivers/net/phy/phy_device.c if (strcmp(fixup->bus_id, phydev_name(phydev)) != 0) phydev 452 drivers/net/phy/phy_device.c (phydev->phy_id & fixup->phy_uid_mask)) phydev 460 drivers/net/phy/phy_device.c static int phy_scan_fixups(struct phy_device *phydev) phydev 466 drivers/net/phy/phy_device.c if (phy_needs_fixup(phydev, fixup)) { phydev 467 drivers/net/phy/phy_device.c int err = fixup->run(phydev); phydev 473 drivers/net/phy/phy_device.c phydev->has_fixups = true; phydev 483 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 485 drivers/net/phy/phy_device.c const int num_ids = ARRAY_SIZE(phydev->c45_ids.device_ids); phydev 492 drivers/net/phy/phy_device.c return phydrv->match_phy_device(phydev); phydev 494 drivers/net/phy/phy_device.c if (phydev->is_c45) { phydev 496 drivers/net/phy/phy_device.c if (phydev->c45_ids.device_ids[i] == 0xffffffff) phydev 500 drivers/net/phy/phy_device.c (phydev->c45_ids.device_ids[i] & phydev 507 drivers/net/phy/phy_device.c (phydev->phy_id & phydrv->phy_id_mask); phydev 514 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 516 drivers/net/phy/phy_device.c return sprintf(buf, "0x%.8lx\n", (unsigned long)phydev->phy_id); phydev 523 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 526 drivers/net/phy/phy_device.c if (phy_is_internal(phydev)) phydev 529 drivers/net/phy/phy_device.c mode = phy_modes(phydev->interface); phydev 539 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 541 drivers/net/phy/phy_device.c return sprintf(buf, "%d\n", phydev->has_fixups); phydev 843 drivers/net/phy/phy_device.c int phy_device_register(struct phy_device *phydev) phydev 847 drivers/net/phy/phy_device.c err = mdiobus_register_device(&phydev->mdio); phydev 852 drivers/net/phy/phy_device.c phy_device_reset(phydev, 0); phydev 855 drivers/net/phy/phy_device.c err = phy_scan_fixups(phydev); phydev 857 drivers/net/phy/phy_device.c phydev_err(phydev, "failed to initialize\n"); phydev 861 drivers/net/phy/phy_device.c err = device_add(&phydev->mdio.dev); phydev 863 drivers/net/phy/phy_device.c phydev_err(phydev, "failed to add\n"); phydev 871 drivers/net/phy/phy_device.c phy_device_reset(phydev, 1); phydev 873 drivers/net/phy/phy_device.c mdiobus_unregister_device(&phydev->mdio); phydev 886 drivers/net/phy/phy_device.c void phy_device_remove(struct phy_device *phydev) phydev 888 drivers/net/phy/phy_device.c device_del(&phydev->mdio.dev); phydev 891 drivers/net/phy/phy_device.c phy_device_reset(phydev, 1); phydev 893 drivers/net/phy/phy_device.c mdiobus_unregister_device(&phydev->mdio); phydev 903 drivers/net/phy/phy_device.c struct phy_device *phydev; phydev 907 drivers/net/phy/phy_device.c phydev = mdiobus_get_phy(bus, addr); phydev 908 drivers/net/phy/phy_device.c if (phydev) phydev 909 drivers/net/phy/phy_device.c return phydev; phydev 915 drivers/net/phy/phy_device.c static void phy_link_change(struct phy_device *phydev, bool up, bool do_carrier) phydev 917 drivers/net/phy/phy_device.c struct net_device *netdev = phydev->attached_dev; phydev 925 drivers/net/phy/phy_device.c phydev->adjust_link(netdev); phydev 940 drivers/net/phy/phy_device.c static void phy_prepare_link(struct phy_device *phydev, phydev 943 drivers/net/phy/phy_device.c phydev->adjust_link = handler; phydev 953 drivers/net/phy/phy_device.c int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, phydev 962 drivers/net/phy/phy_device.c rc = phy_attach_direct(dev, phydev, phydev->dev_flags, interface); phydev 966 drivers/net/phy/phy_device.c phy_prepare_link(phydev, handler); phydev 967 drivers/net/phy/phy_device.c if (phy_interrupt_is_valid(phydev)) phydev 968 drivers/net/phy/phy_device.c phy_request_interrupt(phydev); phydev 993 drivers/net/phy/phy_device.c struct phy_device *phydev; phydev 1005 drivers/net/phy/phy_device.c phydev = to_phy_device(d); phydev 1007 drivers/net/phy/phy_device.c rc = phy_connect_direct(dev, phydev, handler, interface); phydev 1012 drivers/net/phy/phy_device.c return phydev; phydev 1021 drivers/net/phy/phy_device.c void phy_disconnect(struct phy_device *phydev) phydev 1023 drivers/net/phy/phy_device.c if (phy_is_started(phydev)) phydev 1024 drivers/net/phy/phy_device.c phy_stop(phydev); phydev 1026 drivers/net/phy/phy_device.c if (phy_interrupt_is_valid(phydev)) phydev 1027 drivers/net/phy/phy_device.c phy_free_interrupt(phydev); phydev 1029 drivers/net/phy/phy_device.c phydev->adjust_link = NULL; phydev 1031 drivers/net/phy/phy_device.c phy_detach(phydev); phydev 1053 drivers/net/phy/phy_device.c static int phy_poll_reset(struct phy_device *phydev) phydev 1061 drivers/net/phy/phy_device.c ret = phy_read(phydev, MII_BMCR); phydev 1075 drivers/net/phy/phy_device.c int phy_init_hw(struct phy_device *phydev) phydev 1080 drivers/net/phy/phy_device.c phy_device_reset(phydev, 0); phydev 1082 drivers/net/phy/phy_device.c if (!phydev->drv) phydev 1085 drivers/net/phy/phy_device.c if (phydev->drv->soft_reset) phydev 1086 drivers/net/phy/phy_device.c ret = phydev->drv->soft_reset(phydev); phydev 1091 drivers/net/phy/phy_device.c ret = phy_scan_fixups(phydev); phydev 1095 drivers/net/phy/phy_device.c if (phydev->drv->config_init) phydev 1096 drivers/net/phy/phy_device.c ret = phydev->drv->config_init(phydev); phydev 1102 drivers/net/phy/phy_device.c void phy_attached_info(struct phy_device *phydev) phydev 1104 drivers/net/phy/phy_device.c phy_attached_print(phydev, NULL); phydev 1109 drivers/net/phy/phy_device.c void phy_attached_print(struct phy_device *phydev, const char *fmt, ...) phydev 1111 drivers/net/phy/phy_device.c const char *drv_name = phydev->drv ? phydev->drv->name : "unbound"; phydev 1115 drivers/net/phy/phy_device.c switch(phydev->irq) { phydev 1123 drivers/net/phy/phy_device.c snprintf(irq_num, sizeof(irq_num), "%d", phydev->irq); phydev 1130 drivers/net/phy/phy_device.c phydev_info(phydev, ATTACHED_FMT "\n", phydev 1131 drivers/net/phy/phy_device.c drv_name, phydev_name(phydev), phydev 1136 drivers/net/phy/phy_device.c phydev_info(phydev, ATTACHED_FMT, phydev 1137 drivers/net/phy/phy_device.c drv_name, phydev_name(phydev), phydev 1147 drivers/net/phy/phy_device.c static void phy_sysfs_create_links(struct phy_device *phydev) phydev 1149 drivers/net/phy/phy_device.c struct net_device *dev = phydev->attached_dev; phydev 1155 drivers/net/phy/phy_device.c err = sysfs_create_link(&phydev->mdio.dev.kobj, &dev->dev.kobj, phydev 1161 drivers/net/phy/phy_device.c &phydev->mdio.dev.kobj, phydev 1165 drivers/net/phy/phy_device.c kobject_name(&phydev->mdio.dev.kobj), phydev 1172 drivers/net/phy/phy_device.c phydev->sysfs_links = true; phydev 1179 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 1181 drivers/net/phy/phy_device.c return sprintf(buf, "%d\n", !phydev->attached_dev); phydev 1200 drivers/net/phy/phy_device.c int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, phydev 1203 drivers/net/phy/phy_device.c struct mii_bus *bus = phydev->mdio.bus; phydev 1204 drivers/net/phy/phy_device.c struct device *d = &phydev->mdio.dev; phydev 1217 drivers/net/phy/phy_device.c phydev_err(phydev, "failed to get the bus module\n"); phydev 1227 drivers/net/phy/phy_device.c if (phydev->is_c45) phydev 1236 drivers/net/phy/phy_device.c phydev_err(phydev, "failed to get the device driver module\n"); phydev 1250 drivers/net/phy/phy_device.c if (phydev->attached_dev) { phydev 1256 drivers/net/phy/phy_device.c phydev->phy_link_change = phy_link_change; phydev 1258 drivers/net/phy/phy_device.c phydev->attached_dev = dev; phydev 1259 drivers/net/phy/phy_device.c dev->phydev = phydev; phydev 1270 drivers/net/phy/phy_device.c phydev->sysfs_links = false; phydev 1272 drivers/net/phy/phy_device.c phy_sysfs_create_links(phydev); phydev 1274 drivers/net/phy/phy_device.c if (!phydev->attached_dev) { phydev 1275 drivers/net/phy/phy_device.c err = sysfs_create_file(&phydev->mdio.dev.kobj, phydev 1278 drivers/net/phy/phy_device.c phydev_err(phydev, "error creating 'phy_standalone' sysfs entry\n"); phydev 1281 drivers/net/phy/phy_device.c phydev->dev_flags = flags; phydev 1283 drivers/net/phy/phy_device.c phydev->interface = interface; phydev 1285 drivers/net/phy/phy_device.c phydev->state = PHY_READY; phydev 1291 drivers/net/phy/phy_device.c netif_carrier_off(phydev->attached_dev); phydev 1297 drivers/net/phy/phy_device.c err = phy_init_hw(phydev); phydev 1301 drivers/net/phy/phy_device.c phy_resume(phydev); phydev 1302 drivers/net/phy/phy_device.c phy_led_triggers_register(phydev); phydev 1308 drivers/net/phy/phy_device.c phy_detach(phydev); phydev 1334 drivers/net/phy/phy_device.c struct phy_device *phydev; phydev 1349 drivers/net/phy/phy_device.c phydev = to_phy_device(d); phydev 1351 drivers/net/phy/phy_device.c rc = phy_attach_direct(dev, phydev, phydev->dev_flags, interface); phydev 1356 drivers/net/phy/phy_device.c return phydev; phydev 1360 drivers/net/phy/phy_device.c static bool phy_driver_is_genphy_kind(struct phy_device *phydev, phydev 1363 drivers/net/phy/phy_device.c struct device *d = &phydev->mdio.dev; phydev 1366 drivers/net/phy/phy_device.c if (!phydev->drv) phydev 1376 drivers/net/phy/phy_device.c bool phy_driver_is_genphy(struct phy_device *phydev) phydev 1378 drivers/net/phy/phy_device.c return phy_driver_is_genphy_kind(phydev, phydev 1383 drivers/net/phy/phy_device.c bool phy_driver_is_genphy_10g(struct phy_device *phydev) phydev 1385 drivers/net/phy/phy_device.c return phy_driver_is_genphy_kind(phydev, phydev 1397 drivers/net/phy/phy_device.c void phy_detach(struct phy_device *phydev) phydev 1399 drivers/net/phy/phy_device.c struct net_device *dev = phydev->attached_dev; phydev 1403 drivers/net/phy/phy_device.c if (phydev->sysfs_links) { phydev 1406 drivers/net/phy/phy_device.c sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev"); phydev 1409 drivers/net/phy/phy_device.c if (!phydev->attached_dev) phydev 1410 drivers/net/phy/phy_device.c sysfs_remove_file(&phydev->mdio.dev.kobj, phydev 1413 drivers/net/phy/phy_device.c phy_suspend(phydev); phydev 1415 drivers/net/phy/phy_device.c phydev->attached_dev->phydev = NULL; phydev 1416 drivers/net/phy/phy_device.c phydev->attached_dev = NULL; phydev 1418 drivers/net/phy/phy_device.c phydev->phylink = NULL; phydev 1420 drivers/net/phy/phy_device.c phy_led_triggers_unregister(phydev); phydev 1422 drivers/net/phy/phy_device.c module_put(phydev->mdio.dev.driver->owner); phydev 1429 drivers/net/phy/phy_device.c if (phy_driver_is_genphy(phydev) || phydev 1430 drivers/net/phy/phy_device.c phy_driver_is_genphy_10g(phydev)) phydev 1431 drivers/net/phy/phy_device.c device_release_driver(&phydev->mdio.dev); phydev 1437 drivers/net/phy/phy_device.c bus = phydev->mdio.bus; phydev 1439 drivers/net/phy/phy_device.c put_device(&phydev->mdio.dev); phydev 1446 drivers/net/phy/phy_device.c phy_device_reset(phydev, 1); phydev 1450 drivers/net/phy/phy_device.c int phy_suspend(struct phy_device *phydev) phydev 1452 drivers/net/phy/phy_device.c struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver); phydev 1453 drivers/net/phy/phy_device.c struct net_device *netdev = phydev->attached_dev; phydev 1458 drivers/net/phy/phy_device.c phy_ethtool_get_wol(phydev, &wol); phydev 1462 drivers/net/phy/phy_device.c if (phydev->drv && phydrv->suspend) phydev 1463 drivers/net/phy/phy_device.c ret = phydrv->suspend(phydev); phydev 1468 drivers/net/phy/phy_device.c phydev->suspended = true; phydev 1474 drivers/net/phy/phy_device.c int __phy_resume(struct phy_device *phydev) phydev 1476 drivers/net/phy/phy_device.c struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver); phydev 1479 drivers/net/phy/phy_device.c WARN_ON(!mutex_is_locked(&phydev->lock)); phydev 1481 drivers/net/phy/phy_device.c if (phydev->drv && phydrv->resume) phydev 1482 drivers/net/phy/phy_device.c ret = phydrv->resume(phydev); phydev 1487 drivers/net/phy/phy_device.c phydev->suspended = false; phydev 1493 drivers/net/phy/phy_device.c int phy_resume(struct phy_device *phydev) phydev 1497 drivers/net/phy/phy_device.c mutex_lock(&phydev->lock); phydev 1498 drivers/net/phy/phy_device.c ret = __phy_resume(phydev); phydev 1499 drivers/net/phy/phy_device.c mutex_unlock(&phydev->lock); phydev 1505 drivers/net/phy/phy_device.c int phy_loopback(struct phy_device *phydev, bool enable) phydev 1507 drivers/net/phy/phy_device.c struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver); phydev 1510 drivers/net/phy/phy_device.c mutex_lock(&phydev->lock); phydev 1512 drivers/net/phy/phy_device.c if (enable && phydev->loopback_enabled) { phydev 1517 drivers/net/phy/phy_device.c if (!enable && !phydev->loopback_enabled) { phydev 1522 drivers/net/phy/phy_device.c if (phydev->drv && phydrv->set_loopback) phydev 1523 drivers/net/phy/phy_device.c ret = phydrv->set_loopback(phydev, enable); phydev 1530 drivers/net/phy/phy_device.c phydev->loopback_enabled = enable; phydev 1533 drivers/net/phy/phy_device.c mutex_unlock(&phydev->lock); phydev 1547 drivers/net/phy/phy_device.c int phy_reset_after_clk_enable(struct phy_device *phydev) phydev 1549 drivers/net/phy/phy_device.c if (!phydev || !phydev->drv) phydev 1552 drivers/net/phy/phy_device.c if (phydev->drv->flags & PHY_RST_AFTER_CLK_EN) { phydev 1553 drivers/net/phy/phy_device.c phy_device_reset(phydev, 1); phydev 1554 drivers/net/phy/phy_device.c phy_device_reset(phydev, 0); phydev 1573 drivers/net/phy/phy_device.c static int genphy_config_advert(struct phy_device *phydev) phydev 1579 drivers/net/phy/phy_device.c linkmode_and(phydev->advertising, phydev->advertising, phydev 1580 drivers/net/phy/phy_device.c phydev->supported); phydev 1582 drivers/net/phy/phy_device.c adv = linkmode_adv_to_mii_adv_t(phydev->advertising); phydev 1585 drivers/net/phy/phy_device.c err = phy_modify_changed(phydev, MII_ADVERTISE, phydev 1594 drivers/net/phy/phy_device.c bmsr = phy_read(phydev, MII_BMSR); phydev 1605 drivers/net/phy/phy_device.c adv = linkmode_adv_to_mii_ctrl1000_t(phydev->advertising); phydev 1607 drivers/net/phy/phy_device.c err = phy_modify_changed(phydev, MII_CTRL1000, phydev 1626 drivers/net/phy/phy_device.c int genphy_config_eee_advert(struct phy_device *phydev) phydev 1631 drivers/net/phy/phy_device.c if (!phydev->eee_broken_modes) phydev 1634 drivers/net/phy/phy_device.c err = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, phydev 1635 drivers/net/phy/phy_device.c phydev->eee_broken_modes, 0); phydev 1649 drivers/net/phy/phy_device.c int genphy_setup_forced(struct phy_device *phydev) phydev 1653 drivers/net/phy/phy_device.c phydev->pause = 0; phydev 1654 drivers/net/phy/phy_device.c phydev->asym_pause = 0; phydev 1656 drivers/net/phy/phy_device.c if (SPEED_1000 == phydev->speed) phydev 1658 drivers/net/phy/phy_device.c else if (SPEED_100 == phydev->speed) phydev 1661 drivers/net/phy/phy_device.c if (DUPLEX_FULL == phydev->duplex) phydev 1664 drivers/net/phy/phy_device.c return phy_modify(phydev, MII_BMCR, phydev 1673 drivers/net/phy/phy_device.c int genphy_restart_aneg(struct phy_device *phydev) phydev 1676 drivers/net/phy/phy_device.c return phy_modify(phydev, MII_BMCR, BMCR_ISOLATE, phydev 1690 drivers/net/phy/phy_device.c int __genphy_config_aneg(struct phy_device *phydev, bool changed) phydev 1694 drivers/net/phy/phy_device.c if (genphy_config_eee_advert(phydev)) phydev 1697 drivers/net/phy/phy_device.c if (AUTONEG_ENABLE != phydev->autoneg) phydev 1698 drivers/net/phy/phy_device.c return genphy_setup_forced(phydev); phydev 1700 drivers/net/phy/phy_device.c err = genphy_config_advert(phydev); phydev 1710 drivers/net/phy/phy_device.c int ctl = phy_read(phydev, MII_BMCR); phydev 1722 drivers/net/phy/phy_device.c return changed ? genphy_restart_aneg(phydev) : 0; phydev 1734 drivers/net/phy/phy_device.c int genphy_aneg_done(struct phy_device *phydev) phydev 1736 drivers/net/phy/phy_device.c int retval = phy_read(phydev, MII_BMSR); phydev 1750 drivers/net/phy/phy_device.c int genphy_update_link(struct phy_device *phydev) phydev 1754 drivers/net/phy/phy_device.c bmcr = phy_read(phydev, MII_BMCR); phydev 1768 drivers/net/phy/phy_device.c if (!phy_polling_mode(phydev)) { phydev 1769 drivers/net/phy/phy_device.c status = phy_read(phydev, MII_BMSR); phydev 1777 drivers/net/phy/phy_device.c status = phy_read(phydev, MII_BMSR); phydev 1781 drivers/net/phy/phy_device.c phydev->link = status & BMSR_LSTATUS ? 1 : 0; phydev 1782 drivers/net/phy/phy_device.c phydev->autoneg_complete = status & BMSR_ANEGCOMPLETE ? 1 : 0; phydev 1787 drivers/net/phy/phy_device.c if (phydev->autoneg == AUTONEG_ENABLE && !phydev->autoneg_complete) phydev 1788 drivers/net/phy/phy_device.c phydev->link = 0; phydev 1794 drivers/net/phy/phy_device.c int genphy_read_lpa(struct phy_device *phydev) phydev 1798 drivers/net/phy/phy_device.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 1799 drivers/net/phy/phy_device.c if (!phydev->autoneg_complete) { phydev 1800 drivers/net/phy/phy_device.c mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, phydev 1802 drivers/net/phy/phy_device.c mii_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, 0); phydev 1806 drivers/net/phy/phy_device.c if (phydev->is_gigabit_capable) { phydev 1807 drivers/net/phy/phy_device.c lpagb = phy_read(phydev, MII_STAT1000); phydev 1812 drivers/net/phy/phy_device.c int adv = phy_read(phydev, MII_CTRL1000); phydev 1818 drivers/net/phy/phy_device.c phydev_err(phydev, "Master/Slave resolution failed, maybe conflicting manual settings?\n"); phydev 1820 drivers/net/phy/phy_device.c phydev_err(phydev, "Master/Slave resolution failed\n"); phydev 1824 drivers/net/phy/phy_device.c mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, phydev 1828 drivers/net/phy/phy_device.c lpa = phy_read(phydev, MII_LPA); phydev 1832 drivers/net/phy/phy_device.c mii_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); phydev 1834 drivers/net/phy/phy_device.c linkmode_zero(phydev->lp_advertising); phydev 1850 drivers/net/phy/phy_device.c int genphy_read_status(struct phy_device *phydev) phydev 1852 drivers/net/phy/phy_device.c int err, old_link = phydev->link; phydev 1855 drivers/net/phy/phy_device.c err = genphy_update_link(phydev); phydev 1860 drivers/net/phy/phy_device.c if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link) phydev 1863 drivers/net/phy/phy_device.c phydev->speed = SPEED_UNKNOWN; phydev 1864 drivers/net/phy/phy_device.c phydev->duplex = DUPLEX_UNKNOWN; phydev 1865 drivers/net/phy/phy_device.c phydev->pause = 0; phydev 1866 drivers/net/phy/phy_device.c phydev->asym_pause = 0; phydev 1868 drivers/net/phy/phy_device.c err = genphy_read_lpa(phydev); phydev 1872 drivers/net/phy/phy_device.c if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete) { phydev 1873 drivers/net/phy/phy_device.c phy_resolve_aneg_linkmode(phydev); phydev 1874 drivers/net/phy/phy_device.c } else if (phydev->autoneg == AUTONEG_DISABLE) { phydev 1875 drivers/net/phy/phy_device.c int bmcr = phy_read(phydev, MII_BMCR); phydev 1881 drivers/net/phy/phy_device.c phydev->duplex = DUPLEX_FULL; phydev 1883 drivers/net/phy/phy_device.c phydev->duplex = DUPLEX_HALF; phydev 1886 drivers/net/phy/phy_device.c phydev->speed = SPEED_1000; phydev 1888 drivers/net/phy/phy_device.c phydev->speed = SPEED_100; phydev 1890 drivers/net/phy/phy_device.c phydev->speed = SPEED_10; phydev 1906 drivers/net/phy/phy_device.c int genphy_soft_reset(struct phy_device *phydev) phydev 1911 drivers/net/phy/phy_device.c if (phydev->autoneg == AUTONEG_ENABLE) phydev 1914 drivers/net/phy/phy_device.c ret = phy_modify(phydev, MII_BMCR, BMCR_ISOLATE, res); phydev 1918 drivers/net/phy/phy_device.c ret = phy_poll_reset(phydev); phydev 1923 drivers/net/phy/phy_device.c if (phydev->autoneg == AUTONEG_DISABLE) phydev 1924 drivers/net/phy/phy_device.c ret = genphy_setup_forced(phydev); phydev 1939 drivers/net/phy/phy_device.c int genphy_read_abilities(struct phy_device *phydev) phydev 1945 drivers/net/phy/phy_device.c phydev->supported); phydev 1947 drivers/net/phy/phy_device.c val = phy_read(phydev, MII_BMSR); phydev 1951 drivers/net/phy/phy_device.c linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported, phydev 1954 drivers/net/phy/phy_device.c linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, phydev->supported, phydev 1956 drivers/net/phy/phy_device.c linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, phydev->supported, phydev 1958 drivers/net/phy/phy_device.c linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, phydev->supported, phydev 1960 drivers/net/phy/phy_device.c linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, phydev->supported, phydev 1964 drivers/net/phy/phy_device.c val = phy_read(phydev, MII_ESTATUS); phydev 1969 drivers/net/phy/phy_device.c phydev->supported, val & ESTATUS_1000_TFULL); phydev 1971 drivers/net/phy/phy_device.c phydev->supported, val & ESTATUS_1000_THALF); phydev 1973 drivers/net/phy/phy_device.c phydev->supported, val & ESTATUS_1000_XFULL); phydev 1997 drivers/net/phy/phy_device.c int genphy_suspend(struct phy_device *phydev) phydev 1999 drivers/net/phy/phy_device.c return phy_set_bits(phydev, MII_BMCR, BMCR_PDOWN); phydev 2003 drivers/net/phy/phy_device.c int genphy_resume(struct phy_device *phydev) phydev 2005 drivers/net/phy/phy_device.c return phy_clear_bits(phydev, MII_BMCR, BMCR_PDOWN); phydev 2009 drivers/net/phy/phy_device.c int genphy_loopback(struct phy_device *phydev, bool enable) phydev 2011 drivers/net/phy/phy_device.c return phy_modify(phydev, MII_BMCR, BMCR_LOOPBACK, phydev 2025 drivers/net/phy/phy_device.c void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode) phydev 2027 drivers/net/phy/phy_device.c linkmode_clear_bit(link_mode, phydev->supported); phydev 2028 drivers/net/phy/phy_device.c phy_advertise_supported(phydev); phydev 2047 drivers/net/phy/phy_device.c void phy_advertise_supported(struct phy_device *phydev) phydev 2051 drivers/net/phy/phy_device.c linkmode_copy(new, phydev->supported); phydev 2052 drivers/net/phy/phy_device.c phy_copy_pause_bits(new, phydev->advertising); phydev 2053 drivers/net/phy/phy_device.c linkmode_copy(phydev->advertising, new); phydev 2064 drivers/net/phy/phy_device.c void phy_support_sym_pause(struct phy_device *phydev) phydev 2066 drivers/net/phy/phy_device.c linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported); phydev 2067 drivers/net/phy/phy_device.c phy_copy_pause_bits(phydev->advertising, phydev->supported); phydev 2077 drivers/net/phy/phy_device.c void phy_support_asym_pause(struct phy_device *phydev) phydev 2079 drivers/net/phy/phy_device.c phy_copy_pause_bits(phydev->advertising, phydev->supported); phydev 2094 drivers/net/phy/phy_device.c void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx, phydev 2097 drivers/net/phy/phy_device.c linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported); phydev 2101 drivers/net/phy/phy_device.c phydev->supported); phydev 2103 drivers/net/phy/phy_device.c linkmode_copy(phydev->advertising, phydev->supported); phydev 2118 drivers/net/phy/phy_device.c void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx) phydev 2122 drivers/net/phy/phy_device.c linkmode_copy(oldadv, phydev->advertising); phydev 2125 drivers/net/phy/phy_device.c phydev->advertising); phydev 2127 drivers/net/phy/phy_device.c phydev->advertising); phydev 2131 drivers/net/phy/phy_device.c phydev->advertising); phydev 2133 drivers/net/phy/phy_device.c phydev->advertising); phydev 2138 drivers/net/phy/phy_device.c phydev->advertising); phydev 2140 drivers/net/phy/phy_device.c if (!linkmode_equal(oldadv, phydev->advertising) && phydev 2141 drivers/net/phy/phy_device.c phydev->autoneg) phydev 2142 drivers/net/phy/phy_device.c phy_start_aneg(phydev); phydev 2155 drivers/net/phy/phy_device.c bool phy_validate_pause(struct phy_device *phydev, phydev 2159 drivers/net/phy/phy_device.c phydev->supported) && pp->rx_pause) phydev 2163 drivers/net/phy/phy_device.c phydev->supported) && phydev 2186 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 2187 drivers/net/phy/phy_device.c struct device_driver *drv = phydev->mdio.dev.driver; phydev 2191 drivers/net/phy/phy_device.c phydev->drv = phydrv; phydev 2196 drivers/net/phy/phy_device.c if (!phy_drv_supports_irq(phydrv) && phy_interrupt_is_valid(phydev)) phydev 2197 drivers/net/phy/phy_device.c phydev->irq = PHY_POLL; phydev 2200 drivers/net/phy/phy_device.c phydev->is_internal = true; phydev 2202 drivers/net/phy/phy_device.c mutex_lock(&phydev->lock); phydev 2204 drivers/net/phy/phy_device.c if (phydev->drv->probe) { phydev 2206 drivers/net/phy/phy_device.c phy_device_reset(phydev, 0); phydev 2208 drivers/net/phy/phy_device.c err = phydev->drv->probe(phydev); phydev 2211 drivers/net/phy/phy_device.c phy_device_reset(phydev, 1); phydev 2221 drivers/net/phy/phy_device.c linkmode_copy(phydev->supported, phydrv->features); phydev 2223 drivers/net/phy/phy_device.c err = phydrv->get_features(phydev); phydev 2224 drivers/net/phy/phy_device.c } else if (phydev->is_c45) { phydev 2225 drivers/net/phy/phy_device.c err = genphy_c45_pma_read_abilities(phydev); phydev 2227 drivers/net/phy/phy_device.c err = genphy_read_abilities(phydev); phydev 2234 drivers/net/phy/phy_device.c phydev->supported)) phydev 2235 drivers/net/phy/phy_device.c phydev->autoneg = 0; phydev 2238 drivers/net/phy/phy_device.c phydev->supported)) phydev 2239 drivers/net/phy/phy_device.c phydev->is_gigabit_capable = 1; phydev 2241 drivers/net/phy/phy_device.c phydev->supported)) phydev 2242 drivers/net/phy/phy_device.c phydev->is_gigabit_capable = 1; phydev 2244 drivers/net/phy/phy_device.c of_set_phy_supported(phydev); phydev 2245 drivers/net/phy/phy_device.c phy_advertise_supported(phydev); phydev 2250 drivers/net/phy/phy_device.c of_set_phy_eee_broken(phydev); phydev 2263 drivers/net/phy/phy_device.c if (!test_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported) && phydev 2264 drivers/net/phy/phy_device.c !test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported)) { phydev 2266 drivers/net/phy/phy_device.c phydev->supported); phydev 2268 drivers/net/phy/phy_device.c phydev->supported); phydev 2272 drivers/net/phy/phy_device.c phydev->state = PHY_READY; phydev 2275 drivers/net/phy/phy_device.c mutex_unlock(&phydev->lock); phydev 2282 drivers/net/phy/phy_device.c struct phy_device *phydev = to_phy_device(dev); phydev 2284 drivers/net/phy/phy_device.c cancel_delayed_work_sync(&phydev->state_queue); phydev 2286 drivers/net/phy/phy_device.c mutex_lock(&phydev->lock); phydev 2287 drivers/net/phy/phy_device.c phydev->state = PHY_DOWN; phydev 2288 drivers/net/phy/phy_device.c mutex_unlock(&phydev->lock); phydev 2290 drivers/net/phy/phy_device.c if (phydev->drv && phydev->drv->remove) { phydev 2291 drivers/net/phy/phy_device.c phydev->drv->remove(phydev); phydev 2294 drivers/net/phy/phy_device.c phy_device_reset(phydev, 1); phydev 2296 drivers/net/phy/phy_device.c phydev->drv = NULL; phydev 49 drivers/net/phy/phylink.c struct phy_device *phydev; phydev 447 drivers/net/phy/phylink.c pl->cur_interface, pl->phydev); phydev 501 drivers/net/phy/phylink.c if (pl->phydev) phydev 505 drivers/net/phy/phylink.c if (pl->phydev && pl->phy_state.link) { phydev 697 drivers/net/phy/phylink.c static void phylink_phy_change(struct phy_device *phydev, bool up, phydev 700 drivers/net/phy/phylink.c struct phylink *pl = phydev->phylink; phydev 703 drivers/net/phy/phylink.c pl->phy_state.speed = phydev->speed; phydev 704 drivers/net/phy/phylink.c pl->phy_state.duplex = phydev->duplex; phydev 706 drivers/net/phy/phylink.c if (phydev->pause) phydev 708 drivers/net/phy/phylink.c if (phydev->asym_pause) phydev 710 drivers/net/phy/phylink.c pl->phy_state.interface = phydev->interface; phydev 717 drivers/net/phy/phylink.c phy_modes(phydev->interface), phydev 718 drivers/net/phy/phylink.c phy_speed_to_str(phydev->speed), phydev 719 drivers/net/phy/phylink.c phy_duplex_to_str(phydev->duplex)); phydev 758 drivers/net/phy/phylink.c pl->phydev = phy; phydev 788 drivers/net/phy/phylink.c if (pl->phydev) phydev 895 drivers/net/phy/phylink.c phy = pl->phydev; phydev 899 drivers/net/phy/phylink.c pl->phydev = NULL; phydev 1014 drivers/net/phy/phylink.c if (pl->phydev) phydev 1015 drivers/net/phy/phylink.c phy_start(pl->phydev); phydev 1036 drivers/net/phy/phylink.c if (pl->phydev) phydev 1037 drivers/net/phy/phylink.c phy_stop(pl->phydev); phydev 1064 drivers/net/phy/phylink.c if (pl->phydev) phydev 1065 drivers/net/phy/phylink.c phy_ethtool_get_wol(pl->phydev, wol); phydev 1086 drivers/net/phy/phylink.c if (pl->phydev) phydev 1087 drivers/net/phy/phylink.c ret = phy_ethtool_set_wol(pl->phydev, wol); phydev 1131 drivers/net/phy/phylink.c if (pl->phydev) { phydev 1132 drivers/net/phy/phylink.c phy_ethtool_ksettings_get(pl->phydev, kset); phydev 1153 drivers/net/phy/phylink.c if (pl->phydev) phydev 1246 drivers/net/phy/phylink.c if (pl->phydev) { phydev 1247 drivers/net/phy/phylink.c ret = phy_ethtool_ksettings_set(pl->phydev, &our_kset); phydev 1293 drivers/net/phy/phylink.c if (pl->phydev) phydev 1294 drivers/net/phy/phylink.c ret = phy_restart_aneg(pl->phydev); phydev 1350 drivers/net/phy/phylink.c if (pl->phydev) { phydev 1351 drivers/net/phy/phylink.c phy_set_asym_pause(pl->phydev, pause->rx_pause, phydev 1389 drivers/net/phy/phylink.c if (pl->phydev) phydev 1390 drivers/net/phy/phylink.c ret = phy_get_eee_err(pl->phydev); phydev 1407 drivers/net/phy/phylink.c if (pl->phydev) phydev 1408 drivers/net/phy/phylink.c ret = phy_init_eee(pl->phydev, clk_stop_enable); phydev 1425 drivers/net/phy/phylink.c if (pl->phydev) phydev 1426 drivers/net/phy/phylink.c ret = phy_ethtool_get_eee(pl->phydev, eee); phydev 1443 drivers/net/phy/phylink.c if (pl->phydev) phydev 1444 drivers/net/phy/phylink.c ret = phy_ethtool_set_eee(pl->phydev, eee); phydev 1478 drivers/net/phy/phylink.c struct phy_device *phydev = pl->phydev; phydev 1485 drivers/net/phy/phylink.c } else if (phydev->is_c45) { phydev 1491 drivers/net/phy/phylink.c devad = __ffs(phydev->c45_ids.devices_in_package); phydev 1495 drivers/net/phy/phylink.c if (!(phydev->c45_ids.devices_in_package & MDIO_DEVS_AN)) phydev 1512 drivers/net/phy/phylink.c return mdiobus_read(pl->phydev->mdio.bus, prtad, devad); phydev 1518 drivers/net/phy/phylink.c struct phy_device *phydev = pl->phydev; phydev 1525 drivers/net/phy/phylink.c } else if (phydev->is_c45) { phydev 1531 drivers/net/phy/phylink.c devad = __ffs(phydev->c45_ids.devices_in_package); phydev 1535 drivers/net/phy/phylink.c if (!(phydev->c45_ids.devices_in_package & MDIO_DEVS_AN)) phydev 1553 drivers/net/phy/phylink.c return mdiobus_write(phydev->mdio.bus, prtad, devad, val); phydev 1629 drivers/net/phy/phylink.c if (pl->phydev) { phydev 1633 drivers/net/phy/phylink.c mii->phy_id = pl->phydev->mdio.addr; phydev 1650 drivers/net/phy/phylink.c ret = phy_mii_ioctl(pl->phydev, ifr, cmd); phydev 1754 drivers/net/phy/phylink.c if (phy_interface_mode_is_8023z(iface) && pl->phydev) phydev 58 drivers/net/phy/qsemi.c static int qs6612_config_init(struct phy_device *phydev) phydev 71 drivers/net/phy/qsemi.c return phy_write(phydev, MII_QS6612_PCR, 0x0dc0); phydev 74 drivers/net/phy/qsemi.c static int qs6612_ack_interrupt(struct phy_device *phydev) phydev 78 drivers/net/phy/qsemi.c err = phy_read(phydev, MII_QS6612_ISR); phydev 83 drivers/net/phy/qsemi.c err = phy_read(phydev, MII_BMSR); phydev 88 drivers/net/phy/qsemi.c err = phy_read(phydev, MII_EXPANSION); phydev 96 drivers/net/phy/qsemi.c static int qs6612_config_intr(struct phy_device *phydev) phydev 99 drivers/net/phy/qsemi.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 100 drivers/net/phy/qsemi.c err = phy_write(phydev, MII_QS6612_IMR, phydev 103 drivers/net/phy/qsemi.c err = phy_write(phydev, MII_QS6612_IMR, 0); phydev 56 drivers/net/phy/realtek.c static int rtl821x_read_page(struct phy_device *phydev) phydev 58 drivers/net/phy/realtek.c return __phy_read(phydev, RTL821x_PAGE_SELECT); phydev 61 drivers/net/phy/realtek.c static int rtl821x_write_page(struct phy_device *phydev, int page) phydev 63 drivers/net/phy/realtek.c return __phy_write(phydev, RTL821x_PAGE_SELECT, page); phydev 66 drivers/net/phy/realtek.c static int rtl8201_ack_interrupt(struct phy_device *phydev) phydev 70 drivers/net/phy/realtek.c err = phy_read(phydev, RTL8201F_ISR); phydev 75 drivers/net/phy/realtek.c static int rtl821x_ack_interrupt(struct phy_device *phydev) phydev 79 drivers/net/phy/realtek.c err = phy_read(phydev, RTL821x_INSR); phydev 84 drivers/net/phy/realtek.c static int rtl8211f_ack_interrupt(struct phy_device *phydev) phydev 88 drivers/net/phy/realtek.c err = phy_read_paged(phydev, 0xa43, RTL8211F_INSR); phydev 93 drivers/net/phy/realtek.c static int rtl8201_config_intr(struct phy_device *phydev) phydev 97 drivers/net/phy/realtek.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 102 drivers/net/phy/realtek.c return phy_write_paged(phydev, 0x7, RTL8201F_IER, val); phydev 105 drivers/net/phy/realtek.c static int rtl8211b_config_intr(struct phy_device *phydev) phydev 109 drivers/net/phy/realtek.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 110 drivers/net/phy/realtek.c err = phy_write(phydev, RTL821x_INER, phydev 113 drivers/net/phy/realtek.c err = phy_write(phydev, RTL821x_INER, 0); phydev 118 drivers/net/phy/realtek.c static int rtl8211e_config_intr(struct phy_device *phydev) phydev 122 drivers/net/phy/realtek.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 123 drivers/net/phy/realtek.c err = phy_write(phydev, RTL821x_INER, phydev 126 drivers/net/phy/realtek.c err = phy_write(phydev, RTL821x_INER, 0); phydev 131 drivers/net/phy/realtek.c static int rtl8211f_config_intr(struct phy_device *phydev) phydev 135 drivers/net/phy/realtek.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 140 drivers/net/phy/realtek.c return phy_write_paged(phydev, 0xa42, RTL821x_INER, val); phydev 143 drivers/net/phy/realtek.c static int rtl8211_config_aneg(struct phy_device *phydev) phydev 147 drivers/net/phy/realtek.c ret = genphy_config_aneg(phydev); phydev 154 drivers/net/phy/realtek.c if (phydev->speed == SPEED_100 && phydev->autoneg == AUTONEG_DISABLE) { phydev 155 drivers/net/phy/realtek.c phy_write(phydev, 0x17, 0x2138); phydev 156 drivers/net/phy/realtek.c phy_write(phydev, 0x0e, 0x0260); phydev 158 drivers/net/phy/realtek.c phy_write(phydev, 0x17, 0x2108); phydev 159 drivers/net/phy/realtek.c phy_write(phydev, 0x0e, 0x0000); phydev 165 drivers/net/phy/realtek.c static int rtl8211c_config_init(struct phy_device *phydev) phydev 168 drivers/net/phy/realtek.c return phy_set_bits(phydev, MII_CTRL1000, phydev 172 drivers/net/phy/realtek.c static int rtl8211f_config_init(struct phy_device *phydev) phydev 174 drivers/net/phy/realtek.c struct device *dev = &phydev->mdio.dev; phydev 181 drivers/net/phy/realtek.c switch (phydev->interface) { phydev 194 drivers/net/phy/realtek.c ret = phy_modify_paged_changed(phydev, 0xd08, 0x11, RTL8211F_TX_DELAY, phydev 212 drivers/net/phy/realtek.c static int rtl8211e_config_init(struct phy_device *phydev) phydev 218 drivers/net/phy/realtek.c switch (phydev->interface) { phydev 243 drivers/net/phy/realtek.c oldpage = phy_select_page(phydev, 0x7); phydev 247 drivers/net/phy/realtek.c ret = __phy_write(phydev, RTL821x_EXT_PAGE_SELECT, 0xa4); phydev 251 drivers/net/phy/realtek.c ret = __phy_modify(phydev, 0x1c, RTL8211E_TX_DELAY | RTL8211E_RX_DELAY, phydev 255 drivers/net/phy/realtek.c return phy_restore_page(phydev, oldpage, ret); phydev 258 drivers/net/phy/realtek.c static int rtl8211b_suspend(struct phy_device *phydev) phydev 260 drivers/net/phy/realtek.c phy_write(phydev, MII_MMD_DATA, BIT(9)); phydev 262 drivers/net/phy/realtek.c return genphy_suspend(phydev); phydev 265 drivers/net/phy/realtek.c static int rtl8211b_resume(struct phy_device *phydev) phydev 267 drivers/net/phy/realtek.c phy_write(phydev, MII_MMD_DATA, 0); phydev 269 drivers/net/phy/realtek.c return genphy_resume(phydev); phydev 272 drivers/net/phy/realtek.c static int rtl8366rb_config_init(struct phy_device *phydev) phydev 276 drivers/net/phy/realtek.c ret = phy_set_bits(phydev, RTL8366RB_POWER_SAVE, phydev 279 drivers/net/phy/realtek.c dev_err(&phydev->mdio.dev, phydev 286 drivers/net/phy/realtek.c static int rtlgen_read_mmd(struct phy_device *phydev, int devnum, u16 regnum) phydev 291 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa5c); phydev 292 drivers/net/phy/realtek.c ret = __phy_read(phydev, 0x12); phydev 293 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 295 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa5d); phydev 296 drivers/net/phy/realtek.c ret = __phy_read(phydev, 0x10); phydev 297 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 299 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa5d); phydev 300 drivers/net/phy/realtek.c ret = __phy_read(phydev, 0x11); phydev 301 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 309 drivers/net/phy/realtek.c static int rtlgen_write_mmd(struct phy_device *phydev, int devnum, u16 regnum, phydev 315 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa5d); phydev 316 drivers/net/phy/realtek.c ret = __phy_write(phydev, 0x10, val); phydev 317 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 325 drivers/net/phy/realtek.c static int rtl8125_read_mmd(struct phy_device *phydev, int devnum, u16 regnum) phydev 327 drivers/net/phy/realtek.c int ret = rtlgen_read_mmd(phydev, devnum, regnum); phydev 333 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa6e); phydev 334 drivers/net/phy/realtek.c ret = __phy_read(phydev, 0x16); phydev 335 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 337 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa6d); phydev 338 drivers/net/phy/realtek.c ret = __phy_read(phydev, 0x12); phydev 339 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 341 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa6d); phydev 342 drivers/net/phy/realtek.c ret = __phy_read(phydev, 0x10); phydev 343 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 349 drivers/net/phy/realtek.c static int rtl8125_write_mmd(struct phy_device *phydev, int devnum, u16 regnum, phydev 352 drivers/net/phy/realtek.c int ret = rtlgen_write_mmd(phydev, devnum, regnum, val); phydev 358 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0xa6d); phydev 359 drivers/net/phy/realtek.c ret = __phy_write(phydev, 0x12, val); phydev 360 drivers/net/phy/realtek.c rtl821x_write_page(phydev, 0); phydev 366 drivers/net/phy/realtek.c static int rtl8125_get_features(struct phy_device *phydev) phydev 370 drivers/net/phy/realtek.c val = phy_read_paged(phydev, 0xa61, 0x13); phydev 375 drivers/net/phy/realtek.c phydev->supported, val & RTL_SUPPORTS_2500FULL); phydev 377 drivers/net/phy/realtek.c phydev->supported, val & RTL_SUPPORTS_5000FULL); phydev 379 drivers/net/phy/realtek.c phydev->supported, val & RTL_SUPPORTS_10000FULL); phydev 381 drivers/net/phy/realtek.c return genphy_read_abilities(phydev); phydev 384 drivers/net/phy/realtek.c static int rtl8125_config_aneg(struct phy_device *phydev) phydev 388 drivers/net/phy/realtek.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 392 drivers/net/phy/realtek.c phydev->advertising)) phydev 395 drivers/net/phy/realtek.c ret = phy_modify_paged_changed(phydev, 0xa5d, 0x12, phydev 401 drivers/net/phy/realtek.c return __genphy_config_aneg(phydev, ret); phydev 404 drivers/net/phy/realtek.c static int rtl8125_read_status(struct phy_device *phydev) phydev 406 drivers/net/phy/realtek.c if (phydev->autoneg == AUTONEG_ENABLE) { phydev 407 drivers/net/phy/realtek.c int lpadv = phy_read_paged(phydev, 0xa5d, 0x13); phydev 413 drivers/net/phy/realtek.c phydev->lp_advertising, lpadv & RTL_LPADV_10000FULL); phydev 415 drivers/net/phy/realtek.c phydev->lp_advertising, lpadv & RTL_LPADV_5000FULL); phydev 417 drivers/net/phy/realtek.c phydev->lp_advertising, lpadv & RTL_LPADV_2500FULL); phydev 420 drivers/net/phy/realtek.c return genphy_read_status(phydev); phydev 423 drivers/net/phy/realtek.c static bool rtlgen_supports_2_5gbps(struct phy_device *phydev) phydev 427 drivers/net/phy/realtek.c phy_write(phydev, RTL821x_PAGE_SELECT, 0xa61); phydev 428 drivers/net/phy/realtek.c val = phy_read(phydev, 0x13); phydev 429 drivers/net/phy/realtek.c phy_write(phydev, RTL821x_PAGE_SELECT, 0); phydev 434 drivers/net/phy/realtek.c static int rtlgen_match_phy_device(struct phy_device *phydev) phydev 436 drivers/net/phy/realtek.c return phydev->phy_id == RTL_GENERIC_PHYID && phydev 437 drivers/net/phy/realtek.c !rtlgen_supports_2_5gbps(phydev); phydev 440 drivers/net/phy/realtek.c static int rtl8125_match_phy_device(struct phy_device *phydev) phydev 442 drivers/net/phy/realtek.c return phydev->phy_id == RTL_GENERIC_PHYID && phydev 443 drivers/net/phy/realtek.c rtlgen_supports_2_5gbps(phydev); phydev 42 drivers/net/phy/rockchip.c static int rockchip_init_tstmode(struct phy_device *phydev) phydev 47 drivers/net/phy/rockchip.c ret = phy_write(phydev, SMI_ADDR_TSTCNTL, TSTMODE_ENABLE); phydev 51 drivers/net/phy/rockchip.c ret = phy_write(phydev, SMI_ADDR_TSTCNTL, TSTMODE_DISABLE); phydev 55 drivers/net/phy/rockchip.c return phy_write(phydev, SMI_ADDR_TSTCNTL, TSTMODE_ENABLE); phydev 58 drivers/net/phy/rockchip.c static int rockchip_close_tstmode(struct phy_device *phydev) phydev 61 drivers/net/phy/rockchip.c return phy_write(phydev, SMI_ADDR_TSTCNTL, TSTMODE_DISABLE); phydev 64 drivers/net/phy/rockchip.c static int rockchip_integrated_phy_analog_init(struct phy_device *phydev) phydev 68 drivers/net/phy/rockchip.c ret = rockchip_init_tstmode(phydev); phydev 76 drivers/net/phy/rockchip.c ret = phy_write(phydev, SMI_ADDR_TSTWRITE, 0xB); phydev 79 drivers/net/phy/rockchip.c ret = phy_write(phydev, SMI_ADDR_TSTCNTL, TSTCNTL_WR | WR_ADDR_A7CFG); phydev 83 drivers/net/phy/rockchip.c return rockchip_close_tstmode(phydev); phydev 86 drivers/net/phy/rockchip.c static int rockchip_integrated_phy_config_init(struct phy_device *phydev) phydev 94 drivers/net/phy/rockchip.c val = phy_read(phydev, MII_INTERNAL_CTRL_STATUS); phydev 98 drivers/net/phy/rockchip.c ret = phy_write(phydev, MII_INTERNAL_CTRL_STATUS, val); phydev 102 drivers/net/phy/rockchip.c return rockchip_integrated_phy_analog_init(phydev); phydev 105 drivers/net/phy/rockchip.c static void rockchip_link_change_notify(struct phy_device *phydev) phydev 112 drivers/net/phy/rockchip.c if (phydev->state == PHY_RUNNING && phydev->speed == SPEED_100) { phydev 113 drivers/net/phy/rockchip.c int ret = rockchip_integrated_phy_analog_init(phydev); phydev 116 drivers/net/phy/rockchip.c phydev_err(phydev, "rockchip_integrated_phy_analog_init err: %d.\n", phydev 121 drivers/net/phy/rockchip.c static int rockchip_set_polarity(struct phy_device *phydev, int polarity) phydev 126 drivers/net/phy/rockchip.c reg = phy_read(phydev, MII_INTERNAL_CTRL_STATUS); phydev 147 drivers/net/phy/rockchip.c err = phy_write(phydev, MII_INTERNAL_CTRL_STATUS, val); phydev 155 drivers/net/phy/rockchip.c static int rockchip_config_aneg(struct phy_device *phydev) phydev 159 drivers/net/phy/rockchip.c err = rockchip_set_polarity(phydev, phydev->mdix); phydev 163 drivers/net/phy/rockchip.c return genphy_config_aneg(phydev); phydev 166 drivers/net/phy/rockchip.c static int rockchip_phy_resume(struct phy_device *phydev) phydev 168 drivers/net/phy/rockchip.c genphy_resume(phydev); phydev 170 drivers/net/phy/rockchip.c return rockchip_integrated_phy_config_init(phydev); phydev 27 drivers/net/phy/sfp-bus.c struct phy_device *phydev; phydev 344 drivers/net/phy/sfp-bus.c if (ops->connect_phy && bus->phydev) { phydev 345 drivers/net/phy/sfp-bus.c ret = ops->connect_phy(bus->upstream, bus->phydev); phydev 367 drivers/net/phy/sfp-bus.c if (bus->phydev && ops && ops->disconnect_phy) phydev 508 drivers/net/phy/sfp-bus.c int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev) phydev 514 drivers/net/phy/sfp-bus.c ret = ops->connect_phy(bus->upstream, phydev); phydev 517 drivers/net/phy/sfp-bus.c bus->phydev = phydev; phydev 529 drivers/net/phy/sfp-bus.c bus->phydev = NULL; phydev 19 drivers/net/phy/sfp.h int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev); phydev 38 drivers/net/phy/smsc.c static int smsc_phy_config_intr(struct phy_device *phydev) phydev 40 drivers/net/phy/smsc.c int rc = phy_write (phydev, MII_LAN83C185_IM, phydev 41 drivers/net/phy/smsc.c ((PHY_INTERRUPT_ENABLED == phydev->interrupts) phydev 48 drivers/net/phy/smsc.c static int smsc_phy_ack_interrupt(struct phy_device *phydev) phydev 50 drivers/net/phy/smsc.c int rc = phy_read (phydev, MII_LAN83C185_ISF); phydev 55 drivers/net/phy/smsc.c static int smsc_phy_config_init(struct phy_device *phydev) phydev 57 drivers/net/phy/smsc.c struct smsc_phy_priv *priv = phydev->priv; phydev 59 drivers/net/phy/smsc.c int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); phydev 66 drivers/net/phy/smsc.c rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, phydev 72 drivers/net/phy/smsc.c return smsc_phy_ack_interrupt(phydev); phydev 75 drivers/net/phy/smsc.c static int smsc_phy_reset(struct phy_device *phydev) phydev 77 drivers/net/phy/smsc.c int rc = phy_read(phydev, MII_LAN83C185_SPECIAL_MODES); phydev 87 drivers/net/phy/smsc.c phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc); phydev 91 drivers/net/phy/smsc.c return genphy_soft_reset(phydev); phydev 94 drivers/net/phy/smsc.c static int lan911x_config_init(struct phy_device *phydev) phydev 96 drivers/net/phy/smsc.c return smsc_phy_ack_interrupt(phydev); phydev 108 drivers/net/phy/smsc.c static int lan87xx_read_status(struct phy_device *phydev) phydev 110 drivers/net/phy/smsc.c struct smsc_phy_priv *priv = phydev->priv; phydev 112 drivers/net/phy/smsc.c int err = genphy_read_status(phydev); phydev 114 drivers/net/phy/smsc.c if (!phydev->link && priv->energy_enable) { phydev 118 drivers/net/phy/smsc.c int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); phydev 122 drivers/net/phy/smsc.c rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, phydev 131 drivers/net/phy/smsc.c rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); phydev 139 drivers/net/phy/smsc.c rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); phydev 143 drivers/net/phy/smsc.c rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, phydev 152 drivers/net/phy/smsc.c static int smsc_get_sset_count(struct phy_device *phydev) phydev 157 drivers/net/phy/smsc.c static void smsc_get_strings(struct phy_device *phydev, u8 *data) phydev 167 drivers/net/phy/smsc.c static u64 smsc_get_stat(struct phy_device *phydev, int i) phydev 173 drivers/net/phy/smsc.c val = phy_read(phydev, stat.reg); phydev 182 drivers/net/phy/smsc.c static void smsc_get_stats(struct phy_device *phydev, phydev 188 drivers/net/phy/smsc.c data[i] = smsc_get_stat(phydev, i); phydev 191 drivers/net/phy/smsc.c static int smsc_phy_probe(struct phy_device *phydev) phydev 193 drivers/net/phy/smsc.c struct device *dev = &phydev->mdio.dev; phydev 206 drivers/net/phy/smsc.c phydev->priv = priv; phydev 30 drivers/net/phy/ste10Xp.c static int ste10Xp_config_init(struct phy_device *phydev) phydev 35 drivers/net/phy/ste10Xp.c value = phy_read(phydev, MII_BMCR); phydev 40 drivers/net/phy/ste10Xp.c err = phy_write(phydev, MII_BMCR, value); phydev 45 drivers/net/phy/ste10Xp.c value = phy_read(phydev, MII_BMCR); phydev 51 drivers/net/phy/ste10Xp.c static int ste10Xp_config_intr(struct phy_device *phydev) phydev 55 drivers/net/phy/ste10Xp.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { phydev 57 drivers/net/phy/ste10Xp.c err = phy_write(phydev, MII_XIE, MII_XIE_DEFAULT_MASK); phydev 60 drivers/net/phy/ste10Xp.c value = phy_read(phydev, MII_XCIIS); phydev 65 drivers/net/phy/ste10Xp.c err = phy_write(phydev, MII_XIE, 0); phydev 70 drivers/net/phy/ste10Xp.c static int ste10Xp_ack_interrupt(struct phy_device *phydev) phydev 72 drivers/net/phy/ste10Xp.c int err = phy_read(phydev, MII_XCIIS); phydev 34 drivers/net/phy/teranetics.c static int teranetics_aneg_done(struct phy_device *phydev) phydev 39 drivers/net/phy/teranetics.c if (!phy_read_mmd(phydev, MDIO_MMD_VEND1, 93)) phydev 40 drivers/net/phy/teranetics.c return genphy_c45_aneg_done(phydev); phydev 45 drivers/net/phy/teranetics.c static int teranetics_read_status(struct phy_device *phydev) phydev 49 drivers/net/phy/teranetics.c phydev->link = 1; phydev 51 drivers/net/phy/teranetics.c phydev->speed = SPEED_10000; phydev 52 drivers/net/phy/teranetics.c phydev->duplex = DUPLEX_FULL; phydev 54 drivers/net/phy/teranetics.c if (!phy_read_mmd(phydev, MDIO_MMD_VEND1, 93)) { phydev 55 drivers/net/phy/teranetics.c reg = phy_read_mmd(phydev, MDIO_MMD_PHYXS, MDIO_PHYXS_LNSTAT); phydev 58 drivers/net/phy/teranetics.c phydev->link = 0; phydev 62 drivers/net/phy/teranetics.c reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); phydev 64 drivers/net/phy/teranetics.c phydev->link = 0; phydev 70 drivers/net/phy/teranetics.c static int teranetics_match_phy_device(struct phy_device *phydev) phydev 72 drivers/net/phy/teranetics.c return phydev->c45_ids.device_ids[3] == PHY_ID_TN2020; phydev 26 drivers/net/phy/uPD60620.c static int upd60620_config_init(struct phy_device *phydev) phydev 30 drivers/net/phy/uPD60620.c return phy_write(phydev, PHY_SPM, 0x0180 | phydev->mdio.addr); phydev 35 drivers/net/phy/uPD60620.c static int upd60620_read_status(struct phy_device *phydev) phydev 40 drivers/net/phy/uPD60620.c phy_state = phy_read(phydev, MII_BMSR); phydev 44 drivers/net/phy/uPD60620.c phydev->link = 0; phydev 45 drivers/net/phy/uPD60620.c linkmode_zero(phydev->lp_advertising); phydev 46 drivers/net/phy/uPD60620.c phydev->pause = 0; phydev 47 drivers/net/phy/uPD60620.c phydev->asym_pause = 0; phydev 50 drivers/net/phy/uPD60620.c phy_state = phy_read(phydev, PHY_PHYSCR); phydev 55 drivers/net/phy/uPD60620.c phydev->link = 1; phydev 56 drivers/net/phy/uPD60620.c phydev->speed = SPEED_10; phydev 57 drivers/net/phy/uPD60620.c phydev->duplex = DUPLEX_HALF; phydev 60 drivers/net/phy/uPD60620.c phydev->speed = SPEED_100; phydev 62 drivers/net/phy/uPD60620.c phydev->duplex = DUPLEX_FULL; phydev 64 drivers/net/phy/uPD60620.c phy_state = phy_read(phydev, MII_LPA); phydev 68 drivers/net/phy/uPD60620.c mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, phydev 71 drivers/net/phy/uPD60620.c if (phydev->duplex == DUPLEX_FULL) { phydev 73 drivers/net/phy/uPD60620.c phydev->pause = 1; phydev 75 drivers/net/phy/uPD60620.c phydev->asym_pause = 1; phydev 78 drivers/net/phy/vitesse.c static int vsc824x_add_skew(struct phy_device *phydev) phydev 83 drivers/net/phy/vitesse.c extcon = phy_read(phydev, MII_VSC8244_EXT_CON1); phydev 94 drivers/net/phy/vitesse.c err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon); phydev 99 drivers/net/phy/vitesse.c static int vsc824x_config_init(struct phy_device *phydev) phydev 103 drivers/net/phy/vitesse.c err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, phydev 108 drivers/net/phy/vitesse.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) phydev 109 drivers/net/phy/vitesse.c err = vsc824x_add_skew(phydev); phydev 116 drivers/net/phy/vitesse.c static int vsc73xx_read_page(struct phy_device *phydev) phydev 118 drivers/net/phy/vitesse.c return __phy_read(phydev, VSC73XX_EXT_PAGE_ACCESS); phydev 121 drivers/net/phy/vitesse.c static int vsc73xx_write_page(struct phy_device *phydev, int page) phydev 123 drivers/net/phy/vitesse.c return __phy_write(phydev, VSC73XX_EXT_PAGE_ACCESS, page); phydev 126 drivers/net/phy/vitesse.c static void vsc73xx_config_init(struct phy_device *phydev) phydev 129 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 130 drivers/net/phy/vitesse.c phy_modify(phydev, 0x0c, 0x0300, 0x0200); phydev 131 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 134 drivers/net/phy/vitesse.c phy_modify(phydev, MII_TPISTATUS, 0xff00, 0x0061); phydev 137 drivers/net/phy/vitesse.c static int vsc738x_config_init(struct phy_device *phydev) phydev 145 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 146 drivers/net/phy/vitesse.c phy_modify(phydev, 0x08, 0x0200, 0x0200); phydev 147 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x52b5); phydev 148 drivers/net/phy/vitesse.c phy_write(phydev, 0x10, 0xb68a); phydev 149 drivers/net/phy/vitesse.c phy_modify(phydev, 0x12, 0xff07, 0x0003); phydev 150 drivers/net/phy/vitesse.c phy_modify(phydev, 0x11, 0x00ff, 0x00a2); phydev 151 drivers/net/phy/vitesse.c phy_write(phydev, 0x10, 0x968a); phydev 152 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 153 drivers/net/phy/vitesse.c phy_modify(phydev, 0x08, 0x0200, 0x0000); phydev 154 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 157 drivers/net/phy/vitesse.c rev = phy_read(phydev, MII_PHYSID2); phydev 162 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 163 drivers/net/phy/vitesse.c phy_modify(phydev, 0x08, 0x0200, 0x0200); phydev 164 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x52b5); phydev 165 drivers/net/phy/vitesse.c phy_write(phydev, 0x12, 0x0000); phydev 166 drivers/net/phy/vitesse.c phy_write(phydev, 0x11, 0x0689); phydev 167 drivers/net/phy/vitesse.c phy_write(phydev, 0x10, 0x8f92); phydev 168 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x52b5); phydev 169 drivers/net/phy/vitesse.c phy_write(phydev, 0x12, 0x0000); phydev 170 drivers/net/phy/vitesse.c phy_write(phydev, 0x11, 0x0e35); phydev 171 drivers/net/phy/vitesse.c phy_write(phydev, 0x10, 0x9786); phydev 172 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 173 drivers/net/phy/vitesse.c phy_modify(phydev, 0x08, 0x0200, 0x0000); phydev 174 drivers/net/phy/vitesse.c phy_write(phydev, 0x17, 0xff80); phydev 175 drivers/net/phy/vitesse.c phy_write(phydev, 0x17, 0x0000); phydev 178 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 179 drivers/net/phy/vitesse.c phy_write(phydev, 0x12, 0x0048); phydev 182 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 183 drivers/net/phy/vitesse.c phy_write(phydev, 0x14, 0x6600); phydev 184 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 185 drivers/net/phy/vitesse.c phy_write(phydev, 0x18, 0xa24e); phydev 187 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 188 drivers/net/phy/vitesse.c phy_modify(phydev, 0x16, 0x0fc0, 0x0240); phydev 189 drivers/net/phy/vitesse.c phy_modify(phydev, 0x14, 0x6000, 0x4000); phydev 193 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0001); phydev 194 drivers/net/phy/vitesse.c phy_modify(phydev, 0x14, 0xe000, 0x6000); phydev 195 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 198 drivers/net/phy/vitesse.c vsc73xx_config_init(phydev); phydev 203 drivers/net/phy/vitesse.c static int vsc739x_config_init(struct phy_device *phydev) phydev 210 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 211 drivers/net/phy/vitesse.c phy_modify(phydev, 0x08, 0x0200, 0x0200); phydev 212 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x52b5); phydev 213 drivers/net/phy/vitesse.c phy_write(phydev, 0x10, 0xb68a); phydev 214 drivers/net/phy/vitesse.c phy_modify(phydev, 0x12, 0xff07, 0x0003); phydev 215 drivers/net/phy/vitesse.c phy_modify(phydev, 0x11, 0x00ff, 0x00a2); phydev 216 drivers/net/phy/vitesse.c phy_write(phydev, 0x10, 0x968a); phydev 217 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 218 drivers/net/phy/vitesse.c phy_modify(phydev, 0x08, 0x0200, 0x0000); phydev 219 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 221 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 222 drivers/net/phy/vitesse.c phy_write(phydev, 0x12, 0x0048); phydev 223 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x2a30); phydev 224 drivers/net/phy/vitesse.c phy_modify(phydev, 0x16, 0x0fc0, 0x0240); phydev 225 drivers/net/phy/vitesse.c phy_modify(phydev, 0x14, 0x6000, 0x4000); phydev 226 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0001); phydev 227 drivers/net/phy/vitesse.c phy_modify(phydev, 0x14, 0xe000, 0x6000); phydev 228 drivers/net/phy/vitesse.c phy_write(phydev, 0x1f, 0x0000); phydev 230 drivers/net/phy/vitesse.c vsc73xx_config_init(phydev); phydev 235 drivers/net/phy/vitesse.c static int vsc73xx_config_aneg(struct phy_device *phydev) phydev 248 drivers/net/phy/vitesse.c static int vsc8601_add_skew(struct phy_device *phydev) phydev 252 drivers/net/phy/vitesse.c ret = phy_read(phydev, MII_VSC8601_EPHY_CTL); phydev 257 drivers/net/phy/vitesse.c return phy_write(phydev, MII_VSC8601_EPHY_CTL, ret); phydev 260 drivers/net/phy/vitesse.c static int vsc8601_config_init(struct phy_device *phydev) phydev 264 drivers/net/phy/vitesse.c if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) phydev 265 drivers/net/phy/vitesse.c ret = vsc8601_add_skew(phydev); phydev 273 drivers/net/phy/vitesse.c static int vsc824x_ack_interrupt(struct phy_device *phydev) phydev 281 drivers/net/phy/vitesse.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 282 drivers/net/phy/vitesse.c err = phy_read(phydev, MII_VSC8244_ISTAT); phydev 287 drivers/net/phy/vitesse.c static int vsc82xx_config_intr(struct phy_device *phydev) phydev 291 drivers/net/phy/vitesse.c if (phydev->interrupts == PHY_INTERRUPT_ENABLED) phydev 292 drivers/net/phy/vitesse.c err = phy_write(phydev, MII_VSC8244_IMASK, phydev 293 drivers/net/phy/vitesse.c (phydev->drv->phy_id == PHY_ID_VSC8234 || phydev 294 drivers/net/phy/vitesse.c phydev->drv->phy_id == PHY_ID_VSC8244 || phydev 295 drivers/net/phy/vitesse.c phydev->drv->phy_id == PHY_ID_VSC8572 || phydev 296 drivers/net/phy/vitesse.c phydev->drv->phy_id == PHY_ID_VSC8601) ? phydev 303 drivers/net/phy/vitesse.c err = phy_read(phydev, MII_VSC8244_ISTAT); phydev 308 drivers/net/phy/vitesse.c err = phy_write(phydev, MII_VSC8244_IMASK, 0); phydev 314 drivers/net/phy/vitesse.c static int vsc8221_config_init(struct phy_device *phydev) phydev 318 drivers/net/phy/vitesse.c err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, phydev 333 drivers/net/phy/vitesse.c static int vsc82x4_config_autocross_enable(struct phy_device *phydev) phydev 337 drivers/net/phy/vitesse.c if (phydev->autoneg == AUTONEG_ENABLE || phydev->speed > SPEED_100) phydev 341 drivers/net/phy/vitesse.c ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x52b5); phydev 343 drivers/net/phy/vitesse.c ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_18E, 0x0012); phydev 345 drivers/net/phy/vitesse.c ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_17E, 0x2803); phydev 347 drivers/net/phy/vitesse.c ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_16E, 0x87fa); phydev 350 drivers/net/phy/vitesse.c ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x0000); phydev 352 drivers/net/phy/vitesse.c phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x0000); phydev 365 drivers/net/phy/vitesse.c static int vsc82x4_config_aneg(struct phy_device *phydev) phydev 372 drivers/net/phy/vitesse.c if (phydev->autoneg != AUTONEG_ENABLE && phydev->speed <= SPEED_100) { phydev 373 drivers/net/phy/vitesse.c ret = genphy_setup_forced(phydev); phydev 378 drivers/net/phy/vitesse.c return vsc82x4_config_autocross_enable(phydev); phydev 381 drivers/net/phy/vitesse.c return genphy_config_aneg(phydev); phydev 30 drivers/net/phy/xilinx_gmii2rgmii.c static int xgmiitorgmii_read_status(struct phy_device *phydev) phydev 32 drivers/net/phy/xilinx_gmii2rgmii.c struct gmii2rgmii *priv = mdiodev_get_drvdata(&phydev->mdio); phydev 39 drivers/net/phy/xilinx_gmii2rgmii.c err = priv->phy_drv->read_status(phydev); phydev 41 drivers/net/phy/xilinx_gmii2rgmii.c err = genphy_read_status(phydev); phydev 48 drivers/net/phy/xilinx_gmii2rgmii.c if (phydev->speed == SPEED_1000) phydev 50 drivers/net/phy/xilinx_gmii2rgmii.c else if (phydev->speed == SPEED_100) phydev 20 drivers/net/usb/ax88172a.c struct phy_device *phydev; phydev 47 drivers/net/usb/ax88172a.c if (!net->phydev) phydev 50 drivers/net/usb/ax88172a.c return phy_mii_ioctl(net->phydev, rq, cmd); phydev 56 drivers/net/usb/ax88172a.c struct phy_device *phydev = netdev->phydev; phydev 61 drivers/net/usb/ax88172a.c if (phydev->link) { phydev 64 drivers/net/usb/ax88172a.c if (phydev->duplex == DUPLEX_HALF) phydev 67 drivers/net/usb/ax88172a.c if (phydev->speed != SPEED_100) phydev 75 drivers/net/usb/ax88172a.c phydev->speed, phydev->duplex, mode); phydev 76 drivers/net/usb/ax88172a.c phy_print_status(phydev); phydev 260 drivers/net/usb/ax88172a.c if (priv->phydev) { phydev 263 drivers/net/usb/ax88172a.c phy_stop(priv->phydev); phydev 264 drivers/net/usb/ax88172a.c phy_disconnect(priv->phydev); phydev 331 drivers/net/usb/ax88172a.c priv->phydev = phy_connect(dev->net, priv->phy_name, phydev 334 drivers/net/usb/ax88172a.c if (IS_ERR(priv->phydev)) { phydev 337 drivers/net/usb/ax88172a.c ret = PTR_ERR(priv->phydev); phydev 346 drivers/net/usb/ax88172a.c genphy_resume(priv->phydev); phydev 347 drivers/net/usb/ax88172a.c phy_start(priv->phydev); phydev 1164 drivers/net/usb/lan78xx.c struct phy_device *phydev = dev->net->phydev; phydev 1174 drivers/net/usb/lan78xx.c phy_read_status(phydev); phydev 1176 drivers/net/usb/lan78xx.c if (!phydev->link && dev->link_on) { phydev 1189 drivers/net/usb/lan78xx.c } else if (phydev->link && !dev->link_on) { phydev 1192 drivers/net/usb/lan78xx.c phy_ethtool_ksettings_get(phydev, &ecmd); phydev 1213 drivers/net/usb/lan78xx.c ladv = phy_read(phydev, MII_ADVERTISE); phydev 1217 drivers/net/usb/lan78xx.c radv = phy_read(phydev, MII_LPA); phydev 1401 drivers/net/usb/lan78xx.c phy_ethtool_set_wol(netdev->phydev, wol); phydev 1411 drivers/net/usb/lan78xx.c struct phy_device *phydev = net->phydev; phydev 1419 drivers/net/usb/lan78xx.c ret = phy_ethtool_get_eee(phydev, edata); phydev 1461 drivers/net/usb/lan78xx.c phy_ethtool_set_eee(net->phydev, edata); phydev 1478 drivers/net/usb/lan78xx.c phy_read_status(net->phydev); phydev 1480 drivers/net/usb/lan78xx.c return net->phydev->link; phydev 1510 drivers/net/usb/lan78xx.c struct phy_device *phydev = net->phydev; phydev 1517 drivers/net/usb/lan78xx.c phy_ethtool_ksettings_get(phydev, cmd); phydev 1528 drivers/net/usb/lan78xx.c struct phy_device *phydev = net->phydev; phydev 1537 drivers/net/usb/lan78xx.c ret = phy_ethtool_ksettings_set(phydev, cmd); phydev 1541 drivers/net/usb/lan78xx.c temp = phy_read(phydev, MII_BMCR); phydev 1542 drivers/net/usb/lan78xx.c phy_write(phydev, MII_BMCR, temp | BMCR_LOOPBACK); phydev 1544 drivers/net/usb/lan78xx.c phy_write(phydev, MII_BMCR, temp); phydev 1556 drivers/net/usb/lan78xx.c struct phy_device *phydev = net->phydev; phydev 1559 drivers/net/usb/lan78xx.c phy_ethtool_ksettings_get(phydev, &ecmd); phydev 1574 drivers/net/usb/lan78xx.c struct phy_device *phydev = net->phydev; phydev 1578 drivers/net/usb/lan78xx.c phy_ethtool_ksettings_get(phydev, &ecmd); phydev 1605 drivers/net/usb/lan78xx.c phy_ethtool_ksettings_set(phydev, &ecmd); phydev 1617 drivers/net/usb/lan78xx.c if (!netdev->phydev) phydev 1635 drivers/net/usb/lan78xx.c if (!netdev->phydev) phydev 1640 drivers/net/usb/lan78xx.c data[i] = phy_read(netdev->phydev, j); phydev 1672 drivers/net/usb/lan78xx.c return phy_mii_ioctl(netdev->phydev, rq, cmd); phydev 1852 drivers/net/usb/lan78xx.c struct phy_device *phydev = net->phydev; phydev 1860 drivers/net/usb/lan78xx.c if (!phydev->autoneg && (phydev->speed == 100)) { phydev 1862 drivers/net/usb/lan78xx.c temp = phy_read(phydev, LAN88XX_INT_MASK); phydev 1864 drivers/net/usb/lan78xx.c ret = phy_write(phydev, LAN88XX_INT_MASK, temp); phydev 1866 drivers/net/usb/lan78xx.c temp = phy_read(phydev, MII_BMCR); phydev 1868 drivers/net/usb/lan78xx.c phy_write(phydev, MII_BMCR, temp); /* set to 10 first */ phydev 1870 drivers/net/usb/lan78xx.c phy_write(phydev, MII_BMCR, temp); /* set to 100 later */ phydev 1873 drivers/net/usb/lan78xx.c temp = phy_read(phydev, LAN88XX_INT_STS); phydev 1876 drivers/net/usb/lan78xx.c temp = phy_read(phydev, LAN88XX_INT_MASK); phydev 1878 drivers/net/usb/lan78xx.c ret = phy_write(phydev, LAN88XX_INT_MASK, temp); phydev 2003 drivers/net/usb/lan78xx.c static int lan8835_fixup(struct phy_device *phydev) phydev 2007 drivers/net/usb/lan78xx.c struct lan78xx_net *dev = netdev_priv(phydev->attached_dev); phydev 2010 drivers/net/usb/lan78xx.c buf = phy_read_mmd(phydev, MDIO_MMD_PCS, 0x8010); phydev 2013 drivers/net/usb/lan78xx.c phy_write_mmd(phydev, MDIO_MMD_PCS, 0x8010, buf); phydev 2027 drivers/net/usb/lan78xx.c static int ksz9031rnx_fixup(struct phy_device *phydev) phydev 2029 drivers/net/usb/lan78xx.c struct lan78xx_net *dev = netdev_priv(phydev->attached_dev); phydev 2033 drivers/net/usb/lan78xx.c phy_write_mmd(phydev, MDIO_MMD_WIS, 4, 0x0077); phydev 2035 drivers/net/usb/lan78xx.c phy_write_mmd(phydev, MDIO_MMD_WIS, 5, 0x7777); phydev 2037 drivers/net/usb/lan78xx.c phy_write_mmd(phydev, MDIO_MMD_WIS, 8, 0x1FF); phydev 2053 drivers/net/usb/lan78xx.c struct phy_device *phydev; phydev 2055 drivers/net/usb/lan78xx.c phydev = phy_find_first(dev->mdiobus); phydev 2056 drivers/net/usb/lan78xx.c if (!phydev) { phydev 2058 drivers/net/usb/lan78xx.c phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL); phydev 2059 drivers/net/usb/lan78xx.c if (IS_ERR(phydev)) { phydev 2073 drivers/net/usb/lan78xx.c if (!phydev->drv) { phydev 2094 drivers/net/usb/lan78xx.c phydev->is_internal = false; phydev 2096 drivers/net/usb/lan78xx.c return phydev; phydev 2104 drivers/net/usb/lan78xx.c struct phy_device *phydev; phydev 2108 drivers/net/usb/lan78xx.c phydev = lan7801_phy_init(dev); phydev 2109 drivers/net/usb/lan78xx.c if (!phydev) { phydev 2117 drivers/net/usb/lan78xx.c phydev = phy_find_first(dev->mdiobus); phydev 2118 drivers/net/usb/lan78xx.c if (!phydev) { phydev 2122 drivers/net/usb/lan78xx.c phydev->is_internal = true; phydev 2133 drivers/net/usb/lan78xx.c phydev->irq = dev->domain_data.phyirq; phydev 2135 drivers/net/usb/lan78xx.c phydev->irq = 0; phydev 2136 drivers/net/usb/lan78xx.c netdev_dbg(dev->net, "phydev->irq = %d\n", phydev->irq); phydev 2139 drivers/net/usb/lan78xx.c phydev->mdix = ETH_TP_MDI_AUTO; phydev 2141 drivers/net/usb/lan78xx.c ret = phy_connect_direct(dev->net, phydev, phydev 2148 drivers/net/usb/lan78xx.c if (phy_is_pseudo_fixed_link(phydev)) { phydev 2149 drivers/net/usb/lan78xx.c fixed_phy_unregister(phydev); phydev 2161 drivers/net/usb/lan78xx.c phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); phydev 2166 drivers/net/usb/lan78xx.c phydev->advertising); phydev 2168 drivers/net/usb/lan78xx.c phydev->advertising); phydev 2171 drivers/net/usb/lan78xx.c linkmode_or(phydev->advertising, fc, phydev->advertising); phydev 2173 drivers/net/usb/lan78xx.c if (phydev->mdio.dev.of_node) { phydev 2177 drivers/net/usb/lan78xx.c len = of_property_count_elems_of_size(phydev->mdio.dev.of_node, phydev 2195 drivers/net/usb/lan78xx.c genphy_config_aneg(phydev); phydev 2197 drivers/net/usb/lan78xx.c dev->fc_autoneg = phydev->autoneg; phydev 2635 drivers/net/usb/lan78xx.c phy_start(net->phydev); phydev 2698 drivers/net/usb/lan78xx.c if (net->phydev) phydev 2699 drivers/net/usb/lan78xx.c phy_stop(net->phydev); phydev 3630 drivers/net/usb/lan78xx.c struct phy_device *phydev; phydev 3639 drivers/net/usb/lan78xx.c phydev = net->phydev; phydev 3644 drivers/net/usb/lan78xx.c phy_disconnect(net->phydev); phydev 3646 drivers/net/usb/lan78xx.c if (phy_is_pseudo_fixed_link(phydev)) phydev 3647 drivers/net/usb/lan78xx.c fixed_phy_unregister(phydev); phydev 3825 drivers/net/usb/lan78xx.c phy_disconnect(netdev->phydev); phydev 4175 drivers/net/usb/lan78xx.c phy_start(dev->net->phydev); phydev 505 drivers/of/of_mdio.c struct phy_device *phydev; phydev 507 drivers/of/of_mdio.c phydev = of_phy_find_device(np); phydev 508 drivers/of/of_mdio.c if (!phydev) phydev 511 drivers/of/of_mdio.c fixed_phy_unregister(phydev); phydev 513 drivers/of/of_mdio.c put_device(&phydev->mdio.dev); /* of_phy_find_device() */ phydev 514 drivers/of/of_mdio.c phy_device_free(phydev); /* fixed_phy_register() */ phydev 203 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *phydev; phydev 832 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 891 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 920 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 956 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 1001 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 1043 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 1071 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 1139 drivers/phy/st/phy-miphy28lp.c struct miphy28lp_dev *miphy_dev = miphy_phy->phydev; phydev 1241 drivers/phy/st/phy-miphy28lp.c miphy_dev->phys[port]->phydev = miphy_dev; phydev 150 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 152 drivers/staging/netlogic/xlr_net.c if (!phydev) phydev 155 drivers/staging/netlogic/xlr_net.c phy_ethtool_ksettings_get(phydev, ecmd); phydev 164 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 166 drivers/staging/netlogic/xlr_net.c if (!phydev) phydev 168 drivers/staging/netlogic/xlr_net.c return phy_ethtool_ksettings_set(phydev, ecmd); phydev 199 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 202 drivers/staging/netlogic/xlr_net.c phy_start(phydev); phydev 204 drivers/staging/netlogic/xlr_net.c err = phy_start_aneg(phydev); phydev 220 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 222 drivers/staging/netlogic/xlr_net.c phy_stop(phydev); phydev 723 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 726 drivers/staging/netlogic/xlr_net.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) phydev 729 drivers/staging/netlogic/xlr_net.c if (phydev->speed != priv->phy_speed) { phydev 730 drivers/staging/netlogic/xlr_net.c speed = phydev->speed; phydev 741 drivers/staging/netlogic/xlr_net.c if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { phydev 768 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 772 drivers/staging/netlogic/xlr_net.c if (phydev->link) { phydev 773 drivers/staging/netlogic/xlr_net.c if (phydev->speed != priv->phy_speed) { phydev 785 drivers/staging/netlogic/xlr_net.c struct phy_device *phydev = xlr_get_phydev(priv); phydev 787 drivers/staging/netlogic/xlr_net.c if (!phydev) { phydev 793 drivers/staging/netlogic/xlr_net.c phydev = phy_connect(priv->ndev, phydev_name(phydev), phydev 796 drivers/staging/netlogic/xlr_net.c if (IS_ERR(phydev)) { phydev 798 drivers/staging/netlogic/xlr_net.c return PTR_ERR(phydev); phydev 800 drivers/staging/netlogic/xlr_net.c phydev->supported &= (ADVERTISED_10baseT_Full phydev 808 drivers/staging/netlogic/xlr_net.c phydev->advertising = phydev->supported; phydev 809 drivers/staging/netlogic/xlr_net.c phy_attached_info(phydev); phydev 34 drivers/staging/octeon/ethernet-mdio.c if (dev->phydev) phydev 35 drivers/staging/octeon/ethernet-mdio.c return phy_start_aneg(dev->phydev); phydev 61 drivers/staging/octeon/ethernet-mdio.c if (!dev->phydev) phydev 64 drivers/staging/octeon/ethernet-mdio.c return phy_mii_ioctl(dev->phydev, rq, cmd); phydev 87 drivers/staging/octeon/ethernet-mdio.c link_info.s.link_up = dev->phydev->link ? 1 : 0; phydev 88 drivers/staging/octeon/ethernet-mdio.c link_info.s.full_duplex = dev->phydev->duplex ? 1 : 0; phydev 89 drivers/staging/octeon/ethernet-mdio.c link_info.s.speed = dev->phydev->speed; phydev 98 drivers/staging/octeon/ethernet-mdio.c if (priv->last_link != dev->phydev->link) { phydev 99 drivers/staging/octeon/ethernet-mdio.c priv->last_link = dev->phydev->link; phydev 119 drivers/staging/octeon/ethernet-mdio.c if (dev->phydev) phydev 120 drivers/staging/octeon/ethernet-mdio.c phy_disconnect(dev->phydev); phydev 143 drivers/staging/octeon/ethernet-mdio.c struct phy_device *phydev = NULL; phydev 161 drivers/staging/octeon/ethernet-mdio.c phydev = of_phy_connect(dev, phy_node, cvm_oct_adjust_link, 0, phydev 165 drivers/staging/octeon/ethernet-mdio.c if (!phydev) phydev 169 drivers/staging/octeon/ethernet-mdio.c phy_start(phydev); phydev 140 drivers/staging/octeon/ethernet-rgmii.c if (dev->phydev) { phydev 452 drivers/staging/octeon/ethernet.c if (dev->phydev) phydev 453 drivers/staging/octeon/ethernet.c phy_disconnect(dev->phydev); phydev 479 drivers/staging/octeon/ethernet.c if (dev->phydev) { phydev 480 drivers/staging/octeon/ethernet.c int r = phy_read_status(dev->phydev); phydev 482 drivers/staging/octeon/ethernet.c if (r == 0 && dev->phydev->link == 0) phydev 2061 include/linux/netdevice.h struct phy_device *phydev; phydev 482 include/linux/phy.h int (*soft_reset)(struct phy_device *phydev); phydev 488 include/linux/phy.h int (*config_init)(struct phy_device *phydev); phydev 494 include/linux/phy.h int (*probe)(struct phy_device *phydev); phydev 500 include/linux/phy.h int (*get_features)(struct phy_device *phydev); phydev 503 include/linux/phy.h int (*suspend)(struct phy_device *phydev); phydev 504 include/linux/phy.h int (*resume)(struct phy_device *phydev); phydev 512 include/linux/phy.h int (*config_aneg)(struct phy_device *phydev); phydev 515 include/linux/phy.h int (*aneg_done)(struct phy_device *phydev); phydev 518 include/linux/phy.h int (*read_status)(struct phy_device *phydev); phydev 521 include/linux/phy.h int (*ack_interrupt)(struct phy_device *phydev); phydev 524 include/linux/phy.h int (*config_intr)(struct phy_device *phydev); phydev 531 include/linux/phy.h int (*did_interrupt)(struct phy_device *phydev); phydev 534 include/linux/phy.h int (*handle_interrupt)(struct phy_device *phydev); phydev 537 include/linux/phy.h void (*remove)(struct phy_device *phydev); phydev 543 include/linux/phy.h int (*match_phy_device)(struct phy_device *phydev); phydev 546 include/linux/phy.h int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti); phydev 549 include/linux/phy.h int (*hwtstamp)(struct phy_device *phydev, struct ifreq *ifr); phydev 651 include/linux/phy.h int (*run)(struct phy_device *phydev); phydev 671 include/linux/phy.h void of_set_phy_supported(struct phy_device *phydev); phydev 672 include/linux/phy.h void of_set_phy_eee_broken(struct phy_device *phydev); phydev 673 include/linux/phy.h int phy_speed_down_core(struct phy_device *phydev); phydev 679 include/linux/phy.h static inline bool phy_is_started(struct phy_device *phydev) phydev 681 include/linux/phy.h return phydev->state >= PHY_UP; phydev 684 include/linux/phy.h void phy_resolve_aneg_pause(struct phy_device *phydev); phydev 685 include/linux/phy.h void phy_resolve_aneg_linkmode(struct phy_device *phydev); phydev 696 include/linux/phy.h static inline int phy_read(struct phy_device *phydev, u32 regnum) phydev 698 include/linux/phy.h return mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, regnum); phydev 708 include/linux/phy.h static inline int __phy_read(struct phy_device *phydev, u32 regnum) phydev 710 include/linux/phy.h return __mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, regnum); phydev 723 include/linux/phy.h static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) phydev 725 include/linux/phy.h return mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, regnum, val); phydev 736 include/linux/phy.h static inline int __phy_write(struct phy_device *phydev, u32 regnum, u16 val) phydev 738 include/linux/phy.h return __mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, regnum, phydev 751 include/linux/phy.h int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); phydev 762 include/linux/phy.h int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum); phydev 774 include/linux/phy.h int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); phydev 786 include/linux/phy.h int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val); phydev 788 include/linux/phy.h int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask, phydev 790 include/linux/phy.h int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask, phydev 792 include/linux/phy.h int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set); phydev 793 include/linux/phy.h int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set); phydev 795 include/linux/phy.h int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum, phydev 797 include/linux/phy.h int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum, phydev 799 include/linux/phy.h int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, phydev 801 include/linux/phy.h int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum, phydev 812 include/linux/phy.h static inline int __phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) phydev 814 include/linux/phy.h return __phy_modify(phydev, regnum, 0, val); phydev 825 include/linux/phy.h static inline int __phy_clear_bits(struct phy_device *phydev, u32 regnum, phydev 828 include/linux/phy.h return __phy_modify(phydev, regnum, val, 0); phydev 837 include/linux/phy.h static inline int phy_set_bits(struct phy_device *phydev, u32 regnum, u16 val) phydev 839 include/linux/phy.h return phy_modify(phydev, regnum, 0, val); phydev 848 include/linux/phy.h static inline int phy_clear_bits(struct phy_device *phydev, u32 regnum, u16 val) phydev 850 include/linux/phy.h return phy_modify(phydev, regnum, val, 0); phydev 863 include/linux/phy.h static inline int __phy_set_bits_mmd(struct phy_device *phydev, int devad, phydev 866 include/linux/phy.h return __phy_modify_mmd(phydev, devad, regnum, 0, val); phydev 879 include/linux/phy.h static inline int __phy_clear_bits_mmd(struct phy_device *phydev, int devad, phydev 882 include/linux/phy.h return __phy_modify_mmd(phydev, devad, regnum, val, 0); phydev 893 include/linux/phy.h static inline int phy_set_bits_mmd(struct phy_device *phydev, int devad, phydev 896 include/linux/phy.h return phy_modify_mmd(phydev, devad, regnum, 0, val); phydev 907 include/linux/phy.h static inline int phy_clear_bits_mmd(struct phy_device *phydev, int devad, phydev 910 include/linux/phy.h return phy_modify_mmd(phydev, devad, regnum, val, 0); phydev 920 include/linux/phy.h static inline bool phy_interrupt_is_valid(struct phy_device *phydev) phydev 922 include/linux/phy.h return phydev->irq != PHY_POLL && phydev->irq != PHY_IGNORE_INTERRUPT; phydev 930 include/linux/phy.h static inline bool phy_polling_mode(struct phy_device *phydev) phydev 932 include/linux/phy.h return phydev->irq == PHY_POLL; phydev 939 include/linux/phy.h static inline bool phy_is_internal(struct phy_device *phydev) phydev 941 include/linux/phy.h return phydev->is_internal; phydev 974 include/linux/phy.h static inline bool phy_interface_is_rgmii(struct phy_device *phydev) phydev 976 include/linux/phy.h return phy_interface_mode_is_rgmii(phydev->interface); phydev 984 include/linux/phy.h static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev) phydev 986 include/linux/phy.h return phydev->is_pseudo_fixed_link; phydev 989 include/linux/phy.h int phy_save_page(struct phy_device *phydev); phydev 990 include/linux/phy.h int phy_select_page(struct phy_device *phydev, int page); phydev 991 include/linux/phy.h int phy_restore_page(struct phy_device *phydev, int oldpage, int ret); phydev 992 include/linux/phy.h int phy_read_paged(struct phy_device *phydev, int page, u32 regnum); phydev 993 include/linux/phy.h int phy_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val); phydev 994 include/linux/phy.h int phy_modify_paged_changed(struct phy_device *phydev, int page, u32 regnum, phydev 996 include/linux/phy.h int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum, phydev 1005 include/linux/phy.h void phy_device_free(struct phy_device *phydev); phydev 1018 include/linux/phy.h static inline void phy_device_free(struct phy_device *phydev) { } phydev 1020 include/linux/phy.h void phy_device_remove(struct phy_device *phydev); phydev 1021 include/linux/phy.h int phy_init_hw(struct phy_device *phydev); phydev 1022 include/linux/phy.h int phy_suspend(struct phy_device *phydev); phydev 1023 include/linux/phy.h int phy_resume(struct phy_device *phydev); phydev 1024 include/linux/phy.h int __phy_resume(struct phy_device *phydev); phydev 1025 include/linux/phy.h int phy_loopback(struct phy_device *phydev, bool enable); phydev 1029 include/linux/phy.h int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, phydev 1031 include/linux/phy.h int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, phydev 1037 include/linux/phy.h void phy_disconnect(struct phy_device *phydev); phydev 1038 include/linux/phy.h void phy_detach(struct phy_device *phydev); phydev 1039 include/linux/phy.h void phy_start(struct phy_device *phydev); phydev 1040 include/linux/phy.h void phy_stop(struct phy_device *phydev); phydev 1041 include/linux/phy.h int phy_start_aneg(struct phy_device *phydev); phydev 1042 include/linux/phy.h int phy_aneg_done(struct phy_device *phydev); phydev 1043 include/linux/phy.h int phy_speed_down(struct phy_device *phydev, bool sync); phydev 1044 include/linux/phy.h int phy_speed_up(struct phy_device *phydev); phydev 1046 include/linux/phy.h int phy_restart_aneg(struct phy_device *phydev); phydev 1047 include/linux/phy.h int phy_reset_after_clk_enable(struct phy_device *phydev); phydev 1049 include/linux/phy.h static inline void phy_device_reset(struct phy_device *phydev, int value) phydev 1051 include/linux/phy.h mdio_device_reset(&phydev->mdio, value); phydev 1066 include/linux/phy.h static inline const char *phydev_name(const struct phy_device *phydev) phydev 1068 include/linux/phy.h return dev_name(&phydev->mdio.dev); phydev 1071 include/linux/phy.h void phy_attached_print(struct phy_device *phydev, const char *fmt, ...) phydev 1073 include/linux/phy.h void phy_attached_info(struct phy_device *phydev); phydev 1076 include/linux/phy.h int genphy_read_abilities(struct phy_device *phydev); phydev 1077 include/linux/phy.h int genphy_setup_forced(struct phy_device *phydev); phydev 1078 include/linux/phy.h int genphy_restart_aneg(struct phy_device *phydev); phydev 1079 include/linux/phy.h int genphy_config_eee_advert(struct phy_device *phydev); phydev 1080 include/linux/phy.h int __genphy_config_aneg(struct phy_device *phydev, bool changed); phydev 1081 include/linux/phy.h int genphy_aneg_done(struct phy_device *phydev); phydev 1082 include/linux/phy.h int genphy_update_link(struct phy_device *phydev); phydev 1083 include/linux/phy.h int genphy_read_lpa(struct phy_device *phydev); phydev 1084 include/linux/phy.h int genphy_read_status(struct phy_device *phydev); phydev 1085 include/linux/phy.h int genphy_suspend(struct phy_device *phydev); phydev 1086 include/linux/phy.h int genphy_resume(struct phy_device *phydev); phydev 1087 include/linux/phy.h int genphy_loopback(struct phy_device *phydev, bool enable); phydev 1088 include/linux/phy.h int genphy_soft_reset(struct phy_device *phydev); phydev 1090 include/linux/phy.h static inline int genphy_config_aneg(struct phy_device *phydev) phydev 1092 include/linux/phy.h return __genphy_config_aneg(phydev, false); phydev 1095 include/linux/phy.h static inline int genphy_no_soft_reset(struct phy_device *phydev) phydev 1099 include/linux/phy.h static inline int genphy_no_ack_interrupt(struct phy_device *phydev) phydev 1103 include/linux/phy.h static inline int genphy_no_config_intr(struct phy_device *phydev) phydev 1113 include/linux/phy.h int genphy_c45_restart_aneg(struct phy_device *phydev); phydev 1114 include/linux/phy.h int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart); phydev 1115 include/linux/phy.h int genphy_c45_aneg_done(struct phy_device *phydev); phydev 1116 include/linux/phy.h int genphy_c45_read_link(struct phy_device *phydev); phydev 1117 include/linux/phy.h int genphy_c45_read_lpa(struct phy_device *phydev); phydev 1118 include/linux/phy.h int genphy_c45_read_pma(struct phy_device *phydev); phydev 1119 include/linux/phy.h int genphy_c45_pma_setup_forced(struct phy_device *phydev); phydev 1120 include/linux/phy.h int genphy_c45_an_config_aneg(struct phy_device *phydev); phydev 1121 include/linux/phy.h int genphy_c45_an_disable_aneg(struct phy_device *phydev); phydev 1122 include/linux/phy.h int genphy_c45_read_mdix(struct phy_device *phydev); phydev 1123 include/linux/phy.h int genphy_c45_pma_read_abilities(struct phy_device *phydev); phydev 1124 include/linux/phy.h int genphy_c45_read_status(struct phy_device *phydev); phydev 1125 include/linux/phy.h int genphy_c45_config_aneg(struct phy_device *phydev); phydev 1128 include/linux/phy.h int gen10g_config_aneg(struct phy_device *phydev); phydev 1130 include/linux/phy.h static inline int phy_read_status(struct phy_device *phydev) phydev 1132 include/linux/phy.h if (!phydev->drv) phydev 1135 include/linux/phy.h if (phydev->drv->read_status) phydev 1136 include/linux/phy.h return phydev->drv->read_status(phydev); phydev 1138 include/linux/phy.h return genphy_read_status(phydev); phydev 1147 include/linux/phy.h void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies); phydev 1148 include/linux/phy.h void phy_mac_interrupt(struct phy_device *phydev); phydev 1149 include/linux/phy.h void phy_start_machine(struct phy_device *phydev); phydev 1150 include/linux/phy.h void phy_stop_machine(struct phy_device *phydev); phydev 1151 include/linux/phy.h int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); phydev 1152 include/linux/phy.h void phy_ethtool_ksettings_get(struct phy_device *phydev, phydev 1154 include/linux/phy.h int phy_ethtool_ksettings_set(struct phy_device *phydev, phydev 1156 include/linux/phy.h int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd); phydev 1157 include/linux/phy.h void phy_request_interrupt(struct phy_device *phydev); phydev 1158 include/linux/phy.h void phy_free_interrupt(struct phy_device *phydev); phydev 1159 include/linux/phy.h void phy_print_status(struct phy_device *phydev); phydev 1160 include/linux/phy.h int phy_set_max_speed(struct phy_device *phydev, u32 max_speed); phydev 1161 include/linux/phy.h void phy_remove_link_mode(struct phy_device *phydev, u32 link_mode); phydev 1162 include/linux/phy.h void phy_advertise_supported(struct phy_device *phydev); phydev 1163 include/linux/phy.h void phy_support_sym_pause(struct phy_device *phydev); phydev 1164 include/linux/phy.h void phy_support_asym_pause(struct phy_device *phydev); phydev 1165 include/linux/phy.h void phy_set_sym_pause(struct phy_device *phydev, bool rx, bool tx, phydev 1167 include/linux/phy.h void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx); phydev 1168 include/linux/phy.h bool phy_validate_pause(struct phy_device *phydev, phydev 1182 include/linux/phy.h int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable); phydev 1183 include/linux/phy.h int phy_get_eee_err(struct phy_device *phydev); phydev 1184 include/linux/phy.h int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data); phydev 1185 include/linux/phy.h int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data); phydev 1186 include/linux/phy.h int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol); phydev 1187 include/linux/phy.h void phy_ethtool_get_wol(struct phy_device *phydev, phydev 1201 include/linux/phy.h static inline int phy_ethtool_get_strings(struct phy_device *phydev, u8 *data) phydev 1203 include/linux/phy.h if (!phydev->drv) phydev 1206 include/linux/phy.h mutex_lock(&phydev->lock); phydev 1207 include/linux/phy.h phydev->drv->get_strings(phydev, data); phydev 1208 include/linux/phy.h mutex_unlock(&phydev->lock); phydev 1213 include/linux/phy.h static inline int phy_ethtool_get_sset_count(struct phy_device *phydev) phydev 1217 include/linux/phy.h if (!phydev->drv) phydev 1220 include/linux/phy.h if (phydev->drv->get_sset_count && phydev 1221 include/linux/phy.h phydev->drv->get_strings && phydev 1222 include/linux/phy.h phydev->drv->get_stats) { phydev 1223 include/linux/phy.h mutex_lock(&phydev->lock); phydev 1224 include/linux/phy.h ret = phydev->drv->get_sset_count(phydev); phydev 1225 include/linux/phy.h mutex_unlock(&phydev->lock); phydev 1233 include/linux/phy.h static inline int phy_ethtool_get_stats(struct phy_device *phydev, phydev 1236 include/linux/phy.h if (!phydev->drv) phydev 1239 include/linux/phy.h mutex_lock(&phydev->lock); phydev 1240 include/linux/phy.h phydev->drv->get_stats(phydev, stats, data); phydev 1241 include/linux/phy.h mutex_unlock(&phydev->lock); phydev 1290 include/linux/phy.h bool phy_driver_is_genphy(struct phy_device *phydev); phydev 1291 include/linux/phy.h bool phy_driver_is_genphy_10g(struct phy_device *phydev); phydev 29 include/linux/phy_fixed.h extern void fixed_phy_unregister(struct phy_device *phydev); phydev 30 include/linux/phy_fixed.h extern int fixed_phy_set_link_update(struct phy_device *phydev, phydev 54 include/linux/phy_fixed.h static inline void fixed_phy_unregister(struct phy_device *phydev) phydev 57 include/linux/phy_fixed.h static inline int fixed_phy_set_link_update(struct phy_device *phydev, phydev 373 include/net/dsa.h struct phy_device *phydev); phydev 395 include/net/dsa.h struct phy_device *phydev); phydev 648 net/8021q/vlan_dev.c struct phy_device *phydev = vlan->real_dev->phydev; phydev 650 net/8021q/vlan_dev.c if (phydev && phydev->drv && phydev->drv->ts_info) { phydev 651 net/8021q/vlan_dev.c return phydev->drv->ts_info(phydev, info); phydev 233 net/core/ethtool.c if (sset == ETH_SS_PHY_STATS && dev->phydev && phydev 235 net/core/ethtool.c return phy_ethtool_get_sset_count(dev->phydev); phydev 258 net/core/ethtool.c else if (stringset == ETH_SS_PHY_STATS && dev->phydev && phydev 260 net/core/ethtool.c phy_ethtool_get_strings(dev->phydev, data); phydev 1934 net/core/ethtool.c struct phy_device *phydev = dev->phydev; phydev 1939 net/core/ethtool.c if (!phydev && (!ops->get_ethtool_phy_stats || !ops->get_sset_count)) phydev 1942 net/core/ethtool.c if (dev->phydev && !ops->get_ethtool_phy_stats) phydev 1943 net/core/ethtool.c n_stats = phy_ethtool_get_sset_count(dev->phydev); phydev 1962 net/core/ethtool.c if (dev->phydev && !ops->get_ethtool_phy_stats) { phydev 1963 net/core/ethtool.c ret = phy_ethtool_get_stats(dev->phydev, &stats, data); phydev 2168 net/core/ethtool.c struct phy_device *phydev = dev->phydev; phydev 2173 net/core/ethtool.c if (phydev && phydev->drv && phydev->drv->ts_info) { phydev 2174 net/core/ethtool.c err = phydev->drv->ts_info(phydev, &info); phydev 2197 net/core/ethtool.c struct phy_device *phydev = dev->phydev; phydev 2202 net/core/ethtool.c if (phydev && phydev->drv && phydev->drv->module_info) phydev 2203 net/core/ethtool.c return phydev->drv->module_info(phydev, modinfo); phydev 2234 net/core/ethtool.c struct phy_device *phydev = dev->phydev; phydev 2239 net/core/ethtool.c if (phydev && phydev->drv && phydev->drv->module_eeprom) phydev 2240 net/core/ethtool.c return phydev->drv->module_eeprom(phydev, ee, data); phydev 2473 net/core/ethtool.c struct phy_device *phydev = dev->phydev; phydev 2476 net/core/ethtool.c if (!(phydev && phydev->drv && phydev->drv->get_tunable)) phydev 2487 net/core/ethtool.c mutex_lock(&phydev->lock); phydev 2488 net/core/ethtool.c ret = phydev->drv->get_tunable(phydev, &tuna, data); phydev 2489 net/core/ethtool.c mutex_unlock(&phydev->lock); phydev 2507 net/core/ethtool.c struct phy_device *phydev = dev->phydev; phydev 2510 net/core/ethtool.c if (!(phydev && phydev->drv && phydev->drv->set_tunable)) phydev 2521 net/core/ethtool.c mutex_lock(&phydev->lock); phydev 2522 net/core/ethtool.c ret = phydev->drv->set_tunable(phydev, &tuna, data); phydev 2523 net/core/ethtool.c mutex_unlock(&phydev->lock); phydev 15 net/core/timestamping.c if (likely(skb->dev && skb->dev->phydev && phydev 16 net/core/timestamping.c skb->dev->phydev->drv)) phydev 24 net/core/timestamping.c struct phy_device *phydev; phydev 35 net/core/timestamping.c phydev = skb->dev->phydev; phydev 36 net/core/timestamping.c if (likely(phydev->drv->txtstamp)) { phydev 40 net/core/timestamping.c phydev->drv->txtstamp(phydev, clone, type); phydev 47 net/core/timestamping.c struct phy_device *phydev; phydev 50 net/core/timestamping.c if (!skb->dev || !skb->dev->phydev || !skb->dev->phydev->drv) phydev 65 net/core/timestamping.c phydev = skb->dev->phydev; phydev 66 net/core/timestamping.c if (likely(phydev->drv->rxtstamp)) phydev 67 net/core/timestamping.c return phydev->drv->rxtstamp(phydev, skb, type); phydev 181 net/dsa/dsa_priv.h struct phy_device *phydev); phydev 104 net/dsa/master.c if (dev->phydev && !ops->get_ethtool_phy_stats) { phydev 105 net/dsa/master.c count = phy_ethtool_get_sset_count(dev->phydev); phydev 107 net/dsa/master.c phy_ethtool_get_stats(dev->phydev, stats, data); phydev 127 net/dsa/master.c if (sset == ETH_SS_PHY_STATS && dev->phydev && phydev 129 net/dsa/master.c count = phy_ethtool_get_sset_count(dev->phydev); phydev 159 net/dsa/master.c if (stringset == ETH_SS_PHY_STATS && dev->phydev && phydev 161 net/dsa/master.c mcount = phy_ethtool_get_sset_count(dev->phydev); phydev 165 net/dsa/master.c phy_ethtool_get_strings(dev->phydev, data); phydev 426 net/dsa/port.c struct phy_device *phydev; phydev 432 net/dsa/port.c phydev = of_phy_find_device(phy_dn); phydev 433 net/dsa/port.c if (!phydev) { phydev 439 net/dsa/port.c return phydev; phydev 501 net/dsa/port.c struct phy_device *phydev = NULL; phydev 505 net/dsa/port.c phydev = dp->slave->phydev; phydev 508 net/dsa/port.c if (ds->ops->adjust_link && phydev) phydev 509 net/dsa/port.c ds->ops->adjust_link(ds, dp->index, phydev); phydev 520 net/dsa/port.c struct phy_device *phydev) phydev 526 net/dsa/port.c if (ds->ops->adjust_link && phydev) phydev 527 net/dsa/port.c ds->ops->adjust_link(ds, dp->index, phydev); phydev 531 net/dsa/port.c ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev); phydev 547 net/dsa/port.c struct phy_device *phydev; phydev 551 net/dsa/port.c phydev = dsa_port_get_phy_device(dp); phydev 552 net/dsa/port.c if (!phydev) phydev 555 net/dsa/port.c if (IS_ERR(phydev)) phydev 556 net/dsa/port.c return PTR_ERR(phydev); phydev 559 net/dsa/port.c err = genphy_resume(phydev); phydev 563 net/dsa/port.c err = genphy_read_status(phydev); phydev 567 net/dsa/port.c err = genphy_suspend(phydev); phydev 573 net/dsa/port.c ds->ops->adjust_link(ds, port, phydev); phydev 575 net/dsa/port.c dev_dbg(ds->dev, "enabled port's phy: %s", phydev_name(phydev)); phydev 578 net/dsa/port.c put_device(&phydev->mdio.dev); phydev 586 net/dsa/port.c struct phy_device *phydev; phydev 599 net/dsa/port.c phydev = of_phy_find_device(dn); phydev 604 net/dsa/port.c phydev->interface = mode; phydev 606 net/dsa/port.c genphy_read_status(phydev); phydev 609 net/dsa/port.c ds->ops->adjust_link(ds, port, phydev); phydev 611 net/dsa/port.c put_device(&phydev->mdio.dev); phydev 691 net/dsa/port.c struct phy_device *phydev; phydev 697 net/dsa/port.c phydev = dsa_port_get_phy_device(dp); phydev 698 net/dsa/port.c if (IS_ERR_OR_NULL(phydev)) phydev 701 net/dsa/port.c ret = phy_ethtool_get_strings(phydev, data); phydev 702 net/dsa/port.c put_device(&phydev->mdio.dev); phydev 710 net/dsa/port.c struct phy_device *phydev; phydev 716 net/dsa/port.c phydev = dsa_port_get_phy_device(dp); phydev 717 net/dsa/port.c if (IS_ERR_OR_NULL(phydev)) phydev 720 net/dsa/port.c ret = phy_ethtool_get_stats(phydev, NULL, data); phydev 721 net/dsa/port.c put_device(&phydev->mdio.dev); phydev 729 net/dsa/port.c struct phy_device *phydev; phydev 735 net/dsa/port.c phydev = dsa_port_get_phy_device(dp); phydev 736 net/dsa/port.c if (IS_ERR_OR_NULL(phydev)) phydev 739 net/dsa/port.c ret = phy_ethtool_get_sset_count(phydev); phydev 740 net/dsa/port.c put_device(&phydev->mdio.dev); phydev 93 net/dsa/slave.c err = dsa_port_enable_rt(dp, dev->phydev); phydev 739 net/dsa/slave.c if (!dev->phydev || !dp->pl) phydev 759 net/dsa/slave.c if (!dev->phydev || !dp->pl) phydev 1280 net/dsa/slave.c slave_dev->phydev = mdiobus_get_phy(ds->slave_mii_bus, addr); phydev 1281 net/dsa/slave.c if (!slave_dev->phydev) { phydev 1286 net/dsa/slave.c return phylink_connect_phy(dp->pl, slave_dev->phydev); phydev 601 net/xfrm/xfrm_interface.c struct net_device *phydev = __dev_get_by_index(xi->net, xi->p.link); phydev 616 net/xfrm/xfrm_interface.c if (phydev) { phydev 617 net/xfrm/xfrm_interface.c dev->needed_headroom = phydev->needed_headroom; phydev 618 net/xfrm/xfrm_interface.c dev->needed_tailroom = phydev->needed_tailroom; phydev 621 net/xfrm/xfrm_interface.c eth_hw_addr_inherit(dev, phydev); phydev 623 net/xfrm/xfrm_interface.c memcpy(dev->broadcast, phydev->broadcast,