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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2021 12:31:10 +0000 (13:31 +0100)
commitb9c587fed61cf88bd45822c3159644445f6d5aa6
tree91ef25b82a747d4b543315412100a150169b6844
parentb92ce2f54c0f0ff781e914ec189c25f7bf1b1ec2
dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports

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>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h