public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tao Wang <tao03.wang@horizon.auto>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
	<edumazet@google.com>, <pabeni@redhat.com>, <horms@kernel.org>,
	<andrew+netdev@lunn.ch>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@foss.st.com>, <rmk+kernel@armlinux.org.uk>,
	<maxime.chevallier@bootlin.com>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>
Subject: Re: [PATCH net Resend] net: stmmac: fix transmit queue timed out after resume
Date: Mon, 12 Jan 2026 20:05:50 -0800	[thread overview]
Message-ID: <20260112200550.2cd3c212@kernel.org> (raw)
In-Reply-To: <20260109070211.101076-1-tao03.wang@horizon.auto>

On Fri, 9 Jan 2026 15:02:11 +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.

For some reason the reposted version of the patch has unnecessary empty
lines separating each line of this paragraph.

> To solve the issue, set last_segment to false in stmmac_free_tx_buffer:
> tx_q->tx_skbuff_dma[i].last_segment = false;
> Set last_segment to false in stmmac_tso_xmit, and do not use the default
>  value: tx_q->tx_skbuff_dma[first_entry].last_segment = false;
> This will prevent similar issues from occurring in the future.

Please add a suitable Fixes tag, pointing at the commit which
introduced this incorrect behavior (either the commit which broke it or
the commit which added this code if it was always broken).
-- 
pw-bot: cr

  reply	other threads:[~2026-01-13  4:05 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 [this message]
2026-01-14 11:00   ` [PATCH net v2] " Tao Wang
2026-01-14 11:26     ` Russell King (Oracle)
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=20260112200550.2cd3c212@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@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=rmk+kernel@armlinux.org.uk \
    --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