dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports
authorAndrew Lunn <andrew@lunn.ch>
Sun, 26 Sep 2021 17:41:26 +0000 (19:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:55:54 +0000 (15:55 +0200)
commitc20a0ad7b6a054d77c3f20660befe77eaae3f24d
tree2ba07b4abbd4030853d01741137f25e1d46a3f56
parent7b771b12229e82dac66cf0090d0774475a3c662c
dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports

[ Upstream commit b9c587fed61cf88bd45822c3159644445f6d5aa6 ]

Same members of the Marvell Ethernet switches impose MTU restrictions
on ports used for connecting to the CPU or another switch for DSA. If
the MTU is set too low, tagged frames will be discarded. Ensure the
worst case tagger overhead is included in setting the MTU for DSA and
CPU ports.

Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
Reported by: 曹煜 <cao88yu@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h