]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rtl8366rb: Support setting STP state
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 5 Oct 2021 19:47:04 +0000 (21:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Oct 2021 14:08:12 +0000 (15:08 +0100)
commit84efa72eb332bb7e9b33dfd490f150de2f084810
tree70fcf03892581489078289a0f75298c7bb193aa5
parent5e126bb99a3be91e2a510e7a38ea3a9141eea3cc
net: dsa: rtl8366rb: Support setting STP state

This adds support for setting the STP state to the RTL8366RB
DSA switch. This rids the following message from the kernel on
e.g. OpenWrt:

DSA: failed to set STP state 3 (-95)

Since the RTL8366RB has one STP state register per FID with
two bit per port in each, we simply loop over all the FIDs
and set the state on all of them.

Cc: Vladimir Oltean <olteanv@gmail.com>
Cc: Alvin Šipraga <alsi@bang-olufsen.dk>
Cc: Mauri Sandberg <sandberg@mailfence.com>
Cc: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/rtl8366rb.c