diff options
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index a8445c72fc13..f7670330f988 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -319,7 +319,8 @@ int phy_mii_ioctl(struct phy_device *phydev, | |||
319 | /* fall through */ | 319 | /* fall through */ |
320 | 320 | ||
321 | case SIOCGMIIREG: | 321 | case SIOCGMIIREG: |
322 | mii_data->val_out = phy_read(phydev, mii_data->reg_num); | 322 | mii_data->val_out = mdiobus_read(phydev->bus, mii_data->phy_id, |
323 | mii_data->reg_num); | ||
323 | break; | 324 | break; |
324 | 325 | ||
325 | case SIOCSMIIREG: | 326 | case SIOCSMIIREG: |
@@ -350,8 +351,9 @@ int phy_mii_ioctl(struct phy_device *phydev, | |||
350 | } | 351 | } |
351 | } | 352 | } |
352 | 353 | ||
353 | phy_write(phydev, mii_data->reg_num, val); | 354 | mdiobus_write(phydev->bus, mii_data->phy_id, |
354 | 355 | mii_data->reg_num, val); | |
356 | |||
355 | if (mii_data->reg_num == MII_BMCR && | 357 | if (mii_data->reg_num == MII_BMCR && |
356 | val & BMCR_RESET && | 358 | val & BMCR_RESET && |
357 | phydev->drv->config_init) { | 359 | phydev->drv->config_init) { |