Lines Matching refs:phy_dev
114 struct phy_device *phy_dev; member
808 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_reset() local
812 BUG_ON(!phy_dev); in smsc911x_phy_reset()
813 BUG_ON(!phy_dev->bus); in smsc911x_phy_reset()
816 smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_BMCR, BMCR_RESET); in smsc911x_phy_reset()
819 temp = smsc911x_mii_read(phy_dev->bus, phy_dev->addr, in smsc911x_phy_reset()
838 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_loopbacktest() local
868 smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_BMCR, in smsc911x_phy_loopbacktest()
897 smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_BMCR, 0); in smsc911x_phy_loopbacktest()
908 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_update_flowcontrol() local
913 if (phy_dev->duplex == DUPLEX_FULL) { in smsc911x_phy_update_flowcontrol()
914 u16 lcladv = phy_read(phy_dev, MII_ADVERTISE); in smsc911x_phy_update_flowcontrol()
915 u16 rmtadv = phy_read(phy_dev, MII_LPA); in smsc911x_phy_update_flowcontrol()
949 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_phy_adjust_link() local
953 if (phy_dev->duplex != pdata->last_duplex) { in smsc911x_phy_adjust_link()
959 if (phy_dev->duplex) { in smsc911x_phy_adjust_link()
972 pdata->last_duplex = phy_dev->duplex; in smsc911x_phy_adjust_link()
1044 pdata->phy_dev = phydev; in smsc911x_mii_probe()
1349 if (!pdata->phy_dev) in smsc911x_phy_disable_energy_detect()
1352 rc = phy_read(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS); in smsc911x_phy_disable_energy_detect()
1366 rc = phy_write(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS, in smsc911x_phy_disable_energy_detect()
1384 if (!pdata->phy_dev) in smsc911x_phy_enable_energy_detect()
1387 rc = phy_read(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS); in smsc911x_phy_enable_energy_detect()
1398 rc = phy_write(pdata->phy_dev, MII_LAN83C185_CTRL_STATUS, in smsc911x_phy_enable_energy_detect()
1487 if (!pdata->phy_dev) { in smsc911x_open()
1578 phy_start(pdata->phy_dev); in smsc911x_open()
1633 if (pdata->phy_dev) in smsc911x_stop()
1634 phy_stop(pdata->phy_dev); in smsc911x_stop()
1876 if (!netif_running(dev) || !pdata->phy_dev) in smsc911x_do_ioctl()
1879 return phy_mii_ioctl(pdata->phy_dev, ifr, cmd); in smsc911x_do_ioctl()
1889 return phy_ethtool_gset(pdata->phy_dev, cmd); in smsc911x_ethtool_getsettings()
1897 return phy_ethtool_sset(pdata->phy_dev, cmd); in smsc911x_ethtool_setsettings()
1913 return phy_start_aneg(pdata->phy_dev); in smsc911x_ethtool_nwayreset()
1939 struct phy_device *phy_dev = pdata->phy_dev; in smsc911x_ethtool_getregs() local
1956 data[j++] = smsc911x_mii_read(phy_dev->bus, phy_dev->addr, i); in smsc911x_ethtool_getregs()
2278 BUG_ON(!pdata->phy_dev); in smsc911x_drv_remove()
2282 phy_disconnect(pdata->phy_dev); in smsc911x_drv_remove()
2283 pdata->phy_dev = NULL; in smsc911x_drv_remove()