From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=66.163.190.148 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796365288; b=Fkxul958lHaWm3IwU8jbaW6BC/JnWMnCUIPTz/s40Q4ehTjjKXSdF/Z+WvY8Bp0/ox6i QKR4vHhrHTp/6aPobU9CTuYfZanMm2JpMHJOQY53kOS6aTaEXcflbvYkncXzIimeI4Xz0 WAmHoKQ8piRglGyM8Ivkw83oGZENlkvdUz45wHnLnagP2LnKwxOAm620RNIaz8u60uoDl tZBOnvoHEKDlfvl8eoHkMJizehHVKc5KOFIfMwmT40eNdlK7NSnFWwTHx+E+No9PM2Ywf yyAfQV6wQM/oTsTwmuDgt2WyX6deNW6mXYW9KYibhR9CdNlL2ZlAPbEJqfPmBgeX0Yg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796365288; h=DMARC-Filter:DKIM-Signature:X-SONIC-DKIM-SIGN:X-YMail-OSG:X-Sonic-MF: X-Sonic-ID:Received:Received:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-Mailer; bh=8bo1vum/lI+4LhHASvPoDsESO+TzM4jyz0UjlmlkGuw=; b=fd2gE0jpehiV3UZ1M3vkdcmBCA31XxADVrqWecZyMqlPyiyHw2NXBeq1rDLMvVbR2tz5 c8ayaf0Tr6UbODTPIUVHHwXjeTTBbj9GUaH9wy4BwNxEd4acBDap4lMyVn+xR7rppKRVa pJ0w3ui1qAy4pyHSZnlM+zaDGqiekR7XYD3f81+96vERp8eKeuKIz9TxaxDTiNzFyFJrR EOFaTp/NCaC0iAaJbch4AOpaIh/52nzsfI3S61Lfb83vGIhyb/yGxWP/c3WlNCXJftuqz OES+c0n/J5BMIZUsrweQxXyCLM7GDKUZvlOtrwQ8ejzijcSgmxZezS4BbCKKBIVlp4g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass header.d=yahoo.com header.i=@yahoo.com header.a=rsa-sha256 header.s=s2048 header.b=PWIWJf1W; arc=none smtp.remote-ip=66.163.190.148 Received: from sonic315-22.consmr.mail.ne1.yahoo.com (sonic315-22.consmr.mail.ne1.yahoo.com [66.163.190.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B8DC606A32C for ; Fri, 4 Dec 2026 06:21:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0B8DC606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.a=rsa-sha256 header.s=s2048 header.b=PWIWJf1W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1796365286; bh=8bo1vum/lI+4LhHASvPoDsESO+TzM4jyz0UjlmlkGuw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:Content-Type:From:Subject:Reply-To:Content-Type; b=PWIWJf1Wkg+9vG/vfe1AoJQ0BBRKmTQEJAE6SVGSUG/U2r3Ou4KbmvnXFoOhHyfoZsM/t/OepEeZKj4jgd2fWY4OD/KJXwEencQQuWB3nUTQ48sy6orucNra4gJE9KJxPsOLCQ2ox+HP/19sDrfbETa5+xMNW9RN5XW5Pd+IfJHWBtTJdT2GyIQqx3yODZBp68qWRq1328wHhcg34O6nc+MI09CrHdM2I9Oat+AntdbDXv6wxr3j7UJUw++Yq5MyyIvpLj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ikf1uMqR_xAVdHxYvdP.r_sVLe2UxBmk_ 6XwogKfJkTrEoS3ItMy8WIRIF2lNNGqiJT5EaExXjEz8WX9ZF6hyCnY2diiRQbUU4A12XMPonfBa 2T09NcBCXvjTJ5KQotfrurR56r2T6UdxzKB92av..Qpre.W9ix6Rf2YyaJFrKjAPNhAdimFM506g OQqzvE4uPuy1PvpRvKoqVa3rRXxiB2eY.lpdAxUY.2J48V2hh8PcoLOvlo49EDl57uzuAgmuAfGV VQ12yM661yLjob1J1gPZvQymMH4Axo7gZ6GNsc2UuGMo8OrUeBJxO3oq70fWwIYK3jtxiaF3YQpr yzd.feADTX0NFJjg9v.q1j6Lml4xTe5n_CgvIs3bYYWquPf.nheRD.5zesttZ_jT7UXTs69v8NzA xgNT3dS3MorBQsoKggUA9Yi1bQF5H_OeI4.k8ClC5GaO6db3ftoXAJ5nUHx.Q2A8pQudMwHhFUjK Co2SvA0heQYkNdvXUVykTk6PjCd6Hiq21vxA_ofllc8.TvTCu9pWgc_CIzXhRXjI8Rl_Got8hMR2 9Sbxff6IHXE2csCwJThWAvPURfjWV8Mxu03WKWpTlU9SqOYAirB_KeQ9GKNdBo2sqhfl6LKhYf4c rRyWie9sqqEY0VLeZwCIc3PB0e0RPvx8kJ2ethAjWn5YssfIIKRO0dAxhbbhwtvBCMgJjl3VQ_2N 19TCIwVxd9UF9GPH.7OXBNE6XjsuEesMBMhrYB4260PMyOjAKK2.8vtzM2uNZMggROcyWxwrkoxH jivbZkBxxLx36A6vDhqvH X-Sonic-MF: X-Sonic-ID: fb76f94d-fb43-400f-afa3-8e1fe65d3139 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Fri, 4 Dec 2026 06:21:26 +0000 Received: by hermes--production-ir2-7c4859dc89-zhdpz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f32f001e2b933ff6784c23b1a0d2b788; Fri, 04 Dec 2026 06:21:23 +0000 (UTC) Message-ID: <77de5e70-b66f-4ac7-a28c-2dff6f6ec57b@yahoo.com> Date: Fri, 4 Dec 2026 07:21:16 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v19 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support To: netdev-bot+sashiko@kernel.org 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 References: <68b3e791-8ac2-41fd-887f-b82a81d45338@yahoo.com> <179635072993.3146.4719994977464012754@kernel.org> Content-Language: pl From: Mieczyslaw Nalewaj In-Reply-To: <179635072993.3146.4719994977464012754@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.27159 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo On 12/4/2026 3:18 AM, netdev-bot+sashiko@kernel.org wrote: > 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() in > drivers/net/dsa/realtek/rtl8365mb_main.c never programs the EXT0 mode… > > -- > > net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support > > This commit extends the rtl8365mb RTL8367S SGMII/HSGMII PCS code to > family D switches. On family D the SerDes is reached through the indexed > SDS13 window, and SDS_MISC has a different layout. Family D gets its own > tuning tables, SDS_MISC programming and link state handling. The family C > path is unchanged. > >> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c >> index 4fd79dbb2d691..4a8a04fc6d755 100644 >> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c >> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c > > [ ... ] > >> @@ -1576,34 +1664,67 @@ static int rtl8365mb_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode, > > [ ... ] > >> + misc_mask = RTL8365MB_D_SDS_MISC_CFG_MASK; >> + misc_val = RTL8365MB_D_SDS_MISC_PA33PC_EN | >> + RTL8365MB_D_SDS_MISC_PA12PC_EN | >> + RTL8365MB_D_SDS_MISC_MAC6_SEL_SDS0 | sds_mode; >> + } else { >> + /* Mux the SerDes to MAC8 in the requested mode */ >> + misc_mask = RTL8365MB_SDS_MISC_MAC8_SEL_SGMII_MASK | >> + RTL8365MB_SDS_MISC_MAC8_SEL_HSGMII_MASK; >> + misc_val = (sds_mode == RTL8365MB_EXT_PORT_MODE_SGMII) ? >> + RTL8365MB_SDS_MISC_MAC8_SEL_SGMII_MASK : >> + RTL8365MB_SDS_MISC_MAC8_SEL_HSGMII_MASK; >> + } >> + >> 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 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), >> + RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(id), >> + val); >> + if (ret) >> + return ret; >> + } > > [Severity: Medium] > On family D, does anything program the EXT0 mode nibble (bits 3:0) of > DIGITAL_INTERFACE_SELECT_REG0 (0x1305) for the SerDes port 6 / MAC6? > > The whole DIGITAL_INTERFACE_SELECT write in rtl8365mb_pcs_config() is > skipped when is_d is set. Family D has no init jam table, so it never gets > the family C { 0x1305, 0xC000 } entry either. > > The only other family D write to this register is in > rtl8365mb_ext_config_rgmii(). That write only updates the extint id 1 > nibble, which is used by the RGMII port 7: > > ret = regmap_update_bits( > priv->map, RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(extint->id), > RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(extint->id), > RTL8365MB_EXT_PORT_MODE_RGMII > << RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_OFFSET( > extint->id)); > > After rtl8365mb_reset_chip(), the EXT0 interface mode therefore keeps > whatever value the strap or EEPROM set. SDS_MISC is still written with > MAC6_SEL_SDS0 plus the SGMII/HSGMII mode, and the PCS is treated as > configured. > > Suppose a board's straps leave EXT0 disabled or in a parallel-bus mode. > Could MAC6 and the SDS_MISC mux then disagree, so that the port 6 SerDes > link is dead or unreliable and the driver does not notice? > > The commit message says that whether the vendor RTL8367D sequence programs > this field was not verified, and that "the link came up on all tested > boards". This is still the case after the RTL8367S-VB chip entry is added > later in the series. > > Would it be possible to program EXT0 explicitly for SGMII/HSGMII on > family D? Or at least read it back and warn when it does not match the > requested SerDes mode? > > [ ... ] > Thanks for the review. I checked this against the vendor RTL8367D port API. In dal_rtl8367d_port_extMode_set() the SerDes path for MAC6 (id == 1) does not touch DIGITAL_INTERFACE_SELECT (0x1305) at all. It sets MAC6_SEL_SDS0, loads the SGCfg/HSGCfg tuning table through the SDS indirect window, sets the FIBER_CFG_2 RX disable field, and then programs PA12PC_EN, PA33PC_EN and the mode field in SDS_MISC. The EXT0 field (SELECT_GMII_0, bits 3:0) is defined in the vendor register header but is not used anywhere in the vendor code. Every write to 0x1305 there is to SELECT_GMII_1 (EXT1, RGMII on port 7). So on this family the SerDes mode is selected by SDS_MISC alone, and the driver matches the vendor sequence by not writing EXT0. No code change is needed.