diff options
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index b285323327c4..ac23322a32e1 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -1012,10 +1012,17 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
1012 | err = sysfs_create_link(&phydev->mdio.dev.kobj, &dev->dev.kobj, | 1012 | err = sysfs_create_link(&phydev->mdio.dev.kobj, &dev->dev.kobj, |
1013 | "attached_dev"); | 1013 | "attached_dev"); |
1014 | if (!err) { | 1014 | if (!err) { |
1015 | err = sysfs_create_link(&dev->dev.kobj, &phydev->mdio.dev.kobj, | 1015 | err = sysfs_create_link_nowarn(&dev->dev.kobj, |
1016 | "phydev"); | 1016 | &phydev->mdio.dev.kobj, |
1017 | if (err) | 1017 | "phydev"); |
1018 | goto error; | 1018 | if (err) { |
1019 | dev_err(&dev->dev, "could not add device link to %s err %d\n", | ||
1020 | kobject_name(&phydev->mdio.dev.kobj), | ||
1021 | err); | ||
1022 | /* non-fatal - some net drivers can use one netdevice | ||
1023 | * with more then one phy | ||
1024 | */ | ||
1025 | } | ||
1019 | 1026 | ||
1020 | phydev->sysfs_links = true; | 1027 | phydev->sysfs_links = true; |
1021 | } | 1028 | } |
@@ -1666,6 +1673,23 @@ int genphy_config_init(struct phy_device *phydev) | |||
1666 | } | 1673 | } |
1667 | EXPORT_SYMBOL(genphy_config_init); | 1674 | EXPORT_SYMBOL(genphy_config_init); |
1668 | 1675 | ||
1676 | /* This is used for the phy device which doesn't support the MMD extended | ||
1677 | * register access, but it does have side effect when we are trying to access | ||
1678 | * the MMD register via indirect method. | ||
1679 | */ | ||
1680 | int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, u16 regnum) | ||
1681 | { | ||
1682 | return -EOPNOTSUPP; | ||
1683 | } | ||
1684 | EXPORT_SYMBOL(genphy_read_mmd_unsupported); | ||
1685 | |||
1686 | int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, | ||
1687 | u16 regnum, u16 val) | ||
1688 | { | ||
1689 | return -EOPNOTSUPP; | ||
1690 | } | ||
1691 | EXPORT_SYMBOL(genphy_write_mmd_unsupported); | ||
1692 | |||
1669 | int genphy_suspend(struct phy_device *phydev) | 1693 | int genphy_suspend(struct phy_device *phydev) |
1670 | { | 1694 | { |
1671 | return phy_set_bits(phydev, MII_BMCR, BMCR_PDOWN); | 1695 | return phy_set_bits(phydev, MII_BMCR, BMCR_PDOWN); |