Lines Matching refs:phy_dev

115 	struct phy_device *phy_dev;  member
810 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_reset() local
814 BUG_ON(!phy_dev); in smsc911x_phy_reset()
815 BUG_ON(!phy_dev->bus); in smsc911x_phy_reset()
818 smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_BMCR, BMCR_RESET); in smsc911x_phy_reset()
821 temp = smsc911x_mii_read(phy_dev->bus, phy_dev->addr, in smsc911x_phy_reset()
840 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_loopbacktest() local
870 smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_BMCR, in smsc911x_phy_loopbacktest()
899 smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_BMCR, 0); in smsc911x_phy_loopbacktest()
910 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_update_flowcontrol() local
915 if (phy_dev->duplex == DUPLEX_FULL) { in smsc911x_phy_update_flowcontrol()
916 u16 lcladv = phy_read(phy_dev, MII_ADVERTISE); in smsc911x_phy_update_flowcontrol()
917 u16 rmtadv = phy_read(phy_dev, MII_LPA); in smsc911x_phy_update_flowcontrol()
951 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_adjust_link() local
955 if (phy_dev->duplex != pdata->last_duplex) { in smsc911x_phy_adjust_link()
961 if (phy_dev->duplex) { in smsc911x_phy_adjust_link()
974 pdata->last_duplex = phy_dev->duplex; in smsc911x_phy_adjust_link()
1046 pdata->phy_dev = phydev; in smsc911x_mii_probe()
1351 if (!pdata->phy_dev) in smsc911x_phy_general_power_up()
1361 rc = phy_read(pdata->phy_dev, MII_BMCR); in smsc911x_phy_general_power_up()
1371 rc = phy_write(pdata->phy_dev, MII_BMCR, rc & ~BMCR_PDOWN); in smsc911x_phy_general_power_up()
1387 if (!pdata->phy_dev) in smsc911x_phy_disable_energy_detect()
1390 rc = phy_read(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS); in smsc911x_phy_disable_energy_detect()
1400 rc = phy_write(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS, in smsc911x_phy_disable_energy_detect()
1418 if (!pdata->phy_dev) in smsc911x_phy_enable_energy_detect()
1421 rc = phy_read(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS); in smsc911x_phy_enable_energy_detect()
1431 rc = phy_write(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS, in smsc911x_phy_enable_energy_detect()
1528 if (!pdata->phy_dev) { in smsc911x_open()
1619 phy_start(pdata->phy_dev); in smsc911x_open()
1674 if (pdata->phy_dev) in smsc911x_stop()
1675 phy_stop(pdata->phy_dev); in smsc911x_stop()
1917 if (!netif_running(dev) || !pdata->phy_dev) in smsc911x_do_ioctl()
1920 return phy_mii_ioctl(pdata->phy_dev, ifr, cmd); in smsc911x_do_ioctl()
1930 return phy_ethtool_gset(pdata->phy_dev, cmd); in smsc911x_ethtool_getsettings()
1938 return phy_ethtool_sset(pdata->phy_dev, cmd); in smsc911x_ethtool_setsettings()
1954 return phy_start_aneg(pdata->phy_dev); in smsc911x_ethtool_nwayreset()
1980 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_ethtool_getregs() local
1997 data[j++] = smsc911x_mii_read(phy_dev->bus, phy_dev->addr, i); in smsc911x_ethtool_getregs()
2318 BUG_ON(!pdata->phy_dev); in smsc911x_drv_remove()
2322 phy_disconnect(pdata->phy_dev); in smsc911x_drv_remove()
2323 pdata->phy_dev = NULL; in smsc911x_drv_remove()