From: sashiko-bot@kernel.org
To: "Mohd Ayaan Anwar" <mohd.anwar@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC net-next 9/9] net: stmmac: qcom-ethqos: add Qualcomm Nord support
Date: Thu, 24 Sep 2026 01:09:45 +0000 [thread overview]
Message-ID: <20260924010946.0434C1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260923-qcom_xpcs_nord_emac-v1-9-4b1c682af70f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] net: stmmac: qcom-ethqos: USXGMII clock remains disabled due to copy-paste error
- [High] net: stmmac: qcom-ethqos: SGMII loopback permanently enabled for non-SerDes PHY modes on Nord
- [High] net: stmmac: qcom-ethqos: missing USXGMII SerDes PHY mode configuration
- [Low] net: stmmac: qcom-ethqos: build failure due to undeclared DWMAC_CORE_25GMAC
--
commit f5df70773c629bcedc94b2086fbc5776c1a49506
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
net: stmmac: qcom-ethqos: add Qualcomm Nord support
This commit adds support for the Qualcomm Nord ETHQOS controllers based on
the Synopsys DesignWare 25GMAC IP. It configures the Nord platform data,
DW25GMAC core register layout, USXGMII wrapper programming, and an EEE clock
vote.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index a99a78880c0fb..a03c8e203920a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
[ ... ]
> @@ -201,6 +229,15 @@ qcom_ethqos_set_sgmii_loopback(struct qcom_ethqos *ethqos, bool enable)
> EMAC_WRAPPER_SGMII_PHY_CNTRL1);
> }
>
> +static void
> +qcom_ethqos_set_sgmii_loopback_nord(struct qcom_ethqos *ethqos, bool enable)
> +{
> + rgmii_updatel(ethqos,
> + SGMII_PHY_CNTRL1_SGMII_TX_TO_RX_LOOPBACK_EN,
> + enable ? SGMII_PHY_CNTRL1_SGMII_TX_TO_RX_LOOPBACK_EN : 0,
> + EMAC_WRAPPER_SGMII_PHY_CNTRL1_V4);
> +}
[Severity: High]
Does this leave the SGMII loopback permanently enabled for non-SerDes PHY
modes on Nord?
Looking at ethqos_clks_config(), .set_sgmii_loopback(..., true) is called
unconditionally. However, for non-SerDes modes, .mac_finish is NULL, so
.set_sgmii_loopback(..., false) is never invoked.
The generic qcom_ethqos_set_sgmii_loopback() has a safety check for
ethqos->needs_sgmii_loopback and ethqos->phy_mode to prevent this, but the
new Nord-specific function lacks it.
[ ... ]
> @@ -485,6 +527,47 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
> return 0;
> }
>
> +static void ethqos_configure_usxgmii(struct qcom_ethqos *ethqos)
> +{
[ ... ]
> + rgmii_updatel(ethqos, USXGMII_CLK_BLK_GMII_CLK_BLK_SEL, 0,
> + EMAC_WRAPPER_USXGMII_MUX_SEL);
> + rgmii_updatel(ethqos, USXGMII_CLK_BLK_CLK_EN, 0,
> + EMAC_WRAPPER_USXGMII_MUX_SEL);
> +
> + rgmii_updatel(ethqos, USXGMII_CLK_BLK_GMII_CLK_BLK_SEL,
> + USXGMII_CLK_BLK_GMII_CLK_BLK_SEL,
> + EMAC_WRAPPER_USXGMII_MUX_SEL);
> +}
[Severity: High]
Will this leave the USXGMII clock permanently disabled?
The code clears USXGMII_CLK_BLK_CLK_EN to disable the clock, but then
incorrectly writes to USXGMII_CLK_BLK_GMII_CLK_BLK_SEL again instead of
setting USXGMII_CLK_BLK_CLK_EN to re-enable it.
This appears to be a copy-paste error that will prevent the network interface
from functioning in USXGMII mode.
[ ... ]
> @@ -625,7 +708,8 @@ static int ethqos_mac_finish_serdes(struct net_device *ndev, void *priv,
> struct qcom_ethqos *ethqos = priv;
> int ret = 0;
>
> - qcom_ethqos_set_sgmii_loopback(ethqos, false);
> + if (ethqos->set_sgmii_loopback)
> + ethqos->set_sgmii_loopback(ethqos, false);
>
> if (interface == PHY_INTERFACE_MODE_SGMII ||
> interface == PHY_INTERFACE_MODE_2500BASEX)
> ret = phy_set_mode_ext(ethqos->serdes_phy, PHY_MODE_ETHERNET,
> interface);
>
> return ret;
> }
[Severity: High]
Is the PHY_INTERFACE_MODE_USXGMII check missing here?
Since this function is now configured as the .mac_finish callback for the
newly added PHY_INTERFACE_MODE_USXGMII, omitting it from this condition
causes the SerDes PHY configuration to be silently bypassed, which will
prevent link establishment.
[ ... ]
> @@ -817,8 +924,33 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
> }
>
> +static const struct ethqos_emac_por emac_nord_por[] = {
> + { .offset = RGMII_IO_MACRO_CONFIG, .value = 0x00C04D03 },
> + { .offset = SDCC_HC_REG_DLL_CONFIG, .value = 0x2004642C },
> + { .offset = RGMII_IO_MACRO_CONFIG2, .value = 0x00222060 },
> + { .offset = RGMII_IO_MACRO_SCRATCH_2, .value = 0x4c },
> +};
> +
> +static const struct ethqos_emac_driver_data emac_nord_data = {
> + .rgmii_por = emac_nord_por,
> + .num_rgmii_por = ARRAY_SIZE(emac_nord_por),
> + .dma_addr_width = 40,
> + .link_clk_name = "phyaux",
> + .core_type = DWMAC_CORE_25GMAC,
[Severity: Low]
Does this cause a build failure?
The patch assigns DWMAC_CORE_25GMAC to .core_type, but this enum value is
not defined in enum dwmac_core_type in include/linux/stmmac.h.
> + .set_sgmii_loopback = qcom_ethqos_set_sgmii_loopback_nord,
> + .dwxgmac_addrs = {
> + .dma_even_chan_base = 0x00008500,
> + .dma_odd_chan_base = 0x00008580,
> + .dma_chan_offset = 0x00001000,
> + .mtl_chan_base = 0x00008000,
> + .mtl_chan_offset = 0x00001000,
> + .timestamp_base = 0x00007000,
> + },
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923-qcom_xpcs_nord_emac-v1-0-4b1c682af70f@oss.qualcomm.com?part=9
next prev parent reply other threads:[~2026-09-24 1:09 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 1:07 [PATCH RFC net-next 0/9] net: introduce Qualcomm XPCS support and add Nord Ethernet plumbing Mohd Ayaan Anwar
2026-09-23 1:07 ` [PATCH RFC net-next 1/9] dt-bindings: net: pcs: add Qualcomm Nord XPCS Mohd Ayaan Anwar
2026-09-23 1:07 ` [PATCH RFC net-next 2/9] net: pcs: xpcs: add USXGMII Clause 37 autoneg support Mohd Ayaan Anwar
2026-09-23 13:31 ` Mohd Ayaan Anwar
2026-09-24 1:09 ` sashiko-bot
2026-09-23 1:07 ` [PATCH RFC net-next 3/9] net: pcs: xpcs: add custom platform register accessors Mohd Ayaan Anwar
2026-09-23 12:18 ` Andrew Lunn
2026-09-23 12:37 ` Mohd Ayaan Anwar
2026-09-25 10:18 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 4/9] net: pcs: xpcs: add Qualcomm Nord platform support Mohd Ayaan Anwar
2026-09-23 12:07 ` Andrew Lunn
2026-09-23 12:57 ` Mohd Ayaan Anwar
2026-09-24 1:09 ` sashiko-bot
2026-09-25 10:37 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 5/9] net: pcs: xpcs: initialize runtime PM as suspended Mohd Ayaan Anwar
2026-09-25 11:03 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 6/9] dt-bindings: net: qcom,ethqos: add Qualcomm Nord Mohd Ayaan Anwar
2026-09-24 1:09 ` sashiko-bot
2026-09-23 1:07 ` [PATCH RFC net-next 7/9] net: stmmac: support custom XGMAC register layouts Mohd Ayaan Anwar
2026-09-24 1:09 ` sashiko-bot
2026-09-25 12:22 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 8/9] net: stmmac: qcom-ethqos: support external PCS Mohd Ayaan Anwar
2026-09-24 1:09 ` sashiko-bot
2026-09-28 15:15 ` Maxime Chevallier
2026-09-23 1:07 ` [PATCH RFC net-next 9/9] net: stmmac: qcom-ethqos: add Qualcomm Nord support Mohd Ayaan Anwar
2026-09-24 1:09 ` sashiko-bot [this message]
2026-09-25 13:02 ` Lorenzo Bianconi
2026-09-23 8:50 ` [PATCH RFC net-next 0/9] net: introduce Qualcomm XPCS support and add Nord Ethernet plumbing Zhangfei Gao
2026-09-23 15:15 ` Andrew Lunn
2026-09-28 10:21 ` Krzysztof Kozlowski
2026-09-23 9:41 ` Maxime Chevallier
2026-09-23 10:43 ` Mohd Ayaan Anwar
2026-09-23 13:17 ` Coia Prant
2026-09-23 14:03 ` Mohd Ayaan Anwar
2026-09-24 5:54 ` Coia Prant
2026-09-23 18:35 ` Andrew Lunn
2026-09-24 5:25 ` Coia Prant
2026-09-23 18:40 ` Andrew Lunn
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=20260924010946.0434C1F00898@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