]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 04:58:22 +0000 (21:58 -0700)
commit2a698f4bc42d0d3f92e2b3fc9b9dfa7c2d1281fa
tree0ff5abe3c5533d44920170f43b0cfc2d97890c17
parentd62b98a78813ffd3f37c8f438ea333d9f8c8e3ae
net: dsa: don't warn in dsa_port_set_state_now() when driver doesn't support it

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: 34c5880de94c ("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>
net/dsa/port.c