@@ -2563,6 +2563,13 @@ static int mv643xx_eth_change_mtu(struct net_device *dev, int new_mtu)
struct mv643xx_eth_private *mp = netdev_priv(dev);
WRITE_ONCE(dev->mtu, new_mtu);
+ if (mp->shared->tx_csum_limit &&
+ dev->mtu > mp->shared->tx_csum_limit) {
+ dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
+ netdev_info(dev,
+ "Disable IP tx csum offload and software TSO for MTU larger than %dB\n",
+ mp->shared->tx_csum_limit);
+ }
mv643xx_eth_recalc_skb_size(mp);
tx_set_rate(mp, 1000000000, 16777216);
The Ethernet controller found in Armada 310 doesn't support TCP/IP checksum with frame sizes larger than its TX checksum offload limit Disable the features NETIF_F_IP_CSUM and NETIF_F_TSO when the MTU is set to a value larger than this limit, to prevent the software TSO generating GSO packets that are not suitable to offload to the Ethernet controller, which would be calculated by the IP stack instead. Signed-off-by: Qingtao Cao <qingtao.cao@digi.com> --- drivers/net/ethernet/marvell/mv643xx_eth.c | 7 +++++++ 1 file changed, 7 insertions(+)