]> 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)
commitf1bf20338439e680d9d9e5d53fca5c529e12e573
tree70fcf03892581489078289a0f75298c7bb193aa5
parent60bab96ef266e79e06b2a0cdd614ab2e443b99c7
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