From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: tresonic <tresonic@mail.de>, Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, regressions@lists.linux.dev,
rmk+kernel@armlinux.org.uk, kuba@kernel.org
Subject: Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
Date: Sat, 18 Jul 2026 15:11:50 +0200 [thread overview]
Message-ID: <46e90a47-4507-40fe-b74e-efef932e9b62@bootlin.com> (raw)
In-Reply-To: <97d803a5-ca6e-4d4a-adc2-f97cabfded65@mail.de>
Hi,
On 7/18/26 09:35, tresonic wrote:
> Thank you for you explanations!
>
>> The interrupt is being enabled in the init_chan call in
>> stmmac_dma_ops. Ideally, it should be disabled in a mirror function,
>> which currently does not exist. So maybe deinit_chan() needs
>> adding. But where to call it from? init_chan() is called from
>> stmmac_init_dma_engine(), from stmmac_hw_setup(). stmmac_resume() does
>> call this. So we need something in stmmac_suspend(). Maybe in
>> stmmac_stop_all_dma()?
>>
>> stmmac is messy, there are often not mirror functions. If there is a
>> stmmac_init_dma_engine() there should be
>> stmmac_deinit_dma_engine(). If there is stmmac_hw_setup() there should
>> be stmmac_hw_tairdown(). But none of these seem to exist.
>>
(sorry I missed that thread, I was on my way back from netdev)
>> Anyway, do you want to try to implement deinit_chan() and call it from
>> stmmac_stop_all_dma()?
> Yes I'd really like to implement a solution here.
> This is my try, but I still have some questions:
> - is it ok to disable all interrupts on deinit_chan()?
It mirrors the init, so it should be fine. Now I'm not sure how that
will interfere with things like WoL though, I've yet to test this.
> - maybe the interrupt could also just be disabled in stop_rx?
I don't think so, if something is missing w.r.t the interrupts being
enabled when they shouldn't, that would need to be addressed in the
xdp part, as this seems to be the only place where stop_rx is called
without the dma_chan interrupts being masked.
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> index 829a23bdad01..65c243fb829f 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
[...]
I've given this patch a test on imx8mp (that has a dwmac4.10), no regressions found
from running basic tests :) I think this is a good fix, if you submit it can you
address both dwmac410 and dwmac4 ? They both should be impacted by that problem.
Maxime
next prev parent reply other threads:[~2026-07-18 13:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 20:10 [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts") tresonic
2026-07-16 21:47 ` Andrew Lunn
2026-07-17 7:18 ` tresonic
2026-07-17 15:40 ` Andrew Lunn
2026-07-17 22:23 ` tresonic
2026-07-17 22:34 ` tresonic
2026-07-18 0:16 ` Andrew Lunn
2026-07-18 7:35 ` tresonic
2026-07-18 13:11 ` Maxime Chevallier [this message]
2026-07-18 13:32 ` tresonic
2026-07-18 14:11 ` Andrew Lunn
2026-07-18 15:32 ` tresonic
2026-07-18 14:06 ` Andrew Lunn
2026-07-18 15:27 ` [PATCH] net: stmmac: dwmac4: mask interrupts before stopping DMA in suspend Luis Lang
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=46e90a47-4507-40fe-b74e-efef932e9b62@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=rmk+kernel@armlinux.org.uk \
--cc=tresonic@mail.de \
/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