Article View: linux.kernel.netdev
Article #26040Re: [PATCH net-next v18 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
From: netdev-bot+sashiko
Date: Wed, 02 Dec 2026 23:58
Date: Wed, 02 Dec 2026 23:58
130 lines
13157 bytes
13157 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] On family D, rtl8365mb_pcs_config()
(drivers/net/dsa/realtek/rtl8365mb_main.c) skips the…
--
net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
This commit adds family D support to the existing RTL8367S SGMII/HSGMII
PCS code. The family D CPU SerDes is reached through the indexed SDS13
window, and SDS_MISC uses a different layout. The family D paths get
separate tuning tables and their own SDS_MISC setup, and the family D
SerDes port no longer writes DIGITAL_INTERFACE_SELECT or advertises
10/100 Mbit/s.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 7500ea9b3a627..da0c5f254560f 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -1575,34 +1663,63 @@ 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;
> + /* On family D, SDS_MISC configures the SerDes mode directly; id (1)
> + * refers to RGMII port 7 on RTL8367S-VB and must not be overwritten.
> + */
> + 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;
> + }
[Severity: Medium]
On family D, rtl8365mb_pcs_config() now skips the whole
DIGITAL_INTERFACE_SELECT update. Should it write the EXT0 field instead?
The RTL8367S-VB chip entry describes the SerDes as extint id 0:
{ 6, 0, PHY_INTF(SGMII) | PHY_INTF(HSGMII) },
That is the EXT0 field, bits 3:0 of RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0
(0x1305). Nothing on the family D path writes that field in SGMII or
2500base-x mode.
The reason given for skipping is that id 1 is the RGMII port 7. That
argues for writing id 0 rather than skipping the write altogether.
Family C sets up this register in two places: the init jam writes
{ 0x1305, 0xC000 }, and pcs_config() writes the SerDes mode into EXT1.
Family D has no init jam table. The register is still used on family D,
because rtl8365mb_ext_config_rgmii() writes the EXT1 field for RGMII on
port 7.
Suppose the EXT0 power-on or strap default on some board is not a SerDes
mode. Could MAC6 then fail to connect to the SerDes and the CPU link stay
down, even though SDS_MISC has MAC6_SEL_SDS0 and the mode field set?
The commit message says:
The EXT0 field of that
register keeps its reset or bootloader value.
Can a bootloader value survive here? rtl8365mb_setup() calls
rtl8365mb_reset_chip() before any PCS configuration:
priv->write_reg_noack(priv, RTL8365MB_CHIP_RESET_REG,
FIELD_PREP(RTL8365MB_CHIP_RESET_HW_MASK, 1));
...
return regmap_read_poll_timeout(priv->map, RTL8365MB_CHIP_RESET_REG, val,
!(val & RTL8365MB_CHIP_RESET_HW_MASK),
20000, 1e6);
That is a full hardware reset, so it looks like EXT0 will always hold its
power-on or strap default when rtl8365mb_pcs_config() runs.
The commit message also says it was not verified whether the vendor
RTL8367D sequence programs this field. The new source comment, however,
says that SDS_MISC configures the SerDes mode directly, as if that were
established. It also does not mention that EXT0 is left unprogrammed.
Could the comment say both of those things, so it matches the commit
message?
This code is unchanged at the end of the series. The RTL8367S-VB chip
entry makes this path reachable, and no later patch in the series
programs EXT0.
>
> /* Take the SerDes out of reset. The vendor driver does this only
> * after the SerDes mux and the interface mode are configured.
> */
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/1383a67b-15e4-4c76-8bbf-65d3cbfa1fc1%40yahoo.com
Technical Details
Message-ID:
<179625593492.3146.17769311237884164405@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.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-376137-linux-kernel-netdev=dewy.ruReferences:
<61c88068-ea97-4fd2-99d1-cb5abccd0694@yahoo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.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-376137-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v18 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Date: Wed, 02 Dec 2026 23:58:54 +0000 Organization: Usenet Network Message-ID: <179625593492.3146.17769311237884164405@kernel.org> References: <61c88068-ea97-4fd2-99d1-cb5abccd0694@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2092113"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:jp2JxUtPY4ZQ4oF47U58U0Qy8Wg= sha256:i7KLc5jeFBbA+849McmWstoALq6aAjOmXrPd9ucnAvY= sha1:jKod84GNMiiTLr7zqslHA/S6b2o= sha256:pZcxEaT0mDp71ZR1P9bu5Y7RIvKaPEf3PRCCnGx6IM8= 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 5C1811177A5; Thu, 3 Dec 2026 02:59:28 +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 5G4K5dPxFzwg; Thu, 3 Dec 2026 02:59:24 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376137-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 7689C11779E; Thu, 3 Dec 2026 02:59:16 +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 01CE42A278; Wed, 2 Dec 2026 23:59:03 +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=1796255942; b=pcwNB2e1NSMCDjxOjHu+TGaZyN0D64QH/3XjSZZ+AKgtf08JkH5fKNudKPBcjFxa2GKf ldktF4x79G7g4JZANIkqnSKUgp2pcOwSH07Yvz51AiAaVtgXgeUMZczP7QMHAsB6sdKME xSv8bLxL9AhJTDqoNitmvJ61lkiOZ6ANUrR1drRNbqOp4ozu93mNh/HXCveQgv2eM00Iq Sc/BjBqBRqNQF7kB/MjblbAPJwZjePnEuMjIAXxxLQJKGpJlEeA+IA1BM9yiTYlwoMXHQ y12ppjNhJDb+obinjsif3nv3Rw74sTiu70lARz36iDk5oCTQhadE1glQIb8bNJBHGhw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796255942; 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=v6SXYmiLS8YfpZnU4cjPE7W9aVB0a10oBbR2MrvMm3Y=; b=bvT733VGioJQCj2VruTdjvOczqsQc3u2wCvHUNvd4WKWVzbhhe00i4koSYtpxIbtneY+ AH7MJy0E9Uc8HJUw70aUEfGbckRXZrb51mCKtVoA92mHy40XARDHCIGo2DM9fRRjeJ0z4 x+UMQOSkHB79D56oHFc6PBMInplUtO+2YL+ARrNrt3WgWp0dQkNo1JtFAT2VSKsMU9s32 oWigTxjezNSjPd7zv4EapOD3tHjKPpGtaKh2fBbb9ILEXHipq7xa0ieUdM9G2pi+6VYcz vpjXca/VD1+SXeDkFYcoBECBrtTHA+vzLloMEc3H7sw31KdRArRkMQHbmAJPHGCMg5g== 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=nhWNeBJW; 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 B49AD606A32F; Wed, 2 Dec 2026 23:59:02 +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=nhWNeBJW 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=1796255936; b=OFD+lUemJxk28AmsutJmdFlAUGVO4120JfdUOu5G5f/dk83jtkfDH6/bxMHJD/1+Tq8x R8hbjQOh+CRtREx8Nh8GmXEDmFHu0df5CCkpHusw/wumg+9wQ4h+MB2PSiqPNzxu/z75D 3XM94VyiC1myzDY9q1q7gvzB5e70uluLtpO+Uv1T3Enm/VEMIX0IEVEv4fX+14bW9eT8N qaaLNn7EUCEepmQztM4HYiqp2FL7kTzw8T+3nyzvOaOxlijlpAbD+u5Kf7DiYE8EaG31x U79POvPwTr+vRsHLeQlyd/i+L8hIM+4K1stSpyW7wvlsjgVy8TeWuGiEisiavY2J1IQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796255936; 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=v6SXYmiLS8YfpZnU4cjPE7W9aVB0a10oBbR2MrvMm3Y=; b=IkNepi/bKH9/NYjIgAmD9+y5z0fouLox5QlAw8pD8gkRXS76+bTYLxFb+IqlrCZzMHng VuDTT9KfT76Dn7lCwIkXuiNoi+A4vVOvSZ1Xq2BAnReg7tLqibzzPbArmdgxnSqfp1i0g z2XJk7yQR7p2glwrWZ/2ulFrnwVQeTdcZq1HbaMxAuWsmP73+Q+SYCm8aATk3BiDIkK7m s1lputWoscsLODeOpZxgrrJKHYRijE2ZS6OYm+qkKfUTkHAqW/Xm9i43zRl08bFzmia9r wT+v/hyieND7lHhbC6jtUApq0B+6JWyQku0pLmI2xK/s4Yap5gk33ve0CHzA9EC/V4Q== 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=nhWNeBJW; 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 D53B7606A338; Wed, 2 Dec 2026 23:58:56 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6073E1F00893; Wed, 2 Dec 2026 23:58:55 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796255936; bh=v6SXYmiLS8YfpZnU4cjPE7W9aVB0a10oBbR2MrvMm3Y=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=nhWNeBJWejaZBjSM4ME9avKSBd6vQ+h12DydYCBBYHKGkQFv+lnh78cOypZcSk93o ngBAMGLK+vqa1LGpgNiLbrgU5quYI34C0OLXeRTynrTHZieYvfau5CtzGCL27iEbB/ VJJzz55VITItlR1Au4aBpSDR4VaLK1shCDMHQsUPct+0cjEqLpCnAbIQaByU2mUulh pgIC/Kg29UXweMT5GVBA1o95z/2HaiO/flPntlzFdXmbIqCgCMURIgTbUW7L+kXCxC Ex7zfuDKjswO3BrBFVl/pTnP3pqvV9+Pp+/QmVC3027m1V/+NaIYDdfGrACHzqdzxO wINwem+bFoNnA== 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: <61c88068-ea97-4fd2-99d1-cb5abccd0694@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