net: dsa: don't warn in dsa_port_set_state_now() when driver doesn't support it
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 16 Aug 2022 20:14:45 +0000 (23:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:25 +0000 (11:40 +0200)
commitcaa80c1f83164cd1291885c544a5cc3b2d3e6c77
treef71649012721e60ed7436ef0686c1cd4116a1340
parentb0672895d8be5d19d4b05ac83f807026fc791037
net: dsa: don't warn in dsa_port_set_state_now() when driver doesn't support it

commit 211987f3ac734000ea1548784b2a4539a974fbc8 upstream.

ds->ops->port_stp_state_set() is, like most DSA methods, optional, and
if absent, the port is supposed to remain in the forwarding state (as
standalone). Such is the case with the mv88e6060 driver, which does not
offload the bridge layer. DSA warns that the STP state can't be changed
to FORWARDING as part of dsa_port_enable_rt(), when in fact it should not.

The error message is also not up to modern standards, so take the
opportunity to make it more descriptive.

Fixes: fd3645413197 ("net: dsa: change scope of STP state setter")
Reported-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Sergei Antonov <saproj@gmail.com>
Link: https://lore.kernel.org/r/20220816201445.1809483-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/dsa/port.c