Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2131fba5 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

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: 0e279218 ("net: dsa: Use PHYLINK for the CPU/DSA ports")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fcf15367
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}