diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-02-23 15:20:55 +0200 |
---|---|---|
committer | Ramon Fried <ramon@neureality.ai> | 2022-04-10 08:44:12 +0300 |
commit | 107b14e36eaafebdc28666a9d5fecdd4044a59e3 (patch) | |
tree | c6ad2d93d0895cb10242485e03e46d746ebcd0b8 /drivers | |
parent | 8221c52d88fbe84ca9692dc23827e21403c952e8 (diff) | |
download | u-boot-107b14e36eaafebdc28666a9d5fecdd4044a59e3.zip u-boot-107b14e36eaafebdc28666a9d5fecdd4044a59e3.tar.gz u-boot-107b14e36eaafebdc28666a9d5fecdd4044a59e3.tar.bz2 |
net: phy: dp83867: avoid error in dp83867_of_init() when PHY has no OF node
A DM_ETH driver may use phy_connect() towards a PHY address on an MDIO
bus which is not specified in the device tree, as evidenced by:
pfe_eth_probe
-> pfe_phy_configure
-> phy_connect
When this happens, the PHY will have an invalid OF node.
The dp83867_config() method has extra initialization steps which are
bypassed when the PHY lacks an OF node, which is undesirable because it
will lead to broken networking. Allow the rest of the code to run.
Fixes: 085445ca4104 ("net: phy: ti: Allow the driver to be more configurable")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/dp83867.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index eada454..49978d0 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -158,7 +158,7 @@ static int dp83867_of_init(struct phy_device *phydev) node = phy_get_ofnode(phydev); if (!ofnode_valid(node)) - return -EINVAL; + return 0; /* Optional configuration */ ret = ofnode_read_u32(node, "ti,clk-output-sel", |