🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26658

Re: [PATCH net-next v19 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB

#26658
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 02:18
106 lines
12113 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 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] In rtl8365mb_pcs_config()
  (drivers/net/dsa/realtek/rtl8365mb_main.c), DIGITAL_INTERFACE_SELECT…

--

net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB

This patch adds the RTL8367S-VB (chip ID 0x6642, version 0x0010) to the
chip table as the first family D chip. That makes the family D code paths
from the earlier patches reachable. The new rtl8365mb_family_d leaves
jam_table unset and maps the SerDes to port 6 / EXT0 and the RGMII
interface to port 7 / EXT1.

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index b3fc6fbfac7c8..2b7b364542a6c 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c

[ ... ]

> @@ -845,6 +861,24 @@ static const struct rtl8365mb_family_info rtl8365mb_family_c = {
>  	.qos_set_untag_pcp = rtl8365mb_c_qos_set_untag_pcp,
>  };
>  
> +static const struct rtl8365mb_family_info rtl8365mb_family_d = {
> +	.family = RTL8365MB_FAMILY_D,
> +	.ext_config_forcemode = rtl8365mb_d_ext_config_forcemode,

[ ... ]

> @@ -935,6 +969,19 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = {
>  		},
>  		.num_tx_queues = 8,
>  	},
> +	{
> +		.name = "RTL8367S-VB",
> +		.chip_id = 0x6642,
> +		.chip_ver = 0x0010,
> +		.family_info = &rtl8365mb_family_d,
> +		.port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)),
> +		.extints = {
> +			{ 6, 0, PHY_INTF(SGMII) | PHY_INTF(HSGMII) },
> +			{ 7, 1, PHY_INTF(MII) | PHY_INTF(TMII) |
> +				PHY_INTF(RMII) | PHY_INTF(RGMII) },
> +		},
> +		.num_tx_queues = 8,
> +	},
>  };

[Severity: Medium]
This entry puts the SerDes on EXT0, and rtl8365mb_family_d has no
jam_table. On family D, does anything ever program the EXT0 mode field
(bits[3:0]) of DIGITAL_INTERFACE_SELECT (0x1305)?

In rtl8365mb_pcs_config(), the only write to that register is skipped on
family D:

drivers/net/dsa/realtek/rtl8365mb_main.c:rtl8365mb_pcs_config() {
    ...
	/* On family D, SDS_MISC selects the SerDes mode. id (1) refers to
	 * RGMII port 7 on RTL8367S-VB and must not be overwritten. The EXT0
	 * field of DIGITAL_INTERFACE_SELECT is not programmed here and keeps
	 * its power-on or strap default; whether the vendor sequence sets it
	 * for the SerDes was not verified, but the link came up on all tested
	 * boards.
	 */
	if (!is_d) {
		val = sds_mode << RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(id);
		ret = regmap_update_bits(priv->map,
					 RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(id),
    ...
}

On family C, the jam table in rtl8365mb_setup() also writes
{ 0x1305, 0xC000 }. Here fi->jam_table is NULL, so that write is skipped
as well. On family D, rtl8365mb_ext_config_rgmii() only writes the EXT1
nibble (bits[7:4]) for port 7.

That leaves the EXT0 field and bits[15:14] at whatever value they have
after rtl8365mb_reset_chip(), which is the power-on or strap value.

What happens on a board where that default leaves EXT0 in a non-SerDes
or disabled mode? rtl8365mb_d_ext_config_forcemode() would still force
MAC6 up from mac_link_up(), and pcs_get_state() only reads the SerDes
link bit. Could the CPU port then report link up but pass no traffic,
with no error logged?

If the hardware ignores the EXT0 nibble once SDS_MISC selects
RTL8365MB_D_SDS_MISC_MAC6_SEL_SDS0, there is no problem. Can that be
checked against the vendor RTL8367D sequence? If not, should the EXT0
field be programmed explicitly for the SerDes on family D?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/59c7992d-1c83-4bf1-a2f4-c853d4777190%40yahoo.com
Technical Details
Message-ID: <179635073149.3146.8834479666757845007@kernel.org>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376972-linux-kernel-netdev=dewy.ru
References: <b894096a-5620-4a31-b2b4-4979e29e7ac1@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376972-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v19 15/15] net: dsa: realtek: rtl8365mb: add
 support for RTL8367S-VB
Date: Fri, 04 Dec 2026 02:18:51 +0000
Organization: Usenet Network
Message-ID: <179635073149.3146.8834479666757845007@kernel.org>
References: <b894096a-5620-4a31-b2b4-4979e29e7ac1@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2654405"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:SL22aVUYWGj1sHQczYhwPoXXFVY= sha256:LEyi6yrbPLlYmp6N3/a1/iLabwZIkWkmHdeXqIAiQkU=
	sha1:f/wrVf85RDqPm+czOxQ4XxE4qm0= sha256:NRJevabx3epbDSx/PYRlYV2Euk4yYiv7CM0NSe59ppk=
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 8516B117AAE; Fri,  4 Dec 2026 05:19:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.64
X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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] 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 wHVA9f2fAsTp;
	Fri,  4 Dec 2026 05:19:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376972-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 59246117A7E; Fri,  4 Dec 2026 05:19:05 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 824852A6FD; Fri,  4 Dec 2026 02:18:59 +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=1796350739;
	b=a0wLbgqq33n/AosFo3CsqqBVkq1wy8jviHb8LfRBQYqJi3WZUElWdrJ66UFMkSRBYOZn
	 iMsCAWsiBNQiBbeTdkMo0PkKk0/IuoxNbHzKrdstTOpu1nIhV7b5nr1uVfg8sGlBe2wCW
	 G+LJPkUItADZZa19mzvkmpgdGHMjeQYkBvlPZpc171MtSYTozujxn8uXfrS9ehQhipGJJ
	 V9Rr90BKQ8sbhLRvbfaM1RY8cUlkYbDQojb9nUtaRlKkzURNGMZUHT5UHqyPD6y77FWLa
	 4KAja1uPhIfx9L2dkKgey7qIb5tGZe2rsC6Y0fP9LFzHgnB3CvShdeXXATUTnneZaBg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796350739;
	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=XzTzpBbNEhPeAzYCshXceyNxApMoToCSf3cYlR5aaFE=;
	b=UvpRyMz1TYAdr+9Tpxm3KG+mrIjmQNJG6dXIL3bVz7UYqB2R/s9IBLSGqWhvvtfo5Gkr
	 30JTITmHPOjvztxzPq1epdN/QEIBCPy8OT0+tgwL9VtAU14GA/kOqtsHj8i9cis6jWTt/
	 0lwRxkH3f3UCtiD9Gkc2oZhYt7TisW9SrSkFIe+plpnAuoElMRi4P6FfKN1df4UelouEH
	 6QEwA8mQrjH8IJ/Kc1yVXc2bgzoHFV8nOLkk2sX3fJHGSOPp0GzQDFnEr6FcW3SdyCfY2
	 ejjvUdFNr3iPhD+Y1t7YP2PVTH9KLRWkeOOaWiRytkS8XBkmvNBPOeXbnP3iodaYlZQ==
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=ek2JhzhB;
	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 3AAC6606A685;
	Fri,  4 Dec 2026 02:18:59 +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=ek2JhzhB
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=1796350733;
	b=DQHB1IKyVnkjKR/x8Euo10Puk/pFifbgG6o57nHNeBi6W2Mc4CaSjzQJpXaYzZhVlSUi
	 L6K3EE6v9t85fl8Lz3JUaIeHAb6BAzyG5T3dNjgtFiaRQhbvegYmUU/beCT876Y0JRg/r
	 ET+2NxP8n5ZTYbJC0Lyvi+2/uxqM1tteV/fMo1jNwgc3Y+pxyVvc+qTd+y+VTJBAuBBlZ
	 eXMOwxXPbThRXDuvT+2qOn4FlpQ2Ss2HDqD44/Ht6Q64XZRbjVbRVU7vkwJ0sDk5iWWJy
	 k8M272WzIO19cHacuIwrhLMENDvi5qk3qCHGEOq0t69B2ipwoPMSNAtzCyZirHRJDdg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796350733;
	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=XzTzpBbNEhPeAzYCshXceyNxApMoToCSf3cYlR5aaFE=;
	b=IFEfSK/nu3IxMhl/O4tcPYc8t04PAltuh82RQhYtB3pGklTWFkdh+rumoKA2u/c+hOXP
	 M8y5wT1NsVkWMocj8cZSKlSCCd+bS0GueTxs7h9Be50YOIR2S8ijbNwU3JEgfWL8Qy2j4
	 JIRhmljHCTH03m1e653na8DM2XNjzAQUSBKZTdk4S2qNDEqNavyORGosnu4f1iQ+Qk8gi
	 GGp1r8529Xi1t9EMdmSDrDonIUwsxro0BpdiDDLBWS1Xmg/wb/uAC7JX0tHBmKur1MuWt
	 Dq0couDBKrszCXvDph3n5LCeUFHg4KLzhmMrgmY/A5KtpgwiqrrCk44JuWIgXJuzUJQ==
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=ek2JhzhB;
	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 598E7606A334;
	Fri,  4 Dec 2026 02:18:53 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF2C81F000C2;
	Fri,  4 Dec 2026 02:18:51 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796350732;
	bh=XzTzpBbNEhPeAzYCshXceyNxApMoToCSf3cYlR5aaFE=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=ek2JhzhBpi51rQL3ZZ98bPSDm00AGdCNheB9xu8+gakJoBQ79ETQANA6154zpATCa
	 UV9gH6mxH3dGngWSFYSwxfZwCunW988gIkxbPfb4RQlzW8WLJeeHockxt6RUUWaGJz
	 zYsR6l3aud6+tMJ9C9pn6BwxwAzBZtP/uGXDAf0zN5biyGxfLFSBCB+gI0YTbFiJAp
	 PVeN9Obv2XEqM7ETRviKbfNQIF3tBfy22/nqixNtWPDBnedKK2h7mlWgkcZJbX2Wsl
	 K/1lw1ZkEpNd6VIUPcOYTl/YXGjF4vrkZNBY8bauLRzbPe9SmTz4DyyStL1WMm+XMd
	 382M9Pzdbn1Ug==
X-Cc: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org,
 davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
 linux@armlinux.org.uk, luizluca@gmail.com, maxime.chevallier@bootlin.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 alvin.sipraga@analog.com, gusfmora@gmail.com, kuncy7@gmail.com,
 fabianotassotti@gmail.com, gabonpivovich@gmail.com, contact@c127.dev,
 o.rempel@pengutronix.de
X-In-Reply-To: <b894096a-5620-4a31-b2b4-4979e29e7ac1@yahoo.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