Thread (40 messages) flat view 40 messages, 6 authors, 2026-08-06

Re: [PATCH v2 06/10] net: pcs: xpcs: add ANRESTART support for SGMII link recovery

From: sashiko-bot@kernel.org
Date: 2026-08-02 14:25:38
Also in: linux-devicetree

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Stale documentation: the patch introduces BMCR_ANRESTART for MAC-side SGMII but fails to update the block comment that explicitly states this is not needed.
--
--- Patch [6]: [PATCH v2 06/10] net: pcs: xpcs: add ANRESTART support for SGMII link recovery ---
commit 2bc2528d92a030c16f9b0b3ce9ca602d98573c26
Author: Coia Prant [off-list ref]

net: pcs: xpcs: add ANRESTART support for SGMII link recovery

This commit adds ANRESTART support for SGMII link recovery on hardware
using the DesignWare XPCS IP. It sets BMCR_ANRESTART when starting
auto-negotiation and triggers it again if the link goes down after
completion to ensure the negotiation restarts properly.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -816,9 +816,14 @@ static int xpcs_config_aneg_c37_sgmii(struct dw_xpcs *xpcs,
[ ... ]
 	if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED)
 		ret = xpcs_write(xpcs, MDIO_MMD_VEND2, MII_BMCR,
-				 mdio_ctrl | BMCR_ANENABLE);
+				 mdio_ctrl | BMCR_ANENABLE | BMCR_ANRESTART);
[Severity: Low]
This isn't a bug, but does this change make the large block comment earlier
in xpcs_config_aneg_c37_sgmii() contradictory?

The existing comment explicitly states:
"There is also no need to trigger AN restart for MAC-side SGMII."

Since this patch adds the BMCR_ANRESTART flag to the MAC-side SGMII path,
should the comment be updated to reflect the new behavior?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260801142244.679437-2-coiaprant@gmail.com?part=6

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help