net: marvell: prestera: fix brige port operation
authorVolodymyr Mytnyk <vmytnyk@marvell.com>
Thu, 18 Nov 2021 19:48:03 +0000 (21:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:48 +0000 (09:04 +0100)
commit8599e15e508e5740b67eda3f0430a1756adf295f
treefba420601e165314abb1acb958b37e0da34a144a
parent94850e2dda990fc07dfac15a65c167ac620b734a
net: marvell: prestera: fix brige port operation

[ Upstream commit 253e9b4d11e577bb8cbc77ef68a9ff46438065ca ]

Return NOTIFY_DONE (dont't care) for switchdev notifications
that prestera driver don't know how to handle them.

With introduction of SWITCHDEV_BRPORT_[UN]OFFLOADED switchdev
events, the driver rejects adding swport to bridge operation
which is handled by prestera_bridge_port_join() func. The root
cause of this is that prestera driver returns error (EOPNOTSUPP)
in prestera_switchdev_blk_event() handler for unknown swdev
events. This causes switchdev_bridge_port_offload() to fail
when adding port to bridge in prestera_bridge_port_join().

Fixes: 957e2235e526 ("net: make switchdev_bridge_port_{,unoffload} loosely coupled with the bridge")
Signed-off-by: Volodymyr Mytnyk <vmytnyk@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_switchdev.c