summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2019-06-10 12:31:49 -0700
committerDavid S. Miller <davem@davemloft.net>2019-06-12 11:01:20 -0700
commit2131fba53186c22254ab762655675d3179adfb0f (patch)
treef75611fbd5e9fe146c3b27eee2db8fe1032a4586 /net/dsa
parentfcf15367cbd90e5fd6f69d73a1d512fbb7ca2748 (diff)
downloadlinux-stable-2131fba53186c22254ab762655675d3179adfb0f.tar.gz
linux-stable-2131fba53186c22254ab762655675d3179adfb0f.tar.bz2
linux-stable-2131fba53186c22254ab762655675d3179adfb0f.zip
net: dsa: Deal with non-existing PHY/fixed-link
We need to specifically deal with phylink_of_phy_connect() returning -ENODEV, because this can happen when a CPU/DSA port does connect neither to a PHY, nor has a fixed-link property. This is a valid use case that is permitted by the binding and indicates to the switch: auto-configure port with maximum capabilities. Fixes: 0e27921816ad ("net: dsa: Use PHYLINK for the CPU/DSA ports") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c
index 70744fec9717..585b6b9a9433 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -618,7 +618,7 @@ static int dsa_port_phylink_register(struct dsa_port *dp)
}
err = phylink_of_phy_connect(dp->pl, port_dn, 0);
- if (err) {
+ if (err && err != -ENODEV) {
pr_err("could not attach to PHY: %d\n", err);
goto err_phy_connect;
}