public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* stmmac: TX stalls with head OWN=1; requiring manual DMA kick (6.12.63)
@ 2026-03-11 18:34 Tomer Maimon
  2026-03-11 19:46 ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Tomer Maimon @ 2026-03-11 18:34 UTC (permalink / raw)
  To: Giuseppe Cavallaro; +Cc: netdev

Hi Giuseppe,

On kernel 6.12.63 (GMAC, normal 16‑byte TX descriptors), we observe
brief TX stalls when sending small packets.

During these pauses, when stmmac_tx_clean() runs, the head descriptor
(dirty_tx) consistently still has OWN=1 across multiple NAPI polls.
Descriptor programming in xmit() looks correct (OWN=1, FD/LD=1, CIC=2,
length ≈ 60–110 bytes), but reclamation does not proceed until a later
event (typically the next TX).

Reading DMA_STATUS during the stall shows the Transmit Process State
(TS) remains active (TS = 6), so the TX DMA engine appears to be
running, but it is not fetching the head descriptor, and the OWN bit
remains set until something nudges the engine.

As a work‑around, we added the following logic inside stmmac_tx_clean():

If the head descriptor still has OWN=1, issue a Transmit Poll Demand
via stmmac_enable_dma_transmission().
This immediately resumes the DMA and clears the stall.

We would appreciate your feedback on the following questions:

Are you familiar with this behavior in the stmmac TX path (head OWN=1
in tx_clean despite TS being active)?
What conditions could cause the TX DMA not to fetch new descriptors
even when TS=6?
Is this work‑around acceptable, or would you recommend a different
trigger/condition for issuing Transmit Poll Demand?

Thank you,

Tomer

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-18 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 18:34 stmmac: TX stalls with head OWN=1; requiring manual DMA kick (6.12.63) Tomer Maimon
2026-03-11 19:46 ` Andrew Lunn
2026-03-11 20:51   ` Russell King (Oracle)
2026-03-12 14:02     ` Tomer Maimon
2026-03-18 11:05       ` Tomer Maimon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox