๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25408

Re: [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC

#25408
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 18:07
86 lines
10720 bytes
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
Technical Details
Message-ID: <179614844025.3146.16119972185095747974@kernel.org>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375271-linux-kernel-netdev=dewy.ru
References: <20261130165639.12839-3-jszhang@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375271-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <179614844025.3146.16119972185095747974@kernel.org>
References: <20261130165639.12839-3-jszhang@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1784055"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:q87wtT8tPU3gx45sP82AR8hLq8A= sha256:K5+4ooOKMRhqQj5n/yQB70TmShFGffoIkQi6DEYnzYk=
	sha1:n4lD+HDFd3231+Mdci5YF9HDVAo= sha256:5LA4AfjXB45cpJTA01Ossf68Q0Qt0hhxcm0Jtu9KqNY=
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 F10C711744F; Tue,  1 Dec 2026 21:07:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[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 xSbmwXQWl0cw;
	Tue,  1 Dec 2026 21:07:41 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375271-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id ABE5011744E; Tue,  1 Dec 2026 21:07:31 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 74A2C2391A; Tue,  1 Dec 2026 18:07:28 +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=1796148448;
	b=3wmeYl1TiwygQ2Zh/l/VokLjNTKhz0XIAiUZJ432Iho/3lRyzJ6XGWoYVEgK0H5MOuVS
	 4ZjoudxywYqgLhsFA5txSos0BcsbDTVL7wK9wl10EaX4kumd7knbrxo2uv4W2gqvLzGy7
	 qZUrhZiOwqtWwEO4Fkpx+/H4SlMhRmpGhnKgD09j1cUQSyyO9qdQdf9EAFOIvyoYvRyev
	 GW0qvkcaPpFKOEZsBz+gyxxSeH2KnLww3BMV9d00eQaZhwqEAXA0PVXqElKqF+r20GTRC
	 DMrNysDJrUNm/GmqLbhqGguTjY9Ga5t3ET0Tn9J9R5EJ76vL9YRO7Chnh9ntczldrcw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796148448;
	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=4BK0ERxV7qZBBIZ1vUIUgBzV493XS/JfuybR0Bx8w6Q=;
	b=ZrWP7OcMMGCL+5IKrNm0SHtqlBoWLlXSbutD+//5OQ6n2njrew+KX0Ti9sghQSpGhLHx
	 XseYiW6/RVEi4Zslk3cwhJJAditQW5zSYjEMRTGe/9AqqvW77PtFif85gKpxaNYqjoCmD
	 dB7C/WS8+2JUvEBj4NSS4pz829oLw78l1aBmPDV1LVaBoRfS9SW5+ZutnLzW31EfU1+DF
	 9iGi2jCN3gX+vdHYB8vMDevoIRNE0rmx5KdFlHf7/w2n/nVVXB6pqSJ3c8h9kizhYHuQ1
	 3M1++G6CreVpTqBLSjkPag/OQvjQ82x1yfCg5dH3J8NSDKE0zBNZifpWgLbiWNWcyCQ==
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=QVjmQ8UM;
	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 EB879606A331;
	Tue,  1 Dec 2026 18:07:27 +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=QVjmQ8UM
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=1796148442;
	b=p2fnKIHuChOpvobfHHjUU7alp61b0y9E6oyZmPWOV7yS6Z0UX3fE+333w6huQurbSS6W
	 wufAVYJ1gfmXft9M3buNl3xaZobru2DQ8hNNBEptdm4GJWt1+kB3wUERo7Y5QF09VNqv6
	 RTuQKEIY4G3LuUvMWsqt2cNXMt6vSzJiysAycp7enie7EhmwwrylJ+bjwu9t61YeOw2FA
	 G14f1Z8vMt26i64fg3xwbqZnh3l+eCvEDmSPMHh7vlNHFghgrCRsUfhOKzlyMwzAG0c98
	 XeIEo89m7uagkb4gG2zIWPFEK5egODdtdza6zJ2HR/VYK6XmLeB9vOmln8wQiyqAlQQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796148442;
	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=4BK0ERxV7qZBBIZ1vUIUgBzV493XS/JfuybR0Bx8w6Q=;
	b=AxHxweI5tkRHiY62Kob8GIrD+JodhTMnOz49Dw7LKFdiEVIqAynlixRLxXRrUF3Jtt9x
	 7m6HMRNGZXGeA10JI2B1k2FHQfZBWv9Wyc9hZbHgdH0L4or49/zlLbCkO9gkeqJpIk5yS
	 KN4yShPZRsyDVFDwC0D0Vu+Gs1ITV+GFr9lia3SXiY0mtk8uA+RgFnK/GbAPAX8bckdtE
	 wRKFfEYQEzTzbv41y8wYCVPDw956R9AXr+J+NOyA0T4z+OUgWOI3uqAkCYGv8z0D231J4
	 /oGDW6jLbqX7msHOmZwItpcpnmnmKJ5DhktlK8zsCD+mO9DZA+g1Ee0JIRFI7Y3ziwg==
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=QVjmQ8UM;
	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 17E56606A333;
	Tue,  1 Dec 2026 18:07:21 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF6721F000C1;
	Tue,  1 Dec 2026 18:07:20 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796148441;
	bh=4BK0ERxV7qZBBIZ1vUIUgBzV493XS/JfuybR0Bx8w6Q=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=QVjmQ8UMsaOsNZKonbWN5EjYmmQr3sFtJwND4jutMOokN1NihFSGAr/+1CryLMw/G
	 /KvW71nAzdoD6ciF8ZOe5K47C2hryeMGabxLbnNBLE79ChdMzPjay7pRWlDA9yjwBZ
	 daS3YGXRHbj9jfxxRbBU8DwEYIPACWnsb5CkSwXL0qdGYVq7qMHIuyICT9V3LI0/65
	 FAU63Bbfc5RO4EmB0BhwlxtNVjDNGDpcQmgWIVA9MJIwt0Ha3Zs6j4rCvU8K1nwWhw
	 qqJbCm9mGIBYy0nXeUWmVEX3bcA2MrN+8sdHZJdq7sllcFz6TNvptH3pAHb/HGT2zM
	 UUc0YUnjHK2fA==
X-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
X-In-Reply-To: <20261130165639.12839-3-jszhang@kernel.org>
X-sashiko-severity: Low
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