net: dsa: rtl8366rb: Support the CPU DSA tag
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 8 Jul 2020 12:25:37 +0000 (14:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2020 22:36:19 +0000 (15:36 -0700)
commita20fafb92bd84b9ab585ef4743339c96865cada2
treed13eee7618ff7017e11e2b025ef2411f49a33d78
parentefd7fe68f0c6c9649757bf80cbc382fd21e764c9
net: dsa: rtl8366rb: Support the CPU DSA tag

This activates the support to use the CPU tag to properly
direct ingress traffic to the right port.

Bit 15 in register RTL8368RB_CPU_CTRL_REG can be set to
1 to disable the insertion of the CPU tag which is what
the code currently does. The bit 15 define calls this
setting RTL8368RB_CPU_INSTAG which is confusing since the
inverse meaning is implied: programmers may think that
setting this bit to 1 will *enable* inserting the tag
rather than disabling it, so rename this setting in
bit 15 to RTL8368RB_CPU_NO_TAG which is more to the
point.

After this e.g. ping works out-of-the-box with the
RTL8366RB.

Cc: DENG Qingfang <dqfext@gmail.com>
Cc: Mauri Sandberg <sandberg@mailfence.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/Kconfig
drivers/net/dsa/rtl8366rb.c