diff options
author | David S. Miller <davem@davemloft.net> | 2018-09-25 20:35:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-25 20:35:29 +0300 |
commit | a06ee256e5d6f03fffbd088de9bf84035658cc5a (patch) | |
tree | 9b88044cd4a46496d15a05b43246810c8b677f46 /drivers/net/ethernet/ibm/emac | |
parent | bd6207202db8974ca3d3183ca0d5611d45b2973c (diff) | |
parent | 846e8dd47c264e0b359afed28ea88e0acdee6818 (diff) | |
download | linux-a06ee256e5d6f03fffbd088de9bf84035658cc5a.tar.xz |
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Version bump conflict in batman-adv, take what's in net-next.
iavf conflict, adjustment of netdev_ops in net-next conflicting
with poll controller method removal in net.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/emac')
-rw-r--r-- | drivers/net/ethernet/ibm/emac/core.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 5107c9450a19..760b2ad8e295 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -2678,12 +2678,17 @@ static int emac_init_phy(struct emac_instance *dev) if (of_phy_is_fixed_link(np)) { int res = emac_dt_mdio_probe(dev); - if (!res) { - res = of_phy_register_fixed_link(np); - if (res) - mdiobus_unregister(dev->mii_bus); + if (res) + return res; + + res = of_phy_register_fixed_link(np); + dev->phy_dev = of_phy_find_device(np); + if (res || !dev->phy_dev) { + mdiobus_unregister(dev->mii_bus); + return res ? res : -EINVAL; } - return res; + emac_adjust_link(dev->ndev); + put_device(&dev->phy_dev->mdio.dev); } return 0; } |