net: dsa: remove the transactional logic from MDB entries
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 9 Jan 2021 00:01:52 +0000 (02:01 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Jan 2021 00:00:57 +0000 (16:00 -0800)
commita52b2da778fc93e01c4e5a744953f2ba1ec01c00
treeceee4f81ffda53657b8e10aa23a8248fa416ef0f
parent77b61365ecefb2404326c924e215f1ed5a680285
net: dsa: remove the transactional logic from MDB entries

For many drivers, the .port_mdb_prepare callback was not a good opportunity
to avoid any error condition, and they would suppress errors found during
the actual commit phase.

Where a logical separation between the prepare and the commit phase
existed, the function that used to implement the .port_mdb_prepare
callback still exists, but now it is called directly from .port_mdb_add,
which was modified to return an int code.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de> # hellcreek
Reviewed-by: Linus Wallei <linus.walleij@linaro.org> # RTL8366
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 files changed:
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_priv.h
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/lan9303-core.c
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz9477.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/sja1105/sja1105_main.c
include/net/dsa.h
net/dsa/switch.c