diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-12 07:55:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-12 07:55:43 +0300 |
commit | 9d367eddf363553c7668ba92c3b9d187ec4f71f7 (patch) | |
tree | 4f06d334d316390cc9a869ce3e74ec48d32ed0f8 /drivers/net/phy/micrel.c | |
parent | b6a0e72ad3cffabaf30b856deb58fbe64a0f36a8 (diff) | |
parent | 03d84a5f83a67e692af00a3d3901e7820e3e84d5 (diff) | |
download | linux-9d367eddf363553c7668ba92c3b9d187ec4f71f7.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/bonding/bond_main.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
The bond_main.c and mellanox switch conflicts were cases of
overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/micrel.c')
-rw-r--r-- | drivers/net/phy/micrel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 0dbc6496b6f6..03833dbfca67 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -483,9 +483,17 @@ static int ksz9031_config_init(struct phy_device *phydev) "txd2-skew-ps", "txd3-skew-ps" }; static const char *control_skews[2] = {"txen-skew-ps", "rxdv-skew-ps"}; + const struct device *dev_walker; - if (!of_node && dev->parent->of_node) - of_node = dev->parent->of_node; + /* The Micrel driver has a deprecated option to place phy OF + * properties in the MAC node. Walk up the tree of devices to + * find a device with an OF node. + */ + dev_walker = &phydev->mdio.dev; + do { + of_node = dev_walker->of_node; + dev_walker = dev_walker->parent; + } while (!of_node && dev_walker); if (of_node) { ksz9031_of_load_skew_values(phydev, of_node, |