]> git.itanic.dy.fi Git - linux-stable/commit
net: dsa: mv88e6xx: fix supported_interfaces setup in mv88e6250_phylink_get_caps()
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Wed, 17 Apr 2024 10:37:37 +0000 (12:37 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 22 Apr 2024 20:38:27 +0000 (13:38 -0700)
commita4e3899065ffa87d49dc20e8c17501edbc189692
tree63016bb21057e46dd4b42b1805b209c6fbcd3a5c
parent9e91bf75dd9089b08d8156d66d0e7c024d72780b
net: dsa: mv88e6xx: fix supported_interfaces setup in mv88e6250_phylink_get_caps()

With the recent PHYLINK changes requiring supported_interfaces to be set,
MV88E6250 family switches like the 88E6020 fail to probe - cmode is
never initialized on these devices, so mv88e6250_phylink_get_caps() does
not set any supported_interfaces flags.

Instead of a cmode, on 88E6250 we have a read-only port mode value that
encodes similar information. There is no reason to bother mapping port
mode to the cmodes of other switch models; instead we introduce a
mv88e6250_setup_supported_interfaces() that is called directly from
mv88e6250_phylink_get_caps().

Fixes: de5c9bf40c45 ("net: phylink: require supported_interfaces to be filled")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240417103737.166651-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/port.h