diff options
author | Jan Hoffmann <jan@3e8.eu> | 2021-09-01 20:49:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-18 13:42:22 +0200 |
commit | 897f50b0414f1ca5ed5dd2b5e11ca3cbfb77fd7c (patch) | |
tree | 448c4e76a74527ff17433d992323f59efba09b27 | |
parent | ba648861bd92f32e709f8a37ffad58b49142e77d (diff) | |
download | linux-stable-897f50b0414f1ca5ed5dd2b5e11ca3cbfb77fd7c.tar.gz linux-stable-897f50b0414f1ca5ed5dd2b5e11ca3cbfb77fd7c.tar.bz2 linux-stable-897f50b0414f1ca5ed5dd2b5e11ca3cbfb77fd7c.zip |
net: dsa: lantiq_gswip: fix maximum frame length
commit 552799f8b3b0074d2617f53a63a088f9514a66e3 upstream.
Currently, outgoing packets larger than 1496 bytes are dropped when
tagged VLAN is used on a switch port.
Add the frame check sequence length to the value of the register
GSWIP_MAC_FLEN to fix this. This matches the lantiq_ppa vendor driver,
which uses a value consisting of 1518 bytes for the MAC frame, plus the
lengths of special tag and VLAN tags.
Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
Cc: stable@vger.kernel.org
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/dsa/lantiq_gswip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c index e78026ef6d8c..64d6dfa83122 100644 --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -843,7 +843,8 @@ static int gswip_setup(struct dsa_switch *ds) gswip_switch_mask(priv, 0, GSWIP_MAC_CTRL_2_MLEN, GSWIP_MAC_CTRL_2p(cpu_port)); - gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8, GSWIP_MAC_FLEN); + gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8 + ETH_FCS_LEN, + GSWIP_MAC_FLEN); gswip_switch_mask(priv, 0, GSWIP_BM_QUEUE_GCTRL_GL_MOD, GSWIP_BM_QUEUE_GCTRL); |