From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796350733; b=DQHB1IKyVnkjKR/x8Euo10Puk/pFifbgG6o57nHNeBi6W2Mc4CaSjzQJpXaYzZhVlSUi L6K3EE6v9t85fl8Lz3JUaIeHAb6BAzyG5T3dNjgtFiaRQhbvegYmUU/beCT876Y0JRg/r ET+2NxP8n5ZTYbJC0Lyvi+2/uxqM1tteV/fMo1jNwgc3Y+pxyVvc+qTd+y+VTJBAuBBlZ eXMOwxXPbThRXDuvT+2qOn4FlpQ2Ss2HDqD44/Ht6Q64XZRbjVbRVU7vkwJ0sDk5iWWJy k8M272WzIO19cHacuIwrhLMENDvi5qk3qCHGEOq0t69B2ipwoPMSNAtzCyZirHRJDdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796350733; 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=XzTzpBbNEhPeAzYCshXceyNxApMoToCSf3cYlR5aaFE=; b=IFEfSK/nu3IxMhl/O4tcPYc8t04PAltuh82RQhYtB3pGklTWFkdh+rumoKA2u/c+hOXP M8y5wT1NsVkWMocj8cZSKlSCCd+bS0GueTxs7h9Be50YOIR2S8ijbNwU3JEgfWL8Qy2j4 JIRhmljHCTH03m1e653na8DM2XNjzAQUSBKZTdk4S2qNDEqNavyORGosnu4f1iQ+Qk8gi GGp1r8529Xi1t9EMdmSDrDonIUwsxro0BpdiDDLBWS1Xmg/wb/uAC7JX0tHBmKur1MuWt Dq0couDBKrszCXvDph3n5LCeUFHg4KLzhmMrgmY/A5KtpgwiqrrCk44JuWIgXJuzUJQ== 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=ek2JhzhB; arc=none smtp.remote-ip=100.103.45.18 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 598E7606A334; Fri, 4 Dec 2026 02:18:53 +0000 (UTC) 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=ek2JhzhB Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF2C81F000C2; Fri, 4 Dec 2026 02:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796350732; bh=XzTzpBbNEhPeAzYCshXceyNxApMoToCSf3cYlR5aaFE=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ek2JhzhBpi51rQL3ZZ98bPSDm00AGdCNheB9xu8+gakJoBQ79ETQANA6154zpATCa UV9gH6mxH3dGngWSFYSwxfZwCunW988gIkxbPfb4RQlzW8WLJeeHockxt6RUUWaGJz zYsR6l3aud6+tMJ9C9pn6BwxwAzBZtP/uGXDAf0zN5biyGxfLFSBCB+gI0YTbFiJAp PVeN9Obv2XEqM7ETRviKbfNQIF3tBfy22/nqixNtWPDBnedKK2h7mlWgkcZJbX2Wsl K/1lw1ZkEpNd6VIUPcOYTl/YXGjF4vrkZNBY8bauLRzbPe9SmTz4DyyStL1WMm+XMd 382M9Pzdbn1Ug== Subject: Re: [PATCH net-next v19 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB From: netdev-bot+sashiko@kernel.org To: namiltd@yahoo.com 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 Date: Fri, 04 Dec 2026 02:18:51 +0000 Message-ID: <179635073149.3146.8834479666757845007@kernel.org> In-Reply-To: References: X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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] In rtl8365mb_pcs_config() (drivers/net/dsa/realtek/rtl8365mb_main.c), DIGITAL_INTERFACE_SELECT… -- 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. That makes the family D code paths from the earlier patches reachable. The new rtl8365mb_family_d leaves jam_table unset and maps the SerDes to port 6 / EXT0 and the RGMII interface to port 7 / EXT1. > diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c > index b3fc6fbfac7c8..2b7b364542a6c 100644 > --- a/drivers/net/dsa/realtek/rtl8365mb_main.c > +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c [ ... ] > @@ -845,6 +861,24 @@ static const struct rtl8365mb_family_info rtl8365mb_family_c = { > .qos_set_untag_pcp = rtl8365mb_c_qos_set_untag_pcp, > }; > > +static const struct rtl8365mb_family_info rtl8365mb_family_d = { > + .family = RTL8365MB_FAMILY_D, > + .ext_config_forcemode = rtl8365mb_d_ext_config_forcemode, [ ... ] > @@ -935,6 +969,19 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { > }, > .num_tx_queues = 8, > }, > + { > + .name = "RTL8367S-VB", > + .chip_id = 0x6642, > + .chip_ver = 0x0010, > + .family_info = &rtl8365mb_family_d, > + .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), > + .extints = { > + { 6, 0, PHY_INTF(SGMII) | PHY_INTF(HSGMII) }, > + { 7, 1, PHY_INTF(MII) | PHY_INTF(TMII) | > + PHY_INTF(RMII) | PHY_INTF(RGMII) }, > + }, > + .num_tx_queues = 8, > + }, > }; [Severity: Medium] This entry puts the SerDes on EXT0, and rtl8365mb_family_d has no jam_table. On family D, does anything ever program the EXT0 mode field (bits[3:0]) of DIGITAL_INTERFACE_SELECT (0x1305)? In rtl8365mb_pcs_config(), the only write to that register is skipped on family D: drivers/net/dsa/realtek/rtl8365mb_main.c:rtl8365mb_pcs_config() { ... /* On family D, SDS_MISC selects the SerDes mode. id (1) refers to * RGMII port 7 on RTL8367S-VB and must not be overwritten. The EXT0 * field of DIGITAL_INTERFACE_SELECT is not programmed here and keeps * its power-on or strap default; whether the vendor sequence sets it * for the SerDes was not verified, but the link came up on all tested * boards. */ 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), ... } On family C, the jam table in rtl8365mb_setup() also writes { 0x1305, 0xC000 }. Here fi->jam_table is NULL, so that write is skipped as well. On family D, rtl8365mb_ext_config_rgmii() only writes the EXT1 nibble (bits[7:4]) for port 7. That leaves the EXT0 field and bits[15:14] at whatever value they have after rtl8365mb_reset_chip(), which is the power-on or strap value. What happens on a board where that default leaves EXT0 in a non-SerDes or disabled mode? rtl8365mb_d_ext_config_forcemode() would still force MAC6 up from mac_link_up(), and pcs_get_state() only reads the SerDes link bit. Could the CPU port then report link up but pass no traffic, with no error logged? If the hardware ignores the EXT0 nibble once SDS_MISC selects RTL8365MB_D_SDS_MISC_MAC6_SEL_SDS0, there is no problem. Can that be checked against the vendor RTL8367D sequence? If not, should the EXT0 field be programmed explicitly for the SerDes on family D? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/59c7992d-1c83-4bf1-a2f4-c853d4777190%40yahoo.com