From: netdev-bot+sashiko@kernel.org
To: hujy652@gmail.com
Cc: nbd@nbd.name, lorenzo@kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com,
sujuan.chen@mediatek.com, rex.lu@mediatek.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net v5 2/5] net: ethernet: mtk_wed: fix reset condition for rx wdma
Date: Tue, 20 Oct 2026 10:10:41 +0000 [thread overview]
Message-ID: <179249104136.3135.17477394405108454102@kernel.org> (raw)
In-Reply-To: <20261016-wedfix-v5-2-8b02e78fd34f@gmail.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message for "net: ethernet: mtk_wed: fix reset
condition for rx wdma" only says the condition in mtk_wdma_rx_reset()…
--
net: ethernet: mtk_wed: fix reset condition for rx wdma
This commit inverts the check in the rx_wdma loop of mtk_wdma_rx_reset().
Allocated WDMA RX rings now have their CPU index cleared. Unallocated
rings are skipped.
> In mtk_wdma_rx_reset, only the wdma rings that weren't allocated are
> reset which is wrong.
>
> Fix this by inverting the reset condition so allocated rings will be
> reset.
[Severity: Low]
This isn't a bug, and the code change looks right. Could the commit
message say what goes wrong for users, and which paths are affected?
mtk_wed_start() sets up every rx_wdma ring that doesn't have a
descriptor yet:
drivers/net/ethernet/mediatek/mtk_wed.c:mtk_wed_start() {
...
for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++)
if (!dev->rx_wdma[i].desc)
mtk_wed_wdma_rx_ring_setup(dev, i, 16, false);
...
}
So once the device has started, all rx_wdma rings normally have a
descriptor. The exception is when buffer or ring allocation fails.
With the old condition, the loop in mtk_wdma_rx_reset() would then skip
every ring. MTK_WDMA_RING_RX(i) + MTK_WED_RING_OFS_CPU_IDX would never be
cleared for any live ring.
mtk_wdma_rx_reset() has two callers:
mtk_wed_reset_dma()
/* 2. reset WDMA rx DMA */
busy = !!mtk_wdma_rx_reset(dev);
__mtk_wed_detach()
mtk_wdma_rx_reset(dev);
Could the message add a sentence on the symptom? For example: stale WDMA
RX CPU indices after a WED/SER reset, or after detach and re-attach.
That would help reviewers and stable maintainers judge how urgent this
Fixes: patch is.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261016-wedfix-v5-0-8b02e78fd34f%40gmail.com
next prev parent reply other threads:[~2026-10-20 10:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 9:12 [PATCH net v5 0/5] net: ethernet: mtk_wed: misc fixes Zhi-Jun You
2026-10-16 9:12 ` [PATCH net v5 1/5] net: ethernet: mtk_wed: skip ring reset in wdma_tx_ring_setup for WED v3 Zhi-Jun You
2026-10-20 10:10 ` netdev-bot+sashiko
2026-10-16 9:12 ` [PATCH net v5 2/5] net: ethernet: mtk_wed: fix reset condition for rx wdma Zhi-Jun You
2026-10-20 10:10 ` netdev-bot+sashiko [this message]
2026-10-16 9:12 ` [PATCH net v5 3/5] net: ethernet: mtk_wed: free up rings during detach Zhi-Jun You
2026-10-20 10:10 ` netdev-bot+sashiko
2026-10-16 9:12 ` [PATCH net v5 4/5] net: ethernet: mtk_wed: setup WDMA_RING_TX(0) for non-DBDC MT7986 Zhi-Jun You
2026-10-20 10:10 ` netdev-bot+sashiko
2026-10-16 9:12 ` [PATCH net v5 5/5] net: ethernet: mtk_wed: bail out when failed to set up rings in wed_start Zhi-Jun You
2026-10-20 10:10 ` netdev-bot+sashiko
2026-10-16 9:19 ` [PATCH net v5 0/5] net: ethernet: mtk_wed: misc fixes netdev-bot+sinfo
2026-10-20 2:42 ` Zhi-Jun You
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=179249104136.3135.17477394405108454102@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hujy652@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rex.lu@mediatek.com \
--cc=sujuan.chen@mediatek.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
all inboxes | Powered by JetHome®