]> git.baikalelectronics.ru Git - 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)
commitd4131887a3c49b99af6798b572aa51b13d896098
treefde9372099a088676bfe2f1c9860cc563176f546
parent0b4f223b40e5e34aae574b10355c9944f5b02eb6
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