Article View: linux.kernel.netdev
Article #19798Re: [PATCH net-next v4 09/10] net: stmmac: qcom-ethqos: add Shikra EMAC support
From: netdev-bot+sashiko
Date: Fri, 20 Nov 2026 11:46
Date: Fri, 20 Nov 2026 11:46
187 lines
15591 bytes
15591 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 (1) · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] On Shikra, the DLL-bypass path is only used for phy-mode
"rgmii-id", but nothing stops a DT from using another RGMII mode, and…
- [Medium] Putting "stmmaceth" in shikra_noc_clk_names (dwmac-qcom-
ethqos.c:335-340) puts the stmmac-core-owned clock under OPP rate and…
Pre-existing issues:
- [Medium] This problem wasn't introduced by this patch, but by the
earlier commit in this series "net: stmmac: qcom-ethqos: add DLL-…
--
net: stmmac: qcom-ethqos: add Shikra EMAC support
This adds the qcom,shikra-ethqos compatible and a new shikra_data
descriptor. The descriptor enables three NOC clocks whose rates are set
through an OPP table, sets a 36-bit DMA address width, and sets
phy_managed_delays so rgmii-id uses the DLL-bypass sequence.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 15385750b3e6e..a7fdba73da2ba 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -332,6 +332,24 @@ static const struct ethqos_emac_driver_data emac_v4_0_0_scmi_data = {
> .setup = ethqos_scmi_setup,
> };
>
> +static const char * const shikra_noc_clk_names[] = {
> + "stmmaceth",
[Severity: Medium]
Putting "stmmaceth" in this list places a clock that the stmmac core owns
under OPP rate and VDD_CX control. Is the enable ordering on resume safe?
ethqos_clks_config(false) drops the vote with dev_pm_opp_set_rate(dev, 0).
In drivers/opp/core.c, _set_opp() with a NULL opp goes to
_disable_opp_table(). That removes the bandwidth, level and required-opps
votes, but it never lowers the clock rates. So stmmaceth stays at its OPP
maximum rate after the CX vote is gone.
On resume, stmmac_bus_clks_config() enables that same clock before the
glue callback puts the vote back:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:stmmac_bus_clks_config() {
...
ret = clk_prepare_enable(plat_dat->stmmac_clk);
...
ret = clk_prepare_enable(plat_dat->pclk);
...
if (plat_dat->clks_config) {
ret = plat_dat->clks_config(plat_dat->bsp_priv, enabled);
...
}
ethqos_clks_config()->qcom_ethqos_set_opp() only runs after that. At
probe, stmmac_probe_config_dt() also enables stmmaceth before
ethqos_hlos_setup() votes.
The commit message says this is safe because "VDD_CX only needs to be
voted while DMA traffic is ongoing". However, the OPP required-opps
describe the CX corner a given clock frequency needs, whether or not
traffic is running.
Could stmmaceth be ungated at its OPP fmax while CX is at a lower corner?
For axi-noc and pcie-tile-axi-noc, the glue driver applies the vote
before enabling the clocks. Would it be better to do one of these
instead?
- keep stmmaceth out of the OPP-managed set
- lower its rate before dropping the vote
- make sure the vote is in place before the core enables stmmac_clk
> + "axi-noc",
> + "pcie-tile-axi-noc",
> + NULL,
> +};
> +
> +static const struct ethqos_emac_driver_data shikra_data = {
> + .dma_addr_width = 36,
> + .has_emac_ge_3 = true,
> + .noc_clk_names = shikra_noc_clk_names,
> + .num_noc_clks = ARRAY_SIZE(shikra_noc_clk_names) - 1,
> + .rgmii_config_loopback_en = false,
> + .phy_managed_delays = true,
[Severity: Medium]
This descriptor has phy_managed_delays but no rgmii_por table. What
happens if a Shikra DT uses phy-mode "rgmii", "rgmii-rxid" or
"rgmii-txid"?
ethqos_fix_mac_speed_rgmii() only takes the bypass for RGMII_ID:
if (ethqos->data->phy_managed_delays &&
ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_ID) {
ethqos_configure_rgmii_id(ethqos, speed);
return;
}
Nothing limits Shikra to that mode:
- qcom_ethqos_probe() accepts all four RGMII variants for every
compatible.
- ethqos_hlos_setup() installs ethqos_fix_mac_speed_rgmii() for all
four.
- The qcom,shikra-ethqos block in qcom,ethqos.yaml does not constrain
phy-mode.
In those modes the generic DLL/IO-macro sequence runs. Its reset loop
does nothing, because num_rgmii_por is 0:
/* Reset to POR values and enable clk */
for (i = 0; i < ethqos->data->num_rgmii_por; i++)
rgmii_writel(ethqos, ethqos->data->rgmii_por[i].value,
ethqos->data->rgmii_por[i].offset);
Every other HLOS RGMII descriptor has a 6-entry POR table. The
read-modify-write steps that follow depend on that reset:
- ethqos_rgmii_macro_init() sets SDCC_DDR_CONFIG_EXT_PRG_RCLK_DLY and
SDCC_DDR_CONFIG_EXT_PRG_RCLK_DLY_EN at 10/100M, and
SDCC_DDR_CONFIG_PRG_DLY_EN at 1G. Neither path clears the other's
bits.
- ethqos_dll_configure() sets DLL_EN/CDR_EN/CDR_EXT_EN at 1G, and the
10/100 path does not clear them.
After a speed renegotiation, can both RX delay mechanisms end up enabled,
so the result depends on link-speed history?
The 1G prg_rclk_dly value of 115 also assumes a TCXO_CYCLES_CNT that
comes from the v3/v4 POR value 0x80040800. Shikra never writes that
value.
The commit message says "No POR table is needed for this intended bypass
operation", but neither the binding nor the driver enforces rgmii-id.
Would one of these be appropriate?
- constrain phy-mode to rgmii-id for qcom,shikra-ethqos in the binding
- reject the non-ID RGMII modes in the driver for descriptors without
a POR table
- add a Shikra POR table
The later patch in this series, "net: stmmac: qcom-ethqos: add QCS615
EMAC support", uses the same pattern for qcs615_data.
[Severity: Medium]
This is a pre-existing issue and was not introduced by this patch. It
comes from the earlier commit in this series, "net: stmmac: qcom-ethqos:
add DLL-bypass for PHY-managed RGMII delays".
ethqos_set_clk_tx_rate() picks the link clock rate from phy_mode alone:
if (ethqos->phy_mode != PHY_INTERFACE_MODE_RGMII_ID ||
speed == SPEED_1000)
rate *= 2;
ethqos_fix_mac_speed_rgmii() also requires data->phy_managed_delays
before it takes the bypass. Take a descriptor without phy_managed_delays
(emac_v2_1_0, v2_3_0, v3_0_0, v4_0_0) and phy-mode "rgmii-id". At
100M/10M, doesn't the MAC-delay sequence then run with a 25/2.5 MHz link
clock instead of the 50/5 MHz it expects?
That would not match "No change intended on existing platforms" in the
earlier commit. No in-tree qcom DT uses rgmii-id with these compatibles
today. Shikra sets phy_managed_delays, so this patch is consistent with
the clock-rate logic. Checking ethqos->data->phy_managed_delays in
ethqos_set_clk_tx_rate() would probably belong in the earlier commit.
> + .dwmac4_addrs = ðqos_dwmac4_addrs,
> + .setup = ethqos_hlos_setup,
> +};
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261117-shikra_ethernet-v4-0-c41902e5f2fa%40oss.qualcomm.com
Technical Details
Message-ID:
<179517516121.3136.6880108744896327095@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367911-linux-kernel-netdev=dewy.ruReferences:
<20261117-shikra_ethernet-v4-9-c41902e5f2fa@oss.qualcomm.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367911-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 09/10] net: stmmac: qcom-ethqos: add Shikra EMAC support Date: Fri, 20 Nov 2026 11:46:01 +0000 Organization: Usenet Network Message-ID: <179517516121.3136.6880108744896327095@kernel.org> References: <20261117-shikra_ethernet-v4-9-c41902e5f2fa@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3149089"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:pXlKh+RFNG4BYD6db9i26K4R1PY= sha256:cjEXSJa8B2bFYYRtRR8Fswp/S+PEXAiUa//HIr80PcM= sha1:Y9XySldGpbTSZmmkKKrwHFcM6Ek= sha256:hB83RDGM3EyY6YVd9lEsMXyMFLDMyDrCFmokgV/vMKA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 9005F11598C; Fri, 20 Nov 2026 14:49:27 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Status: No, score=-2.3 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 67QifAW_3GgY; Fri, 20 Nov 2026 14:49:23 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-367911-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 01D91115983; Fri, 20 Nov 2026 14:49:14 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 82AF4181C2F; Fri, 20 Nov 2026 11:47:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795175164; b=qb/vynDZFN/3UJbNiZrG5z43rHvKaS4PNJucAo9X0PTGgWgyZqqcJ0Lx2rGAyZHg5UmV t+zJKz0c0aFcXGujQN54FGvAQPUQRgHDhua+8sqBMIB21iegRc9eSoCj5OEjQjePli6uY giAYbCtJ/qTAHYZQ4ukNJaISCL3Y+nByF4n3N3yWJvTbvWXwWWIEMnACwhSqW/ABsqSYs pp3N6UrEKwqzXtPr/60VUCgmuBA3FY2iHqNqxsP86dEzpyGsQBgZJqsFmFj51IPQmDg7U nM2KUvEsvbnxtNbz5lETSqvWb1GbCS7saEY2eSeIlr13Ttxe5gfcHDkJTYcQt1BcE3Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795175164; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=r3BTEoTWdxpLsSrAwe3pSyp3V8A+NO3HPrbJJYpXFMw=; b=sVFgqWWzCis3TAR0PPacDTA6bv2RuhOUUCLAyvoLQ1PxpqFzRxdh7pHad7rL7P3aN2Gs EKQoRIB0KteIEsoGg8y6OffkRCrP70dostpPt8SpQoUkSoBgQfFsEi2WFo44Vpsl19041 y9UVSC81dBO7CY/sk8YuMvps71iNENzU/+R+oYQ74rF+DXI4W3sV2uJYASwI5mgdf8j/R 62ak0BCoSB7d7OFeoqxvmLfcZkiw8z7QFIxVtT64ds8D/8rKy2mbv6HxnB6jWDbp0IQqI ZdDpx18ecNJ6l7eJK5tjH80wj0TUKYcpRLkRiFcja+bEnJzoStMOYTV45CQdITKNjuw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J3nRUyJ3; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17B1560A3809; Fri, 20 Nov 2026 11:46:04 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J3nRUyJ3 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795175163; b=3rSDunz0aS/Z1G/zeNajNJLQ0RVHEZu+Z1wsH/RgMixjdiFEGnnAwJuNFT81tLIismaT ks7NGmN6QWbBUZJqAZM3eX3UC52t7PClsNtrO7ZzOeQbHHPtYKoJXBUWrQnwFoIhvFWuC pEPg5WNw71Cmd5c4ot5tK0F6Kr6RcmJsq33EhkGXa1ACp1dCHPk/jdc4UkW+Sb4RUKE8+ /yo1UCj51ArLdZFT81CLgy4BfOjRdwVCpDytUfYk79f+Piz7PchcfEnQZktBdrOGXjb5g BWBlEFHSd8Mk5iCdpa45nhWKG7xbtYhiLAIFgHSLHbOVKUeT0DXXVPgdozShj9FrE7g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795175163; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=r3BTEoTWdxpLsSrAwe3pSyp3V8A+NO3HPrbJJYpXFMw=; b=xwVS4My0BRoZ5+31xN/NybYCU5LUwOgpGSwBUJoYlOhwWpk8LkIhOXJMmKUTo7G0bKFw FE3FJWwZSETqcZWUxK8N5a1Lp6it+ZYtIp/rJuB35exyCUgT8uI/tzbm6KirkZpoeCmyU wBcjKoHfu4o8DSkAAvlXxHrmSIr0/y6jVB62NRUc8xrX5yBz17qCjj9pkuPYX/b6Fx2Zj PYvhBADfA5raG4GaUuHJwMSrqco9p2VVOfxCqjkH3V7kxHAxmAYaq7Y0IWe4rkHeGRc1Q OoO+nPVJsP1JU3j8BgICahvNmUBvWn9O9YjSha+cmwsTyMTO37pnaMYWtaT0XRR+6Hg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J3nRUyJ3; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 370B460A2639; Fri, 20 Nov 2026 11:46:03 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A47F41F00A00; Fri, 20 Nov 2026 11:46:01 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795175163; bh=r3BTEoTWdxpLsSrAwe3pSyp3V8A+NO3HPrbJJYpXFMw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=J3nRUyJ34H/ZRu8a+NI9fDD/6j/tpohkyinDxyNdTniY/BL/y6w1AzXiqu6nUeBck 4KQzbhE3eWYfjOPen1pZ60/M94RHNijndWO+ciDdukCWDvJoUTBoWVaeo3oQEwMSRK r/s0Mm7fE9hHIMY+8dHT7SvLHoQnRfiU51+lOttrJJ3WpQp6R/WRtTl5LhDdBR/TL9 Vh3hSv1/ZnHyskTyZEsqHQtcVKuGehh4mKQXf4ZlS6z8rDOqKbf13ALaWG+1ARIgvF 5k5m0hblFfpNEHoVk4IPhhFDWqNnu5PTfZmn9GlQW1z3oikEYoBQObSkaQLNfcj9ru WXnhJPhIlbsLQ== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, afd@ti.com, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, richardcochran@gmail.com, andersson@kernel.org, konradybcio@kernel.org, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, joabreu@synopsys.com, maxime.chevallier@bootlin.com, mcoquelin.stm32@gmail.com, lorenzo.bianconi@oss.qualcomm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org X-In-Reply-To: <20261117-shikra_ethernet-v4-9-c41902e5f2fa@oss.qualcomm.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list