From: sashiko-bot@kernel.org
To: "Mohd Ayaan Anwar" <mohd.anwar@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v3 4/9] net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass
Date: Sun, 18 Oct 2026 09:47:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-176025@kernel.org> (raw)
In-Reply-To: <20261017-shikra_ethernet-v3-4-26a8beb44b8f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] net: stmmac: qcom-ethqos: rgmii_setmask() on multi-bit RGMII_CONFIG2_RSVD_CONFIG15
--
commit 405cfced2fa67ffbf18f898b4b34f3a6a9035507
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass
This commit fixes PHY_INTERFACE_MODE_RGMII_ID handling in dwmac-qcom-ethqos by
powering down the DLL, enabling DDR bypass mode, adjusting the link clock rate
for 100M/10M speeds, and programming IO_MACRO via a new
ethqos_rgmii_id_macro_init() helper.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 44270c25d874f..53fb9de4d92c7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -67,6 +67,9 @@
> /* SDC4_STATUS bits */
> #define SDC4_STATUS_DLL_LOCK BIT(7)
>
> +/* SDCC_USR_CTL bits */
> +#define SDCC_USR_CTL_DDR_BYPASS BIT(30)
> +
> /* RGMII_IO_MACRO_CONFIG2 fields */
> #define RGMII_CONFIG2_RSVD_CONFIG15 GENMASK(31, 17)
> #define RGMII_CONFIG2_RGMII_CLK_SEL_CFG BIT(16)
[ ... ]
> @@ -475,6 +485,42 @@ static void ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
> RGMII_IO_MACRO_CONFIG);
> }
>
> +static void ethqos_rgmii_id_macro_init(struct qcom_ethqos *ethqos, int speed)
> +{
[ ... ]
> + if (speed == SPEED_1000)
> + rgmii_clrmask(ethqos, RGMII_CONFIG2_RSVD_CONFIG15, RGMII_IO_MACRO_CONFIG2);
> + else
> + rgmii_setmask(ethqos, RGMII_CONFIG2_RSVD_CONFIG15, RGMII_IO_MACRO_CONFIG2);
[Severity: Medium]
Should this else branch be setting all 15 bits of RGMII_CONFIG2_RSVD_CONFIG15
in RGMII_IO_MACRO_CONFIG2 when configuring 100M or 10M speeds in
PHY_INTERFACE_MODE_RGMII_ID mode?
RGMII_CONFIG2_RSVD_CONFIG15 is defined as GENMASK(31, 17), where the 15 suffix
denotes the 15-bit width of the field (similar to RGMII_CONFIG_MAX_SPD_PRG_9
and RGMII_CONFIG_MAX_SPD_PRG_2).
Because rgmii_setmask() calls rgmii_updatel(ethqos, mask, mask, offset), it
writes 0x7fff into bits 31:17. Should this instead program a specific value into
that field using rgmii_updatel() and FIELD_PREP(RGMII_CONFIG2_RSVD_CONFIG15, ...)?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261017-shikra_ethernet-v3-0-26a8beb44b8f@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-10-18 9:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 9:45 [PATCH net-next v3 0/9] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-10-17 9:45 ` [PATCH net-next v3 1/9] net: phy: dp83867: add regulator supply management Mohd Ayaan Anwar
2026-10-17 13:52 ` Andrew Lunn
2026-10-18 10:47 ` netdev-bot+sashiko
2026-10-17 9:45 ` [PATCH net-next v3 2/9] dt-bindings: net: qcom,ethqos: add qcom,shikra-ethqos compatible Mohd Ayaan Anwar
2026-10-18 10:47 ` netdev-bot+sashiko
2026-10-17 9:45 ` [PATCH net-next v3 3/9] net: stmmac: qcom-ethqos: convert ethqos_rgmii_macro_init() to void Mohd Ayaan Anwar
2026-10-17 9:45 ` [PATCH net-next v3 4/9] net: stmmac: qcom-ethqos: fix RGMII_ID mode to use DLL bypass Mohd Ayaan Anwar
2026-10-17 14:00 ` Andrew Lunn
2026-10-17 16:04 ` Mohd Ayaan Anwar
2026-10-18 9:47 ` sashiko-bot [this message]
2026-10-18 10:47 ` netdev-bot+sashiko
2026-10-18 20:04 ` Mohd Ayaan Anwar
2026-10-17 9:45 ` [PATCH net-next v3 5/9] net: stmmac: qcom-ethqos: warn about legacy RGMII PHY modes Mohd Ayaan Anwar
2026-10-18 10:47 ` netdev-bot+sashiko
2026-10-17 9:45 ` [PATCH net-next v3 6/9] net: stmmac: qcom-ethqos: set initial RGMII link clock to lowest speed Mohd Ayaan Anwar
2026-10-18 9:47 ` sashiko-bot
2026-10-18 10:47 ` netdev-bot+sashiko
2026-10-17 9:45 ` [PATCH net-next v3 7/9] net: stmmac: qcom-ethqos: share common GMAC4 address table Mohd Ayaan Anwar
2026-10-17 9:45 ` [PATCH net-next v3 8/9] net: stmmac: qcom-ethqos: add per-platform NOC clock voting Mohd Ayaan Anwar
2026-10-17 9:45 ` [PATCH net-next v3 9/9] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-10-18 9:47 ` sashiko-bot
2026-10-18 10:47 ` netdev-bot+sashiko
2026-10-17 9:53 ` [PATCH net-next v3 0/9] " Mohd Ayaan Anwar
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=sashiko-outbox-176025@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 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.