From: sashiko-bot@kernel.org
To: "Louis-Alexis Eyraud" <louisalexis.eyraud@collabora.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next 5/6] net: stmmac: mediatek: add support for TX deallocation adjustment feature
Date: Wed, 08 Jul 2026 08:21:54 +0000 [thread overview]
Message-ID: <20260708082154.F14FE1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260707-dwmac-mediatek-mt8189-v1-5-17f345eaaca3@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The fine stage delay field MT8189_CTRL0_DLY_GTXC_STAGE_FINE is defined as a multi-bit mask but is incorrectly used as a value, unconditionally setting all 6 bits to 1. Additionally, reciprocal delay functions are not updated to account for fine stages.
--
--- Patch [5]: [PATCH net-next 5/6] net: stmmac: mediatek: add support for TX deallocation adjustment feature ---
commit 848888a93a986153c930951bd429a61b8a876923
Author: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
net: stmmac: mediatek: add support for TX deallocation adjustment feature
The MT8189 SoC has in the Ethernet control 0 register from the
peripheral configuration (pericfg) additional bits to adjust the TX
deallocation.
In preparation of MT8189 SoC support, add its definition, use in the
set_delay_v2 callback, and a support flag in the platform data.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> index bcc0baef3f718..6b0a42b5839f2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> @@ -37,7 +37,8 @@
> #define ETH_FINE_DLY_RXC BIT(0)
>
> /* Peri Configuration register for mt8189 */
> -#define MT8189_CTRL0_TXC_OUT_OP BIT(20)
> +#define MT8189_CTRL0_TXC_OUT_OP BIT(20)
> +#define MT8189_CTRL0_DLY_GTXC_STAGE_FINE GENMASK(11, 6)
[ ... ]
> @@ -402,6 +407,9 @@ static int set_delay_v2(struct mediatek_dwmac_plat_data *plat)
> gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_STAGES, mac_delay->tx_delay);
> gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_INV, mac_delay->tx_inv);
>
> + if (plat->variant->use_stage_fine)
> + gtxc_delay_val |= MT8189_CTRL0_DLY_GTXC_STAGE_FINE;
[Severity: Medium]
Does this unintentionally set all 6 bits of the fine stage delay to 1?
MT8189_CTRL0_DLY_GTXC_STAGE_FINE is defined as GENMASK(11, 6), making it a
multi-bit mask. Other delay configurations in this function use FIELD_PREP()
with a specific value, like FIELD_PREP(MT8195_DLY_GTXC_STAGES,
mac_delay->tx_delay).
If this is intended to hold a programmable fine delay value, should it be
using FIELD_PREP() instead of ORing the mask directly into gtxc_delay_val?
Additionally, does delay_stage2ps_v2() need to be updated to account for
these fine stages when reconstructing the picosecond delay?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260707-dwmac-mediatek-mt8189-v1-0-17f345eaaca3@collabora.com?part=5
next prev parent reply other threads:[~2026-07-08 8:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 8:21 [PATCH net-next 0/6] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
2026-07-07 8:21 ` [PATCH net-next 1/6] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC Louis-Alexis Eyraud
2026-07-07 12:42 ` Andrew Lunn
2026-07-08 11:36 ` Louis-Alexis Eyraud
2026-07-08 14:35 ` Andrew Lunn
2026-07-10 13:01 ` Louis-Alexis Eyraud
2026-07-10 13:35 ` Andrew Lunn
2026-07-07 8:21 ` [PATCH net-next 2/6] net: stmmac: mediatek: add PERI_ETH_CTRLx register offset in platform data Louis-Alexis Eyraud
2026-07-07 8:55 ` Maxime Chevallier
2026-07-07 12:45 ` Andrew Lunn
2026-07-08 11:44 ` Louis-Alexis Eyraud
2026-07-07 8:21 ` [PATCH net-next 3/6] net: stmmac: mediatek: rename MT2712 and MT8195 variant methods Louis-Alexis Eyraud
2026-07-07 9:05 ` Maxime Chevallier
2026-07-08 12:04 ` Louis-Alexis Eyraud
2026-07-08 8:21 ` sashiko-bot
2026-07-07 8:21 ` [PATCH net-next 4/6] net: stmmac: mediatek: add support for TX clock output enable feature Louis-Alexis Eyraud
2026-07-07 8:21 ` [PATCH net-next 5/6] net: stmmac: mediatek: add support for TX deallocation adjustment feature Louis-Alexis Eyraud
2026-07-07 9:11 ` Maxime Chevallier
2026-07-08 12:28 ` Louis-Alexis Eyraud
2026-07-08 8:21 ` sashiko-bot [this message]
2026-07-07 8:21 ` [PATCH net-next 6/6] net: stmmac: mediatek: add support for MT8189 SoC Louis-Alexis Eyraud
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=20260708082154.F14FE1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=louisalexis.eyraud@collabora.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.