]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drivers: net: xgene: Fix regression in CRC stripping
authorStephane Graber <stgraber@ubuntu.com>
Tue, 22 Mar 2022 22:42:06 +0000 (18:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2022 06:22:27 +0000 (08:22 +0200)
commit6c35f6cd1bbd5bf678107f9f15edccd0a2315764
treed8fd5aaf61d069cedfcdf6e17f5d7d6e0e8c4c6a
parent7115e8d65b4da1a687c8080af30594c68c056ecc
drivers: net: xgene: Fix regression in CRC stripping

commit e9e6faeafaa00da1851bcf47912b0f1acae666b4 upstream.

All packets on ingress (except for jumbo) are terminated with a 4-bytes
CRC checksum. It's the responsability of the driver to strip those 4
bytes. Unfortunately a change dating back to March 2017 re-shuffled some
code and made the CRC stripping code effectively dead.

This change re-orders that part a bit such that the datalen is
immediately altered if needed.

Fixes: 4902a92270fb ("drivers: net: xgene: Add workaround for errata 10GE_8/ENET_11")
Cc: stable@vger.kernel.org
Signed-off-by: Stephane Graber <stgraber@ubuntu.com>
Tested-by: Stephane Graber <stgraber@ubuntu.com>
Link: https://lore.kernel.org/r/20220322224205.752795-1-stgraber@ubuntu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c