]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Deal with non-existing PHY/fixed-link
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 10 Jun 2019 19:31:49 +0000 (12:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2019 18:01:20 +0000 (11:01 -0700)
commitb57eee1e388bde3838fd7b41d1479a91dc1a1528
treef75611fbd5e9fe146c3b27eee2db8fe1032a4586
parent3223af2a249158557e398c0abeaa0e995b354a28
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: 5f71d95619ea ("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>
net/dsa/port.c