]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: fix TSO support when some channels have TBS available
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 1 Apr 2026 07:21:24 +0000 (08:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 18:28:18 +0000 (11:28 -0700)
commite32820264c2949a3e75bc5083e49c885e3bbaf62
treefa64108ff941bf3eafd6d1a852cc2efdf31ada81
parentafe840ddf15c9960e4c4522c95dea459f4fa055b
net: stmmac: fix TSO support when some channels have TBS available

According to the STM32MP25xx manual, which is dwmac v5.3, TBS (time
based scheduling) is not permitted for channels which have hardware
TSO enabled. Intel's commit 5e6038b88a57 ("net: stmmac: fix TSO and
TBS feature enabling during driver open") concurs with this, but it
is incomplete.

This commit avoids enabling TSO support on the channels which have
TBS available, which, as far as the hardware is concerned, means we
do not set the TSE bit in the DMA channel's transmit control register.

However, the net device's features apply to all queues(channels), which
means these channels may still be handed TSO skbs to transmit, and the
driver will pass them to stmmac_tso_xmit(). This will generate the
descriptors for TSO, even though the channel has the TSE bit clear.

Fix this by checking whether the queue(channel) has TBS available,
and if it does, fall back to software GSO support.

Fixes: 5e6038b88a57 ("net: stmmac: fix TSO and TBS feature enabling during driver open")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1w7ptE-0000000Easz-28tv@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c