linux/drivers/net
Vladimir Oltean b0b33b048d net: dsa: sja1105: fix address learning getting disabled on the CPU port
In May 2019 when commit 640f763f98 ("net: dsa: sja1105: Add support
for Spanning Tree Protocol") was introduced, the comment that "STP does
not get called for the CPU port" was true. This changed after commit
0394a63acf ("net: dsa: enable and disable all ports") in August 2019
and went largely unnoticed, because the sja1105_bridge_stp_state_set()
method did nothing different compared to the static setup done by
sja1105_init_mac_settings().

With the ability to turn address learning off introduced by the blamed
commit, there is a new priv->learn_ena port mask in the driver. When
sja1105_bridge_stp_state_set() gets called and we are in
BR_STATE_LEARNING or later, address learning is enabled or not depending
on priv->learn_ena & BIT(port).

So what happens is that priv->learn_ena is not being set from anywhere
for the CPU port, and the static configuration done by
sja1105_init_mac_settings() is being overwritten.

To solve this, acknowledge that the static configuration of STP state is
no longer necessary because the STP state is being set by the DSA core
now, but what is necessary is to set priv->learn_ena for the CPU port.

Fixes: 4d94235495 ("net: dsa: sja1105: offload bridge port flags to device")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-13 09:32:41 -07:00
..
appletalk
arcnet
bonding bonding: fix incorrect return value of bond_ipsec_offload_ok() 2021-07-06 10:36:59 -07:00
caif net: remove the caif_hsi driver 2021-07-01 13:19:48 -07:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
dsa net: dsa: sja1105: fix address learning getting disabled on the CPU port 2021-07-13 09:32:41 -07:00
ethernet net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload 2021-07-13 09:30:46 -07:00
fddi
fjes fjes: check return value after calling platform_get_resource() 2021-06-10 13:53:13 -07:00
hamradio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-18 19:47:02 -07:00
hippi
hyperv Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
ieee802154 ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl() 2021-06-22 21:26:59 +02:00
ipa net: ipa: add IPA v3.1 configuration data 2021-06-21 12:31:00 -07:00
ipvlan
mdio net: mdiobus: withdraw fwnode_mdbiobus_register 2021-06-25 11:46:29 -07:00
mhi wwan: core: add WWAN common private data for netdev 2021-06-22 10:01:17 -07:00
netdevsim net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops 2021-07-06 10:36:59 -07:00
pcs net: pcs: xpcs: Fix a less than zero u16 comparison error 2021-06-17 11:14:06 -07:00
phy net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340 2021-07-11 10:02:33 -07:00
plip
ppp
slip
team
usb net: usb: asix: ax88772: suspend PHY on driver probe 2021-07-01 11:12:13 -07:00
vmxnet3 vmxnet3: fix cksum offload issues for tunnels with non-default udp ports 2021-07-02 13:41:15 -07:00
wan net: hdlc: rename 'mod_init' & 'mod_exit' functions to be module-specific 2021-07-12 11:08:36 -07:00
wireguard wireguard: allowedips: free empty intermediate nodes when removing single node 2021-06-04 14:25:14 -07:00
wireless mt76: mt7921: continue to probe driver when fw already downloaded 2021-07-08 13:33:13 -07:00
wwan net: wwan: iosm: set default mtu 2021-07-01 13:04:41 -07:00
xen-netback xen-netback: take a reference to the RX task thread 2021-06-07 15:13:15 +02:00
bareudp.c bareudp: allow redirecting bareudp packets to eth devices 2021-06-28 12:44:17 -07:00
dummy.c
eql.c
geneve.c
gtp.c gtp: reset mac_header after decap 2021-06-28 12:44:17 -07:00
ifb.c
Kconfig net: wwan: Fix WWAN config symbols 2021-06-14 13:17:10 -07:00
LICENSE.SRC
loopback.c
macsec.c net: macsec: fix the length used to copy the key for offloading 2021-06-24 12:41:12 -07:00
macvlan.c macvlan: Fix a typo 2021-06-01 17:05:04 -07:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c virtio_net: check virtqueue_add_sgs() return value 2021-07-10 11:29:30 -07:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-06-22 09:48:38 -07:00
xen-netfront.c