]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Mark port as active before registering it
authorIdo Schimmel <idosch@mellanox.com>
Wed, 17 Aug 2016 14:39:31 +0000 (16:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Aug 2016 23:18:27 +0000 (19:18 -0400)
commite99f84208d696fa7e6b72870ca824dad7637b55a
tree6b6fa76dccd88a0e199620c98de47ae197f2cf8a
parent5ea66fd63ae013f10683cd6cd12eb7d10c6d5e50
mlxsw: spectrum: Mark port as active before registering it

Commit 0920ba0b1cd3 ("mlxsw: spectrum: Initialize ports at the end of
init sequence") moved ports initialization to the end of the init
sequence, which means ports are the first to be removed during fini.

Since the FDB delayed work is still active when ports are removed it's
possible for it to process FDB notifications of inactive ports,
resulting in a warning message.

Fix that by marking ports as inactive only after unregistering them. The
NETDEV_UNREGISTER event will invoke bridge's driver port removal
sequence that will cause the FDB (and FDB notifications) to be flushed.

Fixes: 0920ba0b1cd3 ("mlxsw: spectrum: Initialize ports at the end of init sequence")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c