From: Nicolai Buchwitz <nb@tipi-net.de>
To: Jakob Unterwurzacher <jakobunt@gmail.com>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
jakob.unterwurzacher@cherry.de, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: stmmac: reset the DMA on a fatal bus error
Date: Sun, 22 Nov 2026 18:53:03 +0100 [thread overview]
Message-ID: <b3f78ebb57866c32046ccc60c92928cb@tipi-net.de> (raw)
In-Reply-To: <20261120-stmmac_dma_fatal_error-v1-1-acd57921af57@cherry.de>
Hi Jakob
On 20.11.2026 15:16, Jakob Unterwurzacher wrote:
> From: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>
>
> A fatal bus error (FBE) stops both the TX and the RX DMA engine of the
> channel. The DMA interrupt handlers report it as tx_hard_error, so
> stmmac_tx_err() reinitializes and restarts the TX side only.
Does it? AFAIU stmmac_tx_err() only runs when status is exactly
tx_hard_error.
> [...]
Since you hit this on real hardware, please add a Fixes tag. Also your
subject
lacks the target tree (would be net for a fix). See [1]
[1]
https://docs.kernel.org/process/maintainer-netdev.html#indicating-target-tree
> [...]
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> index a0249715fafaf..2147403629892 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
> @@ -165,7 +165,7 @@ int dwmac4_dma_interrupt(struct stmmac_priv *priv,
> void __iomem *ioaddr,
> }
> if (unlikely(intr_status & DMA_CHAN_STATUS_FBE)) {
> x->fatal_bus_error_irq++;
> - ret = tx_hard_error;
> + ret |= dma_fatal_error;
stmmac_dma_err_interrupt() still checks for tx_hard_error (see
686b5f47f8cc),
so this breaks the FBE reset. The flag needs to be handled there too.
> [...]
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> index 0a6e82a155c0e..bc06076410dc7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
> @@ -335,7 +335,7 @@ static int dwxgmac2_dma_interrupt(struct
> stmmac_priv *priv,
> }
> if (unlikely(intr_status & XGMAC_FBE)) {
> x->fatal_bus_error_irq++;
> - ret |= tx_hard_error;
> + ret |= dma_fatal_error;
AFAIU xgmac doesn't enable FBE, so this never fires?
> [...]
Regards,
Nicolai
prev parent reply other threads:[~2026-11-22 17:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 14:16 [PATCH] net: stmmac: reset the DMA on a fatal bus error Jakob Unterwurzacher
2026-11-22 17:53 ` Nicolai Buchwitz [this message]
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=b3f78ebb57866c32046ccc60c92928cb@tipi-net.de \
--to=nb@tipi-net.de \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jakob.unterwurzacher@cherry.de \
--cc=jakobunt@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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