πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25471

Re: [PATCH net-next v17 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support

#25471
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 21:22
98 lines
11900 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] On family D, rtl8365mb_pcs_config()
  (drivers/net/dsa/realtek/rtl8365mb_main.c) now skips the…

--

net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support

This patch extends the RTL8367S SGMII/HSGMII PCS code in rtl8365mb to
family D switches. On these switches the SerDes is reached through the
indexed SDS13 window and the SDS_MISC fields differ from family C. It adds
family D tuning tables and SDS_MISC programming, skips the steps that only
apply to family C, and stops advertising 10/100 Mbit/s on the family D
SerDes port.

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 7500ea9b3a627..2e661ddd8cd23 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c

[ ... ]

> @@ -1575,34 +1663,60 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,

[ ... ]

>  	ret = regmap_update_bits(priv->map, RTL8365MB_SDS_MISC_REG,
> -				 RTL8365MB_SDS_MISC_MAC8_SEL_SGMII_MASK |
> -					 RTL8365MB_SDS_MISC_MAC8_SEL_HSGMII_MASK,
> -				 mode == RTL8365MB_EXT_PORT_MODE_SGMII ?
> -					 RTL8365MB_SDS_MISC_MAC8_SEL_SGMII_MASK :
> -					 RTL8365MB_SDS_MISC_MAC8_SEL_HSGMII_MASK);
> +				 misc_mask, misc_val);
>  	if (ret)
>  		return ret;
>  
> -	val = mode << RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET(id);
> -	ret = regmap_update_bits(priv->map,
> -				 RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(id),
> -				 RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(id),
> -				 val);
> -	if (ret)
> -		return ret;
> +	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),
> +					 RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(id),
> +					 val);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	/* Take the SerDes out of reset. The vendor driver does this only
>  	 * after the SerDes mux and the interface mode are configured.
>  	 */

[Severity: Low]
On family D, rtl8365mb_pcs_config() no longer writes the
DIGITAL_INTERFACE_SELECT mode for the SerDes interface. Neither the code
nor the commit message gives a reason. Could a short comment here or a
sentence in the changelog explain it?

The skip itself looks necessary. id is RTL8365MB_SDS_EXT_INTERFACE_ID (1,
the family C id). On the RTL8367S-VB that id is the RGMII port 7, so the
write would overwrite port 7's mode. The family D mode values (0x02/0x12)
also don't fit in the 4-bit field.

Family D does still use this register, though.
rtl8365mb_ext_config_rgmii() programs it for the family D EXT1 RGMII port:

	ret = regmap_update_bits(
		priv->map, RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(extint->id),
		RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(extint->id),
		...

On the SerDes path, the EXT0 mode field (bits 3:0 of
DIGITAL_INTERFACE_SELECT_REG0) keeps whatever the reset default, EEPROM
or bootloader left there. The comment just above also says the vendor
driver deasserts the SerDes reset only after "the interface mode" is
configured.

Does the vendor RTL8367D sequence leave the EXT0 select field alone
because the SDS_MISC mode field is enough to select the SerDes mode? Or
does it also program EXT0 at this point? If it does, could a bootloader
that leaves EXT0 in a non-SerDes mode keep the link from coming up?

The commit message covers the other family D differences (line rate
bypass, port 6 rate limiters, pause, 10/100 Mbit/s), but not this one.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/236d002f-5ca5-4f12-bf5b-0ed6442e5c9a%40yahoo.com
Technical Details
Message-ID: <179616013744.3146.12761762298631844706@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375360-linux-kernel-netdev=dewy.ru
References: <3fcaf694-597e-4b77-8f56-d0cc33232c98@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375360-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v17 10/15] net: dsa: realtek: rtl8365mb: add
 family D SDS13 PCS support
Date: Tue, 01 Dec 2026 21:22:17 +0000
Organization: Usenet Network
Message-ID: <179616013744.3146.12761762298631844706@kernel.org>
References: <3fcaf694-597e-4b77-8f56-d0cc33232c98@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1822262"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:YLNLxbyrkW5H9mMhjAJlBhBtJ7w= sha256:OL1/JS2jlf21zhrWoJwWwluRsdumkfmCyUzIBmroddM=
	sha1:U0kUVkg7YWv5LEdkzMaLyQT8mo4= sha256:o3u97Bz4xPn0bk0Msh7daK0RLZenYVAl2qLYIaWcH5Y=
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 08BD71174A5; Wed,  2 Dec 2026 00:22:55 +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 lXnY5TEuNZsJ;
	Wed,  2 Dec 2026 00:22:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375360-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 366571174A4; Wed,  2 Dec 2026 00:22:42 +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 BF99926067; Tue,  1 Dec 2026 21:22:40 +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=1796160145;
	b=ceIINB4OKzCXQ18Ww1FgROPBUuiFdKcFgpw+UM9lM34s4xps8+JCYTsYBfw18XqDlKBf
	 kyowOaEkhZVNnAPN81XT6k88IMPVMoojbEGbYihxfE6s3gTpofUQBZUIwC9QSraUk3t+U
	 rrydtbPbM65+Nek4FDU8yq+S1lO0WNTioss96p7Fpyg+QWLSNQyhsi6PY76DtG48ZptRo
	 kfgP7kw14t1E/+jZalLHHvROjH8btyOth82gMrvzHASIg8fPBwLO4kh39+1AXL04/NUob
	 v7qgBvWuAZhhlepxmvG1nShmJs/CVFI6sHKUqlw2gLJ/pPd/khEfdPgAoUvYMirMFlg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796160145;
	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=TQavW6wheeBQuIwmbcZK8lyww2X4jB5aquDVwqxQJv0=;
	b=QXvHHNJGHnZHkY04MnAK3bxhlxHscZ2KtkkR2jRj1k4xv9K/Yrdg6yrxLPUMqx1m3Opx
	 zfShcKoExBS3RJPt9vwSjhIfNH6CUuGw80tzhDRmZknR46yGgHvRTTBxLk7FXegJrQN9m
	 s4Q7cKrEQYeuNLPRlJAKwzyA/kogrsuDqG0HC9ipETenTFyZJ+9VEfIFH+wXcmhWOgvBG
	 ZURmW2/rB6xPNzia2nggIu/6dw53CborWtGECRdACy8UDCh0VCFw98hj9w41v7AIBUuoY
	 6LPZrO4OU+mAiawRk+KeY0RI4l0vmGHZTknPwS1TG6853C169aptsoVtRHwdDHf3NzA==
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=Vpv7QjvY;
	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 5AAF8606A692;
	Tue,  1 Dec 2026 21:22:25 +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=Vpv7QjvY
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=1796160139;
	b=EyExf8siVxnSQzyA2jZwn+s4jCUv8iY68GPc6o7upCW+fY+Et+mPyPAJStLjYr/LGYV2
	 5aM9H/r/4/endNtOfCdKj5/tbEDfmDTWIpG5uKq8VYJU2+MC34ECIutoi/T+oWoltnyp0
	 jAyPa8hSqb7guo0I2lbgbfrUC39jSGSHU3UO/UUIpZBBaMzh2+BCleIklzkDsmmyWNLNr
	 A+QhatczSQxowUibXCCmrCK/kH6dN2w9WbDTkENRHfHjLoNp0EM3iu1zFWQ1KsK/dJ+/q
	 ncCOuVToEAU2vEyK524LdGQFt4gDK9hXvpa58YfrYbz700bGG92es6yAmHvx3AdneWA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796160139;
	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=TQavW6wheeBQuIwmbcZK8lyww2X4jB5aquDVwqxQJv0=;
	b=TtllVk1OyZO8fs5f0v66A0NpR8d8NeEFpMgrbGGXq5D5VltMyKKc9r0jXiwLCg5kGppX
	 F63DBIG87m5iYhDgHqfAbcogoJO4LM0o4zke5oiRW7jukv248oDmuYiUHITQx9GUO/3Pg
	 PnixxPd6Grw3pQK/Xa38y/RX5jA6Srq77tFHERiPu3VHNr9bfTf3HbaFuCXnRUHjMyT1h
	 jF8hGwxkt/7ie20CPlfSKbh3Yv+WQyYB28tqOU8VWpoJvTt37U+ROFOJnPY6pJYbHFQRG
	 FAVnGYkRdmEaeeYkgOzDNG82+U7D8Z6OxoCGo4ka8lgwX4PopECCm6P71C6NLT22Imw==
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=Vpv7QjvY;
	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 7B0DB606A68E;
	Tue,  1 Dec 2026 21:22:19 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEF451F00893;
	Tue,  1 Dec 2026 21:22:17 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796160139;
	bh=TQavW6wheeBQuIwmbcZK8lyww2X4jB5aquDVwqxQJv0=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=Vpv7QjvY18Mg+IA/cQWzmgb0VLCAuh/e/ChkDI0ZxuzJzYTg/hnSrisMetf3mevgC
	 AEQ5m1b3VnsfJhYwFSgegNwFThxFi3IYHy547IFjr2WZ0VQWisLulveF+xA/lgF6Rw
	 QAHnrthG/a4MQ/kwI9hPe9NsSZPEEJwI4ACDAkaYk5k4BRdFkaBzY9NmT2p46alqOu
	 2OgW1gtOIDwYmBwtalzWokGOoSzB92ZiaokAOs8np9YZWT7qLdqMu3HD7a5ECRDwwn
	 NdeBCidt9lDMH69Yas++Ee8CVYvfhLxmciR3Te/+P87Bc+d+t8Nup3zH+a46XQUGNw
	 Ic5zDYzMGrJwQ==
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: <3fcaf694-597e-4b77-8f56-d0cc33232c98@yahoo.com>
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