aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/drivers/net
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2021-06-11 14:54:43 -0400
committerChuanhong Guo <gch981213@gmail.com>2021-06-23 14:22:18 +0800
commita2acdf9607045e5669c305c57dd7c77be8351ba0 (patch)
tree39fb2de0445ff72843636f555abf94b7d10d210b /target/linux/ramips/files/drivers/net
parent953bfe2eb3b7236a72fa41ab2204fdaa9fd09f65 (diff)
downloadupstream-a2acdf9607045e5669c305c57dd7c77be8351ba0.tar.gz
upstream-a2acdf9607045e5669c305c57dd7c77be8351ba0.tar.bz2
upstream-a2acdf9607045e5669c305c57dd7c77be8351ba0.zip
ramips: mt7620: remove useless GMAC nodes
These nodes are used for configuring a GMAC interface and for defining external PHYs to be accessed with MDIO. None of this is possible on MT7620N, only MT7620A, so remove them from all MT7620N DTS. When the mdio-bus node is missing, the driver returns -NODEV which causes the internal switch to not initialize. Replace that return so that everything works without the DTS node. Also, an extra kernel message to indicate for all error conditions that mdio-bus is disabled. Fixes: d482356322c9 ("ramips: mt7620n: add mdio node and disable port4 by default") Fixes: aa5014dd1a58 ("ramips: mt7620n: enable port 4 as EPHY by default") Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'target/linux/ramips/files/drivers/net')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
index dceb08b835..b923b02af9 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
@@ -232,7 +232,8 @@ int fe_mdio_init(struct fe_priv *priv)
mii_np = of_get_child_by_name(priv->dev->of_node, "mdio-bus");
if (!mii_np) {
dev_err(priv->dev, "no %s child node found", "mdio-bus");
- return -ENODEV;
+ err = 0;
+ goto err_no_bus;
}
if (!of_device_is_available(mii_np)) {
@@ -264,6 +265,8 @@ err_free_bus:
kfree(priv->mii_bus);
err_put_node:
of_node_put(mii_np);
+err_no_bus:
+ dev_err(priv->dev, "%s disabled", "mdio-bus");
priv->mii_bus = NULL;
return err;
}