From: sashiko-bot@kernel.org
To: "Mohd Ayaan Anwar" <mohd.anwar@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v2 5/9] net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass
Date: Tue, 08 Sep 2026 20:25:10 +0000 [thread overview]
Message-ID: <20260908202511.6AB8C1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908-shikra_ethernet-v2-5-bbe3389d0652@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The driver mishandles PHY_INTERFACE_MODE_RGMII_RXID, incorrectly adding a MAC-side RX delay via the DLL, causing double RX delay when combined with the PHY's RX delay.
--
commit 62a16405ee0e741087a5282875b7de0ba607d81f
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass
This commit fixes RGMII_ID mode by powering down the MAC's DLL and setting
DDR bypass mode, ensuring the MAC does not add delay when the PHY already
provides it. It introduces a new ethqos_rgmii_id_macro_init() helper and
adjusts clock rate logic accordingly.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
[ ... ]
> @@ -405,8 +416,7 @@ static void ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
> RGMII_IO_MACRO_CONFIG2);
>
> /* Determine if the PHY adds a 2 ns TX delay or the MAC handles it */
> - if (ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_ID ||
> - ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID)
> + if (ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID)
> phase_shift = 0;
> else
> phase_shift = RGMII_CONFIG2_TX_CLK_PHASE_SHIFT_EN;
[Severity: High]
This is a pre-existing issue, but does this function mishandle
PHY_INTERFACE_MODE_RGMII_RXID?
By keeping RGMII_RXID in this generic initialization path, it appears
the MAC-side RX delay via the DLL will still be enabled later in the
function when negotiating 1Gbps speeds:
rgmii_setmask(ethqos, SDCC_DDR_CONFIG_PRG_DLY_EN,
SDCC_HC_REG_DDR_CONFIG);
Since the PHY already provides an RX delay in RGMII_RXID mode, does this
result in a double RX delay?
A double RX delay could shift the receive clock too far relative to the
data eye at Gigabit speeds, potentially causing data corruption or packet
loss.
While this patch successfully fixes RGMII_ID by moving it to bypass mode,
could RGMII_RXID be broken on platforms that specify it in their device tree,
and would it need similar bypass handling?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-shikra_ethernet-v2-0-bbe3389d0652@oss.qualcomm.com?part=5
next prev parent reply other threads:[~2026-09-08 20:25 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 20:23 [PATCH net-next v2 0/9] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-09-07 20:23 ` [PATCH net-next v2 1/9] dt-bindings: net: ti,dp83867: add supply properties Mohd Ayaan Anwar
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 2/9] net: phy: dp83867: add regulator supply management Mohd Ayaan Anwar
2026-09-08 15:01 ` Andrew Davis
2026-09-08 20:25 ` sashiko-bot
2026-09-09 17:08 ` Lorenzo Bianconi
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 3/9] dt-bindings: net: qcom,ethqos: add qcom,shikra-ethqos compatible Mohd Ayaan Anwar
2026-09-08 20:25 ` sashiko-bot
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 4/9] net: stmmac: qcom-ethqos: convert ethqos_rgmii_macro_init() to void Mohd Ayaan Anwar
2026-09-09 17:16 ` Lorenzo Bianconi
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 5/9] net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass Mohd Ayaan Anwar
2026-09-08 20:25 ` sashiko-bot [this message]
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 6/9] net: stmmac: qcom-ethqos: warn about legacy RGMII PHY modes Mohd Ayaan Anwar
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 7/9] net: stmmac: qcom-ethqos: set initial RGMII link clock to lowest speed Mohd Ayaan Anwar
2026-09-08 20:25 ` sashiko-bot
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 8/9] net: stmmac: qcom-ethqos: add per-platform NOC clock voting Mohd Ayaan Anwar
2026-09-09 18:47 ` Lorenzo Bianconi
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-07 20:23 ` [PATCH net-next v2 9/9] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-09-09 18:55 ` Lorenzo Bianconi
2026-09-11 11:25 ` netdev-bot+sashiko
2026-09-11 14:26 ` Konrad Dybcio
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=20260908202511.6AB8C1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=mohd.anwar@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox