]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: stmmac: fix channel TSO enable on resume
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 1 Apr 2026 07:21:14 +0000 (08:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 18:28:18 +0000 (11:28 -0700)
Rather than configuring the channels depending on whether GSO/TSO is
currently enabled by the user, always enable if the hardware has TSO
support and the platform wants TSO to be enabled.

This avoids the channel TSO enable bit being disabled after a resume
when the user has disabled TSO features. This will cause problems when
the user re-enables TSO.

This bug goes back to commit f748be531d70 ("stmmac: support new GMAC4")

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1w7pt4-0000000Easn-14WL@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 35cf4491ec16d739675476bc7820cc6f28c11f3b..52864561f14e8d272c6782cd55322a899c0ca0bc 100644 (file)
@@ -3705,7 +3705,7 @@ static int stmmac_hw_setup(struct net_device *dev)
        stmmac_set_rings_length(priv);
 
        /* Enable TSO */
-       if (priv->tso) {
+       if (priv->dma_cap.tsoen && priv->plat->flags & STMMAC_FLAG_TSO_EN) {
                for (chan = 0; chan < tx_cnt; chan++) {
                        struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[chan];