From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Tao Wang <tao03.wang@horizon.auto>
Cc: kuba@kernel.org, alexandre.torgue@foss.st.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
horms@kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, maxime.chevallier@bootlin.com,
mcoquelin.stm32@gmail.com, netdev@vger.kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH net v2] net: stmmac: fix transmit queue timed out after resume
Date: Wed, 14 Jan 2026 11:26:17 +0000 [thread overview]
Message-ID: <aWd9WUUGhSU5tWcn@shell.armlinux.org.uk> (raw)
In-Reply-To: <20260114110031.113367-1-tao03.wang@horizon.auto>
On Wed, Jan 14, 2026 at 07:00:31PM +0800, Tao Wang wrote:
> after resume dev_watchdog() message:
> "NETDEV WATCHDOG: CPU: x: transmit queue x timed out xx ms"
>
> The trigging scenario is as follows:
> When the TSO function sets tx_skbuff_dma[tx_q->cur_tx].last_segment = true,
> and the last_segment value is not cleared in stmmac_free_tx_buffer after
> resume, restarting TSO transmission may incorrectly use
> tx_q->tx_skbuff_dma[first_entry].last_segment = true for a new TSO packet.
>
> When the tx queue has timed out, and the emac TX descriptor is as follows:
> eth0: 221 [0x0000000876d10dd0]: 0x73660cbe 0x8 0x42 0xb04416a0
> eth0: 222 [0x0000000876d10de0]: 0x77731d40 0x8 0x16a0 0x90000000
>
> Descriptor 221 is the TSO header, and descriptor 222 is the TSO payload.
> In the tdes3 (0xb04416a0), bit 29 (first descriptor) and bit 28
> (last descriptor) of the TSO packet 221 DMA descriptor cannot both be
> set to 1 simultaneously. Since descriptor 222 is the actual last
> descriptor, failing to set it properly will cause the EMAC DMA to stop
> and hang.
>
> To solve the issue, set last_segment to false in stmmac_free_tx_buffer:
> tx_q->tx_skbuff_dma[i].last_segment = false. Do not use the last_segment
> default value and set last_segment to false in stmmac_tso_xmit. This
> will prevent similar issues from occurring in the future.
While I agree with the change for stmmac_tso_xmit(), please explain why
the change in stmmac_free_tx_buffer() is necessary.
It seems to me that if this is missing in stmmac_free_tx_buffer(), the
driver should have more problems than just TSO.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-01-14 11:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 7:02 [PATCH net Resend] net: stmmac: fix transmit queue timed out after resume Tao Wang
2026-01-13 4:05 ` Jakub Kicinski
2026-01-14 11:00 ` [PATCH net v2] " Tao Wang
2026-01-14 11:26 ` Russell King (Oracle) [this message]
2026-01-15 7:08 ` Tao Wang
2026-01-15 12:09 ` Russell King (Oracle)
2026-01-15 19:40 ` Russell King (Oracle)
2026-01-15 21:04 ` Maxime Chevallier
2026-01-15 21:35 ` Maxime Chevallier
2026-01-16 0:50 ` Russell King (Oracle)
2026-01-16 13:37 ` Russell King (Oracle)
2026-01-16 18:08 ` Russell King (Oracle)
2026-01-16 18:27 ` Maxime Chevallier
2026-01-16 19:22 ` Russell King (Oracle)
2026-01-16 20:57 ` Russell King (Oracle)
2026-01-17 17:06 ` Jakub Kicinski
2026-01-17 20:50 ` Russell King (Oracle)
2026-01-16 7:29 ` Tao Wang
2026-01-15 3:16 ` Jakub Kicinski
2026-01-15 7:19 ` Tao Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWd9WUUGhSU5tWcn@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tao03.wang@horizon.auto \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox