Article View: linux.kernel.netdev
Article #2014Re: [PATCH net-next v3 9/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
From: netdev-bot+sashiko
Date: Sun, 11 Oct 2026 19:51
Date: Sun, 11 Oct 2026 19:51
118 lines
9627 bytes
9627 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
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_get_state() replaces the configured
speed and duplex with fixed values.
- [Low] The comment above RTL8365MB_SDS_EXT_INTERFACE_ID
(drivers/net/dsa/realtek/rtl8365mb_main.c:347-350) says "The embedded…
--
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. On this chip the SGMII/HSGMII
SerDes is on external interface 0 (port 6) and RGMII is on external
interface 1 (port 7). The patch also caps priv->num_ports at 8 for
family D and updates the comment on the learn limit.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 5d804099f131a..c6045607ade06 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -874,6 +881,19 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = {
> .jam_table = rtl8365mb_init_jam_8365mb_vc,
> .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc),
> },
> + {
> + .name = "RTL8367S-VB",
> + .chip_id = 0x6642,
> + .chip_ver = 0x0010,
> + .family = RTL8365MB_FAMILY_D,
> + .extints = {
> + { 6, 0, PHY_INTF(SGMII) | PHY_INTF(HSGMII) },
[Severity: Medium]
This entry lets port 6 run SGMII on a family D chip. That makes the
family D branch of rtl8365mb_pcs_get_state() reachable for the first
time.
Does that branch discard the forced speed and duplex that phylink has
already filled in?
drivers/net/dsa/realtek/rtl8365mb_main.c:rtl8365mb_pcs_get_state() {
...
if (is_d) {
state->duplex = DUPLEX_FULL;
state->speed = state->interface == PHY_INTERFACE_MODE_2500BASEX ?
SPEED_2500 : SPEED_1000;
return;
}
...
}
rtl8365mb_phylink_get_caps() advertises MAC_10 | MAC_100 | MAC_1000FD
for this port, so phylink accepts a forced 10/100 setting.
Take port 6 as a PHY-less SGMII user port with
managed = "in-band-status", and run:
ethtool -s <port> autoneg off speed 100 duplex full
phylink_ethtool_ksettings_set() stores link_config.speed = 100.
phylink_pcs_neg_mode() then picks PHYLINK_PCS_NEG_OUTBAND, and the mode
stays MLO_AN_INBAND because there is no phydev.
After that:
phylink_resolve()
phylink_mac_pcs_get_state()
state->speed = pl->link_config.speed; /* 100 */
rtl8365mb_pcs_get_state()
state->speed = SPEED_1000;
phylink_link_up()
rtl8365mb_phylink_mac_link_up() /* 1000/full */
rtl8365mb_ext_config_forcemode()
Would the MAC then be forced to 1000 Mbps while the configured speed is
100? Would ethtool get_link_ksettings also report 1000/full?
The family C branch avoids this by reading the forced values back from
SDS_MISC. When in-band autoneg is disabled, could the family D branch
keep the speed and duplex that phylink passed in?
[Severity: Low]
This isn't a bug, but this entry makes the comment above
RTL8365MB_SDS_EXT_INTERFACE_ID inaccurate:
/* The embedded SerDes can only be muxed to external interface 1 (MAC8),
* which is port 6.
*/
#define RTL8365MB_SDS_EXT_INTERFACE_ID 1
On RTL8367S-VB the SerDes is on external interface 0, and external
interface 1 is the port 7 RGMII interface.
rtl8365mb_pcs_config() still does:
const int id = RTL8365MB_SDS_EXT_INTERFACE_ID;
This only works today because every use of id is in the !is_d branch.
Could this comment be updated for family D, as was done for the
LEARN_LIMIT comment?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/e84d76ee-03df-49b0-8c9a-b289dfae8728%40yahoo.com
Technical Details
Message-ID:
<179174829036.434549.5346764045610555935@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-344601-linux-kernel-netdev=dewy.ruReferences:
<8d3a9cc7-17cb-46b5-ac78-c7b4055989a7@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-344601-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 9/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Date: Sun, 11 Oct 2026 19:51:30 +0000 Organization: Usenet Network Message-ID: <179174829036.434549.5346764045610555935@kernel.org> References: <8d3a9cc7-17cb-46b5-ac78-c7b4055989a7@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1608198"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:DxB46I2+zrV8DO7YxRy47XKcxBM= sha256:GmU2E+lT8fkrGBIxw0s1xl9P6QfaefCXYk2kd2ngy94= sha1:XnJVP+irQZ04O/8eSlfMZ9yjBLA= sha256:PGYE7KeAFSAqezqf4sCRdKzroTzXcVKNS4sKq3qwnLI= 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 EB3FB10FA65; Sun, 11 Oct 2026 22:57:10 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.34 X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, 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 0tz62wINh-0x; Sun, 11 Oct 2026 22:57:07 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344601-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 DF2CE10F97D; Sun, 11 Oct 2026 22:57:03 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 45A803CAA2; Sun, 11 Oct 2026 19:51:41 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0B9246C4BD; Sun, 11 Oct 2026 19:51:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZrqRE28R" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B2F1463B9C; Sun, 11 Oct 2026 19:51:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791748292; cv=none; b=R5W13HvgtzE6UgQMfw+f2DMBSGLFYicS1BZ3F32zNGR3JoTYsmts4k6yLGwnBwtqwaVvF+nUXoWpQK+f4YjwbuubKwuWSyAoVvRvATPskPrzh7jBBGmf/wsLaAB/DfUsgaEOHzdKEPOxMXeF0aJltZ1lOsieSkZN3EnGC8qXrXY= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791748292; c=relaxed/simple; bh=4se4uHMC97QgGHXvxbMlmjwpHcbloYW4bCGbOKMnW+E=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=KjCvfR0kLAowc3xMVrz3f7ngfLbH+Y5BrzUwYhgxcBSeMQpLYIuGNkcnbB686FvEWXN/WlchC2suIvLMIentCRJw+ieCgRLbT+DneQCr3tfeZne6L68ervNBGVnOipgBcHMqoU5RpT2axUnqyWc1KETtuAzysSqTxr5zJ7TrHVw= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZrqRE28R; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEFC41F0089B; Sun, 11 Oct 2026 19:51:30 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791748291; bh=/p/JZkpPRUTdvbzpofph+CHY3QC8tVZqhJXJcQRPyAg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ZrqRE28RmGfpcLvZ97bAIv2q5/Cf4sbVKOPgks2D/ZxSZ4YdR+31LwQLP7DAluXQ4 ValFeplE42H2PNSo1LDjKnxpwRvAU7ALxQcamMwEWbtMhcvS+6uPWWAmeXvLfzKsWS yqXdxER7mhMSN+vx6nHNJ/VwpqCFQc8H7a+1cehjt7jx0OF8Oihp/PC3wH1XVl/sXb RuknVkhtNDnzcOxxPWhcRhovbeX1rK/N47wwOk8EOyUAKjJ/N6oOVmMoJBe5p2HDee mvrCNSu9XSlWsjLtqmcMT52fC75oQQArEAGGDmZjIczqMpSx+1IM5xFPkeEpdBn5Cs G2m1mDzQDrnWw== 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 X-In-Reply-To: <8d3a9cc7-17cb-46b5-ac78-c7b4055989a7@yahoo.com> X-sashiko-severity: Medium X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>