Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: jszhang@kernel.org
Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, sebastian.hesselbarth@gmail.com,
	maxime.chevallier@bootlin.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
Date: Tue, 01 Dec 2026 18:07:20 +0000	[thread overview]
Message-ID: <179614844025.3146.16119972185095747974@kernel.org> (raw)
In-Reply-To: <20261130165639.12839-3-jszhang@kernel.org>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] In drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c, the default
  branch of syna_dwmac_set_phy_intf_sel() calls phy_modes(phy_intf_sel).

--

net: stmmac: Add glue layer for Synaptics SL2610 SoC

This adds a dwmac glue driver for the DesignWare-based GMAC controllers
in the Synaptics SL2610 SoC. It sets the PHY interface mode and the
MDIO master select bit through a syscon regmap.

> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
> new file mode 100644
> index 0000000000000..0bc4406065847
> --- /dev/null
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c

[ ... ]

> +static int syna_dwmac_set_phy_intf_sel(void *bsp_priv, u8 phy_intf_sel)
> +{
> +	struct syna_dwmac *dwmac = bsp_priv;
> +	u32 phyif;
> +
> +	switch (phy_intf_sel) {
> +	case PHY_INTF_SEL_RMII:
> +		phyif = CTL_PHY_INTF_RMII;
> +		break;
> +	case PHY_INTF_SEL_RGMII:
> +		phyif = CTL_PHY_INTF_RGMII;
> +		break;
> +	default:
> +		dev_err(dwmac->dev, "unsupported phy interface %s\n",
> +			phy_modes(phy_intf_sel));

[Severity: Low]
Does this print the wrong interface name?

phy_intf_sel holds a DWMAC hardware code from common.h, not a
phy_interface_t. phy_modes() expects a phy_interface_t, and the two
numberings differ:

  common.h:     GMII_MII=0, RGMII=1, SGMII=2, TBI=3, RMII=4, RTBI=5,
                SMII=6, REVMII=7
  phy_interface_t: NA=0, INTERNAL=1, MII=2, GMII=3, SGMII=4, TBI=5,
                REVMII=6, RMII=7

With phy-mode = "rev-mii", stmmac_get_phy_intf_sel() returns
PHY_INTF_SEL_REVMII (7). phy_modes(7) returns "rmii", so the log says
"unsupported phy interface rmii", even though RMII is one of the two
modes this function supports.

For "mii" or "gmii" the code is 0, phy_modes(0) returns "", and no mode
is named in the message.

The caller already logs a correct message for -EINVAL:

stmmac_main.c:stmmac_prereset_configure() {
    ...
	ret = plat_dat->set_phy_intf_sel(plat_dat->bsp_priv, phy_intf_sel);
	if (ret == -EINVAL)
		netdev_err(priv->dev, "platform does not support %s\n",
			   phy_modes(interface));
    ...
}

Could this dev_err() be dropped, or changed to print the raw
phy_intf_sel value?

> +		return -EINVAL;
> +	}
> +
> +	return regmap_update_bits(dwmac->regmap, dwmac->rgmii_ctl, CTL_PHY_INTF_SEL, phyif);
> +}

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130165639.12839-1-jszhang%40kernel.org

      parent reply	other threads:[~2026-12-01 18:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 16:56 [PATCH net-next v2 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
2026-11-30 16:56 ` [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-11-30 20:11   ` Rob Herring (Arm)
2026-12-01  0:17     ` Jisheng Zhang
2026-12-01 18:07   ` netdev-bot+sashiko
2026-11-30 16:56 ` [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
2026-11-30 19:52   ` Andrew Lunn
2026-12-01 18:07   ` netdev-bot+sashiko [this message]

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=179614844025.3146.16119972185095747974@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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