Article View: linux.kernel.netdev
Article #13093Re: [PATCH net-next v9 07/11] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
From: netdev-bot+sashiko
Date: Mon, 09 Nov 2026 08:52
Date: Mon, 09 Nov 2026 08:52
96 lines
11917 bytes
11917 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] Family D SGMII at 10/100 Mbit/s: phylink is told port 6
supports those speeds, but the driver never gives the SDS13 SerDes a…
--
net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
This commit extends the RTL8367S SGMII/HSGMII PCS code to family D
switches. Their CPU SerDes is reached through the indexed SDS13 window,
and their SDS_MISC layout differs from family C. The patch adds family D
tuning tables and SDS_MISC mux/mode values, always sets sds_supported on
family D, and skips the family C SerDes link-force programming in
pcs_link_up() and mac_link_up().
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index a87253b9c2700..86194d555fd6a 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -1660,6 +1783,12 @@ static void rtl8365mb_pcs_link_up(struct phylink_pcs *pcs,
> u32 r_speed;
> int ret;
>
> + /* Family D forces the external MAC ability from mac_link_up(); its
> + * SDS_MISC fields do not share the family C link-force layout.
> + */
> + if (rtl8365mb_is_d(priv))
> + return;
> +
[Severity: Medium]
On family D, does port 6 work with SGMII at 10 or 100 Mbit/s?
rtl8365mb_sds_probe_option() now always sets mb->sds_supported on family
D. So rtl8365mb_phylink_get_caps() advertises SGMII on port 6 along with
10/100:
config->mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000FD;
...
if (extint->supported_interfaces & RTL8365MB_PHY_INTERFACE_MODE_SGMII &&
mb->sds_supported)
__set_bit(PHY_INTERFACE_MODE_SGMII,
config->supported_interfaces);
The RTL8367S-VB entry added later in the series gives port 6
PHY_INTF(SGMII) | PHY_INTF(HSGMII).
On family C, rtl8365mb_pcs_link_up() is the only place that programs the
SerDes SGMII_SPD field for 10/100/1000. With this early return, no family
D path appears to give the SDS13 SerDes a rate:
- rtl8365mb_pcs_config() writes only PA33PC_EN | PA12PC_EN |
MAC6_SEL_SDS0 | sds_mode into SDS_MISC. It also clears NWAY_EN, and
pcs_inband_caps() returns LINK_INBAND_DISABLE, so the SerDes cannot
learn the speed from in-band AN either.
- rtl8365mb_phylink_mac_link_up() skips the SDS_MISC write on family D.
- rtl8365mb_ext_config_forcemode() writes only the MAC-side
RTL8365MB_D_DIGITAL_INTERFACE_FORCE_REG(port) fields.
Suppose an SGMII PHY or an SGMII fixed-link on port 6 resolves to 100 or
10 Mbit/s. The MAC is forced to that speed, but the PCS has no programmed
rate. If family D hardware does not derive the SerDes rate from the MAC
force register, could the link report up and still pass no valid
traffic?
The family D SGMII branch of rtl8365mb_pcs_get_state() also does not read
the speed back from the SerDes. It keeps what phylink passed in and falls
back to 1000/full:
if (state->speed == SPEED_UNKNOWN)
state->speed = SPEED_1000;
if (state->duplex == DUPLEX_UNKNOWN)
state->duplex = DUPLEX_FULL;
No later patch in the series seems to add family D SerDes speed
programming or to limit family D SGMII to MAC_1000FD. Should family D
SGMII advertise only MAC_1000FD, or should the SerDes rate be programmed
for 10/100?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/9b73858d-fc09-4988-8bab-fd7b88db9412%40yahoo.com
Technical Details
Message-ID:
<179421436480.994134.17527876379511324629@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359143-linux-kernel-netdev=dewy.ruReferences:
<7845f6c0-4b8e-48e6-a5e6-b0b3dd8a182b@yahoo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359143-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v9 07/11] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Date: Mon, 09 Nov 2026 08:52:44 +0000 Organization: Usenet Network Message-ID: <179421436480.994134.17527876379511324629@kernel.org> References: <7845f6c0-4b8e-48e6-a5e6-b0b3dd8a182b@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="314398"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:BjPuSFhyk2CWDAJZaco9jBzyoQo= sha256:/Bwhnl5CuRpcnBEBZD/EeJqFHSpS26Px9hsCi5OQfA4= sha1:eot+WvBrRk7UGcLfsraKYsCxP9c= sha256:bAF8pi920Q0DeTtb4dUVM6Kutcbbd3DQ23TXULhMc8A= 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 3DCA911375B; Mon, 9 Nov 2026 12:09:45 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 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] 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 4wYpRFhVtE02; Mon, 9 Nov 2026 12:09:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-359143-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 B227F11373C; Mon, 9 Nov 2026 12:09:31 +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 81F21107D5A; Mon, 9 Nov 2026 08:54:29 +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=1794214383; b=NTI4ajmeWthq1FwdB119vH4QBI51btQn+1sY/+dVeKwzwroqpf1uRyLEhfjTh4wV52+w ywIFmzYAcjgHhebK1ToGNKCcWdgcHBewTetMoqWjbWjCClKlHwJ1ApUPSytvQYyhJmzFX SvBkWuHmIpIW0gYXtWysnnu1O4r5O8YqDEpbqe0NXJ7csDaUq2FGFsvS60EG+vZhSlMp5 +TSXYQjxQKWLQNAlh1BhOsb4QfyY+81VfyxiEZZPtG/6GMmoCiEL93b/QZNYwGbVCUVh1 NbBoXPiXfwr3SDF+TjBifMNkLdvPKqbDiSQsv6G02KoW5GG2YPAkx9xkvfILQa/FsdQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794214383; 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=S+gPk6smiHphLVQhupXpYOXwHrOzpls7/r1mEhsRfFE=; b=1BnLPcbEpgRU8jaGMoD7sF0R9I6y4WY4jecEuY8jo+fSntoQpj2bGK95smgzwKeS1UN0 mFuLTiJ+oWWZC624to+EnFjwYftrv395F9wMegq72iS38uhRnCwnG0RM6+YGtr7KuIhpW 7k4Jd4BE7ihlB3z1+CJyGLpHV9sUnGLkyreBaBBmml6cSjT1tgRLAyIcW0wujd83ASO9u DjC4XoJp6kZweU83CUzmy1P4I67OHglZt5zMI2q0b84gluZKxNfSL0khnriZ5EoQgej5n nI9w57Mk+ENergTcl4+RNzE5Csqdu6tRBWlqx28JBweky2ePKfqaPRZ5upWUij1izgw== 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=KeXTwOcc; 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 BA75F606D825; Mon, 9 Nov 2026 08:53:03 +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=KeXTwOcc 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=1794214366; b=fJ8C6B3gVF8xKU7rtDO+daBOozCVLbb5bkIonf6Xpung/U2hxBYgs9xRhB4CrX1IiH3t 6eOMBo7pWXtFiMxWmNCXgGdAookChNKALiSKwekOFLBD4zPvAMNTEsKDDzKUGdce92ggA pd4enEfn4Wx/fVS3PASQIb82m4BHh93Itkpp5EkLd4ttqs0puEbmg6NGm7c6gCMMxGCcG pGkJG+pg2faW6u0P3AACf+NcERdxEDyC2THiQrsx45YhkaAoY2DWN+7brKqb+JXg+qxO0 49waLJoDxW8+DdlsomSnt21BZNCR3XOMRopTUSxD4uCwhlof6Fq44E+eMxOeUNbKI7Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794214366; 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=S+gPk6smiHphLVQhupXpYOXwHrOzpls7/r1mEhsRfFE=; b=dB9IAvYAQH80K8Ska/Kve2J0C8LNmKzhGFjtAkRbG8MkvSZP0Xficr9Jb1gXVVbdJEVL wqn+OQ/UKhWvc4HHb9/R55y9KNJKU0K8OQ0Ov4k8CtUfeeJXeoY0t4xa9NZgrb3YDvdGZ gSx7Xf5v1CQqd7vPbfH+DmnseeVltyG96l0cN/KNNnBhvSt9EiCs2akTLtmQPIdPoHuc9 q8VHUjRwMwEESG8DHOJloRojPCU8FEJiAV4ROw/L9bOE0EZPoG75v8MzHRXiJOux4b+r+ 7hyqBGPa3RCPw5/XikwhTrc76gKpSg0o/KGQM9UvPMgmBg7z+ZVydNVOZe44dvHnPVQ== 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=KeXTwOcc; 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 59E466082BD5; Mon, 9 Nov 2026 08:52:46 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35F0F1F0089F; Mon, 9 Nov 2026 08:52:45 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794214366; bh=S+gPk6smiHphLVQhupXpYOXwHrOzpls7/r1mEhsRfFE=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=KeXTwOccgEqYoUnzl8AuHfamPUX5jt7n9Wnefk/EHdYBqQM/Fy7RTsVNf7xjHJSFm KwyGKUosbs+9vy7y535s+TOIfFK+QLP5AJHZ8jQHDoZR/atEy9x5NEAd3QV19mmr/F M4Tt28SwELpRcds3x+CAunBbpgEP0idnL7pCjn5Yl87MvUSngAdDd9a0hQFC30xC+e 07/KPeEfqrb1zEp71ppGyWVPv5qfEM8JKG5uRSU9YNg9Hc/zE+XYpChcUhtPm139F3 qdCXy3szyistHcgXlsvUsidmOs8+hHIcje10QLCeJIOUImoS1BX5C5bhcuPJDX4p23 omiSdJIS5SxMg== 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: <7845f6c0-4b8e-48e6-a5e6-b0b3dd8a182b@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