]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: dpaa2-ethsw: verify the nofifier block
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 21 Jul 2020 09:19:14 +0000 (12:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2020 14:53:34 +0000 (16:53 +0200)
commitb99a3f7093be7d7ff67491f75bf24fd60d8ba774
treefde9372099a088676bfe2f1c9860cc563176f546
parent006266854705b308531c3a27c9e65d0eeadb5742
staging: dpaa2-ethsw: verify the nofifier block

Since now we have a notifier block for each DPSW instance probed, we
have to also check that the netdev is indeed connected to the notifier
received. Without this, we end up with the same switchdev callback being
executed multiple times (because it would be received by all notifier
blocks, not just the one intended to).
Also, move the function higher in the source file because it will be
used in later patches from multiple places.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-2-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethsw/ethsw.c