๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19428

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

#19428
From: netdev-bot+sashiko
Date: Thu, 19 Nov 2026 22:36
82 lines
11686 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] The comments this patch leaves in
  drivers/net/dsa/realtek/rtl8365mb_main.c do not agree on whichโ€ฆ

--

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

This commit extends the RTL8367S SGMII/HSGMII PCS code in rtl8365mb to
family D switches. On those switches the CPU SerDes is reached through the
indexed SDS13 window and the SDS_MISC layout is different. The family D
tuning tables and register sequence come from the vendor RTL8367D port API.

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 983257250205f..6f80b171745e1 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
> @@ -264,7 +264,8 @@
>   * interface, indexed by the external port number with port 5 (the first
>   * external port) as the base. Other RTL8367 families index this register
>   * differently (e.g. the RTL8367R uses (id + 1) % 2), so this mapping only
> - * holds for the RTL8367C-style parts this driver supports.
> + * holds for the RTL8367C-style parts and for family D, where it is the same
> + * (one bit per external port, base port 5), as in the vendor RTL8367D API.
>   */
>  #define RTL8365MB_BYPASS_LINE_RATE_REG		0x03F7
>  #define RTL8365MB_BYPASS_LINE_RATE_MASK(_port)	BIT((_port) - 5)

[ ... ]

> @@ -315,8 +317,10 @@
>  #define RTL8365MB_SDS_REG_LINK_STATUS		0x003d
>  #define   RTL8365MB_SDS_LINK_STATUS_LINK_MASK	BIT(4)
>  
> -/* The embedded SerDes can only be muxed to external interface 1 (MAC8),
> - * which is port 6.
> +/* On family C the embedded SerDes can only be muxed to external interface
> + * 1 (MAC8), which is port 6. Family D has it on external interface 0
> + * (MAC6), see RTL8365MB_D_SDS_EXT0_INDEX. RTL8365MB_SDS_EXT_INTERFACE_ID
> + * below is the family C id; the SerDes port is 6 on both families.
>   */
>  #define RTL8365MB_SDS_EXT_INTERFACE_ID		1
>  #define RTL8365MB_SDS_EXT_INTERFACE_PORT	6

[Severity: Low]
Do these two comments agree on which RTL8365MB_BYPASS_LINE_RATE_REG bit
belongs to the family D SerDes?

The register comment above calls it "one bit per external interface",
with "port 5 (the first external port)" as the base, and says family D
is "the same".

This comment puts the family D SerDes on external interface 0 (MAC6) at
port 6. The RTL8367S-VB entry added later in the series puts ext0 on
port 6 and ext1 on port 7, so port 5 is not an external port on family D.

rtl8365mb_pcs_config() still clears the family C mask on both families:

	ret = regmap_update_bits(priv->map, RTL8365MB_BYPASS_LINE_RATE_REG,
				 RTL8365MB_SDS_BYPASS_LINE_RATE_MASK, 0);

RTL8365MB_SDS_BYPASS_LINE_RATE_MASK expands to BIT(6 - 5), which is
BIT(1). On family C both readings give BIT(1), because ext1 is port 6.
On family D they give different bits.

Suppose the RTL8367D register is indexed by external interface id. Would
the family D path then leave the SerDes bypass bit (ext0, BIT(0)) at its
reset value? It would also clear the bit for ext1 (port 7, RGMII) instead.

Suppose instead it is indexed by port - 5, which the new comment says
the vendor RTL8367D API does. Then the code is fine. Could the general
part of the register comment ("one bit per external interface", "port 5
(the first external port)") be updated to match family D?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cf3fd237-2290-4002-8de0-ea4100ef0f85%40yahoo.com
Technical Details
Message-ID: <179512779318.3136.8422558829727451994@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367387-linux-kernel-netdev=dewy.ru
References: <cdf74b4b-77e7-4b06-9947-8b70afd63117@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367387-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v11 10/13] net: dsa: realtek: rtl8365mb: add
 family D SDS13 PCS support
Date: Thu, 19 Nov 2026 22:36:33 +0000
Organization: Usenet Network
Message-ID: <179512779318.3136.8422558829727451994@kernel.org>
References: <cdf74b4b-77e7-4b06-9947-8b70afd63117@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2999315"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:O5N/QtWl1/WoGuT0BkZECd1x4EQ= sha256:qW4WoXXzNFh21BVeKcVd/Q+MB7/TMJZKwtQ9fcFI9cI=
	sha1:xffkwHu2JGtT43zSYOeCwVYK5rg= sha256:x6vcMWhcWp1m9qKr9DIVM1DrGdSZygrT3zybZBH7Cns=
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 897511157D3; Fri, 20 Nov 2026 01:36:53 +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 PSkWeTP0gmXm;
	Fri, 20 Nov 2026 01:36:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-367387-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 BBEE31157CF; Fri, 20 Nov 2026 01:36:40 +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 990CA121BB0; Thu, 19 Nov 2026 22:36:37 +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=1795127795;
	b=JWbWz2Wzs9o2TxF7gAfz1MF83TT/NLA70d+hJE90bHY8ytaRu3tzjWWfgGps649yAP2R
	 kFsCYXf2ur4V31qYTaIudapNxMW9BsJshmOnv7eRaRC0mEvJUeqEZhXGA5K54bGT3VhdE
	 BEj3zCih5jDEXZZrMifwN3Bt0kpwuXQidMbhIkSNBJmsg8+bJDe0UqWI2DfJPUdX1/UI+
	 UBFjVuxqk9SFPxfzkbWedYQ3mFJcPBVt2XK4x/mspDUIoCMcTGOHy2d0RrV3VvVNHaXU8
	 eKP/+5Lmpa94rPLJdcauwUANQhyvL4Y5ZZaGeANgFAgRhyGJjy5X6GNiK6yADK6B6mg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795127795;
	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=Ko2VFISVp55vscZtGE686QzoioU9XmD8JK2gToXnrQA=;
	b=dqOVvXc3uvde/iC0j+GdcbItsU6r9MY44izLxeiR3o1E/xB4S3yuRVvPhNK6vGvc6zZu
	 /saKOkhbI5aMRGO6Fe8spk157RaUqOTwlFSkoZ67KmpIdOUKAODygbhmLopAPDsovcRvF
	 L7Zhiai6EXUQAi7mJmt4yXZPSEov8UETuNuUrKZ13W5tMcFyPw5WsXhBbvWOS5ttcRCAH
	 e9CQ65DqOp09X+yFhj5VzZHqU+tFbDjq2o7LkqAq0Y6+O0UHQLZ9ATaCWILDtjvzgEUPM
	 zHepTCG/U0vMdrhhF5Mwrsw80yepYehH4AsG9EAg63u5AC76SLzDdne/Y3WsnCAQ5KA==
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="j1/tqsPl";
	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 BF8E860A2600;
	Thu, 19 Nov 2026 22:36:35 +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=j1/tqsPl
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=1795127795;
	b=t34r5sT8dRvjxo9cMbWlwJUKPFO/XCfoez2RUOr+r3jJM6XiQoNX7mmCUWk9rJ57cte3
	 8a0bYamGd3fabAbK0Ml7AMCl20qcFxSmbrwVqwlIjjQUnmsv6sTYnx6i5Ph8u90f8ulVm
	 OreL2J3AifcTESYge4Cqiilosp1giEVfT4qmrb56ib66NujOQfK8tT/IMsEOEFezGJQSp
	 a+PjNnq1ZcgMpj2nBnr3BU8rASU3/Z/xo4YZmLs/imYMyZCO6Ol2meIuSo4tdbRSZ57t3
	 d+ue4tOFQA3s3myIiIkbEJQB9DI2BTqu+htovMi0qvRsYZBURpB0Q+sCu+M7mQ4O2XA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795127795;
	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=Ko2VFISVp55vscZtGE686QzoioU9XmD8JK2gToXnrQA=;
	b=wvo8iR0No+b778su6l7oQo/LUYKSJ0yrIH5VSPDghaXDqLRMdRz4qS5VN6d4Hm4M5Fs0
	 iuYx+/1OZ3+QHvxu6I2Azk0ssjKwKmbs9AJxeXU6binB62+D8Paq9BudnxecfTAJ0GPgH
	 M8dN1178Cu8MKyZF4TgoguR6la+qQ0cywOrGeniwXeNWh5ds/NQr0xBiKmp31+Hb8hqi/
	 o+idPMnLwxUwdc6mC5f+3Kuy7wib0gq1GLcSwrqDixOP65O8ByBORcOaCZqCNEdx78/Jz
	 gAfG4v9CpxOxJwhfQb58Xgz/2wzLzU2aovjBG147ZHMIhJ7MExC7kplGTBN1ZD/n7jg==
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="j1/tqsPl";
	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 E10E7606A33C;
	Thu, 19 Nov 2026 22:36:34 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99C431F000C0;
	Thu, 19 Nov 2026 22:36:33 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795127794;
	bh=Ko2VFISVp55vscZtGE686QzoioU9XmD8JK2gToXnrQA=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=j1/tqsPlYhj0YtgFAKx0ns76/kYy32afsgVF8aEuDi5Wsu7V7ne7d9N2CZdFI7TJj
	 iNL+kxGD6yhlldoQm6Hsulkmk0ilm7jRVMAIGR73YSI7RBsTZDTBp41bqCT1vhgI3H
	 Npvpsb4oIWbApaCOehj1O9flM4UFahS1Angu2UEd+JJp7RP0vfi/9dQtz4ebTzYFGa
	 rnhU69RRptMKHCb4172usJicV3D+HLGoxZ+bj6eiYmujwvJ2e/OzkgZ9DwggXMd3po
	 T5KYcBeMZC4pwIiulCvOnSPjoI113jUd/yKDK8Ae7oqx5A6Qs0qpnfyoX6tIZ3/lXG
	 duBqwTwFrICVQ==
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
X-In-Reply-To: <cdf74b4b-77e7-4b06-9947-8b70afd63117@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