mlxsw: spectrum: Handle VLAN device unlinking
commitcd54dc4cd37d0b18280c29f2bf25ba08d6895b3c
authorIdo Schimmel <idosch@mellanox.com>
Wed, 19 Dec 2018 06:08:41 +0000 (19 06:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2019 07:53:44 +0000 (10 09:53 +0200)
tree5f34d4dbb5cc6dd1368778b625f58fe1d2a1b2cb
parenta8a296abee3667329a68fa15851c4684c9c92874
mlxsw: spectrum: Handle VLAN device unlinking

[ Upstream commit e149113a74c35f0a28d1bfe17d2505a03563c1d5 ]

In commit 993107fea5ee ("mlxsw: spectrum_switchdev: Fix VLAN device
deletion via ioctl") I fixed a bug caused by the fact that the driver
views differently the deletion of a VLAN device when it is deleted via
an ioctl and netlink.

Instead of relying on a specific order of events (device being
unregistered vs. VLAN filter being updated), simply make sure that the
driver performs the necessary cleanup when the VLAN device is unlinked,
which always happens before the other two events.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c