Re: [PATCH net-next v11 13/14] net: phy: ncn26000: Support for onsemi's S2500 internal phy

From
netdev-bot+sashiko@kernel.org
Date
2026-11-17 19:53:09
Also in
linux-devicetree, linux-doc, lkml
Reply to
Selvamani Rajagopal via B4 Relay, 2026-11-13
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The new S2500 entry in ncn26000_driver[]
  (drivers/net/phy/ncn26000.c) sets `.set_plca_cfg =…

--

net: phy: ncn26000: Support for onsemi's S2500 internal phy

This patch adds a phy_driver entry for the internal PHY of the onsemi
S2500 MAC-PHY to the ncn26000 driver. The NCN26000 TO_TIMER workaround is
skipped on the S2500, and the new entry gets its own config_aneg. It also
adds SQI, OATC14 cable test, loopback and direct C45 MMD access callbacks.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/phy/ncn26000.c b/drivers/net/phy/ncn26000.c
index 888d74b831256..0e2c978b73d49 100644
--- a/drivers/net/phy/ncn26000.c
+++ b/drivers/net/phy/ncn26000.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -162,6 +179,25 @@ static int ncn26000_config_intr(struct phy_device *phydev)
 }
 
 static struct phy_driver ncn26000_driver[] = {
+	{
+		PHY_ID_MATCH_MODEL(PHY_ID_S2500),
+		.name                  = "S2500",
+		.features              = PHY_BASIC_T1S_P2MP_FEATURES,
+		.config_init           = ncn26000_config_init,
+		.config_aneg           = s2500_config_aneg,
+		.read_status           = ncn26000_read_status,
+		.set_loopback          = genphy_loopback_no_speed,
+		.set_plca_cfg          = ncn26000_c45_plca_set_cfg,
[Severity: Low]
Does bit 7 of VEND2 register 0x8001 also mean Enhanced Noise Immunity on
the S2500?

The S2500 entry reuses ncn26000_c45_plca_set_cfg(). After the generic PLCA
setup, that function also writes the NCN26000-specific ENI bit:

drivers/net/phy/ncn26000.c:ncn26000_c45_plca_set_cfg() {
    ...
	eni_cfg = (plca_cfg->enabled) ? NCN26000_PHYCFG1_ENI : 0;
	return phy_modify_mmd(phydev, MDIO_MMD_VEND2,
			      NCN26000_REG_PHYCFG1,
			      NCN26000_PHYCFG1_ENI, eni_cfg);
}

The S2500 MAC driver gives the same MMS4 register a different name, and
does not define an ENI bit for it:

drivers/net/ethernet/onsemi/s2500/s2500_hw_def.h:
#define S2500_REG_VS_TWEAKS1		0x8001

The commit message covers one PLCA difference between the two parts (the
TO_TIMER default). It does not say whether TWEAKS1[7] has the same ENI
meaning on the S2500.

If the meaning differs, each ethtool PLCA enable or disable would toggle
an unrelated vendor tuning bit through this path:

phy_ethtool_set_plca_cfg()->ncn26000_c45_plca_set_cfg()->phy_modify_mmd()

Could this be confirmed in the commit message or in a comment? If the bit
is different on the S2500, the entry could call genphy_c45_plca_set_cfg()
directly instead.
quoted hunk ↗ jump to hunk
+		.get_plca_cfg          = genphy_c45_plca_get_cfg,
+		.get_plca_status       = genphy_c45_plca_get_status,
+		.soft_reset            = genphy_soft_reset,
[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113-s2500-mac-phy-support-v11-0-7a186141952c%40onsemi.com
Thread (25 messages) 25 messages, 4 authors, last reply 1h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help