]> git.itanic.dy.fi Git - linux-stable/commit
net: ethernet: cortina: Drop TSO support
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 6 Jan 2024 00:12:22 +0000 (01:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Jan 2024 16:05:00 +0000 (16:05 +0000)
commitac631873c9e7a50d2a8de457cfc4b9f86666403e
tree50ac9a007581eb09438c9bba641e21b6d4121fae
parent61921bdaa132b580b6db6858e6d7dcdb870df5fe
net: ethernet: cortina: Drop TSO support

The recent change to allow large frames without hardware checksumming
slotted in software checksumming in the driver if hardware could not
do it.

This will however upset TSO (TCP Segment Offloading). Typical
error dumps includes this:

skb len=2961 headroom=222 headlen=66 tailroom=0
(...)
WARNING: CPU: 0 PID: 956 at net/core/dev.c:3259 skb_warn_bad_offload+0x7c/0x108
gemini-ethernet-port: caps=(0x0000010000154813, 0x00002007ffdd7889)

And the packets do not go through.

The TSO implementation is bogus: a TSO enabled driver must propagate
the skb_shinfo(skb)->gso_size value to the TSO engine on the NIC.

Drop the size check and TSO offloading features for now: this
needs to be fixed up properly.

After this ethernet works fine on Gemini devices with a direct connected
PHY such as D-Link DNS-313.

Also tested to still be working with a DSA switch using the Gemini
ethernet as conduit interface.

Link: https://lore.kernel.org/netdev/CANn89iJLfxng1sYL5Zk0mknXpyYQPCp83m3KgD2KJ2_hKCpEUg@mail.gmail.com/
Suggested-by: Eric Dumazet <edumazet@google.com>
Fixes: d4d0c5b4d279 ("net: ethernet: cortina: Handle large frames")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cortina/gemini.c