]> git.baikalelectronics.ru Git - kernel.git/commit
net: ocelot: replay switchdev events when joining bridge
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 22 Mar 2021 23:51:52 +0000 (01:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Mar 2021 21:49:06 +0000 (14:49 -0700)
commit419e05b57b17e8de717c0cc861c3a12762e47c92
tree0385f926132f4595dd87aac94a098fc9433944d9
parent1bf95f981c0c0a92004d006a701386906fc0dd46
net: ocelot: replay switchdev events when joining bridge

The premise of this change is that the switchdev port attributes and
objects offloaded by ocelot might have been missed when we are joining
an already existing bridge port, such as a bonding interface.

The patch pulls these switchdev attributes and objects from the bridge,
on behalf of the 'bridge port' net device which might be either the
ocelot switch interface, or the bonding upper interface.

The ocelot_net.c belongs strictly to the switchdev ocelot driver, while
ocelot.c is part of a library shared with the DSA felix driver.
The ocelot_port_bridge_leave function (part of the common library) used
to call ocelot_port_vlan_filtering(false), something which is not
necessary for DSA, since the framework deals with that already there.
So we move this function to ocelot_switchdev_unsync, which is specific
to the switchdev driver.

The code movement described above makes ocelot_port_bridge_leave no
longer return an error code, so we change its type from int to void.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c
drivers/net/ethernet/mscc/Kconfig
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_net.c
include/soc/mscc/ocelot.h