net: phy: phylink: fix DSA mac_select_pcs() introduction
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 21 Feb 2022 17:10:52 +0000 (17:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Feb 2022 00:57:08 +0000 (16:57 -0800)
commit1054457006d4a14de4ae4132030e33d7eedaeba1
treeef41912466cfc3358138bf4616c1713dc9656061
parent12c740c8683fed9eee4ae9ddddc96a8abeeeda9e
net: phy: phylink: fix DSA mac_select_pcs() introduction

Vladimir Oltean reports that probing on DSA drivers that aren't yet
populating supported_interfaces now fails. Fix this by allowing
phylink to detect whether DSA actually provides an underlying
mac_select_pcs() implementation.

Reported-by: Vladimir Oltean <olteanv@gmail.com>
Fixes: bde018222c6b ("net: dsa: add support for phylink mac_select_pcs()")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/E1nMCD6-00A0wC-FG@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c
net/dsa/port.c